From 82928e81ca7605b53fff2c693ca757fe91276953 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 22 Jan 2025 19:24:25 +0000 Subject: [PATCH] CodeGen from PR 32280 in Azure/azure-rest-api-specs Merge ea783f895a8fe776db2dcd8320a091e714d97b4c into 3956e4c8f10de44a70f41656e3b58359f56013b9 --- .../CHANGELOG.md | 1149 +++- .../README.md | 68 +- .../SAMPLE.md | 5004 ++++++++++++----- .../pom.xml | 13 +- .../MachineLearningManager.java | 467 +- .../AzureMachineLearningWorkspaces.java | 202 +- .../fluent/CapabilityHostsClient.java | 171 + .../fluent/ComputesClient.java | 196 + .../ConnectionRaiBlocklistItemsClient.java | 349 ++ ...tionRaiBlocklistItemsOperationsClient.java | 53 + ...onnectionRaiBlocklistOperationsClient.java | 191 + .../fluent/ConnectionRaiBlocklistsClient.java | 50 + .../fluent/ConnectionRaiPoliciesClient.java | 48 + .../ConnectionRaiPolicyOperationsClient.java | 190 + .../fluent/ConnectionsClient.java | 289 + .../fluent/DatastoresClient.java | 4 +- .../fluent/EndpointDeploymentsClient.java | 254 + .../fluent/EndpointsClient.java | 253 + .../fluent/InferenceEndpointsClient.java | 291 + .../fluent/InferenceGroupsClient.java | 504 ++ .../fluent/InferencePoolsClient.java | 277 + .../ManagedNetworkProvisionsClient.java | 8 +- .../ManagedNetworkSettingsRulesClient.java | 34 +- .../PrivateEndpointConnectionsClient.java | 76 +- .../fluent/PrivateLinkResourcesClient.java | 35 +- .../fluent/PtuQuotasClient.java | 95 + .../fluent/RaiPoliciesClient.java | 48 + .../fluent/RaiPolicyOperationsClient.java | 190 + .../fluent/WorkspaceConnectionsClient.java | 179 +- .../fluent/WorkspacesClient.java | 378 +- .../fluent/models/AccountApiKeysInner.java | 121 + .../fluent/models/AvailableQuotaInner.java | 97 + .../fluent/models/BatchDeploymentInner.java | 76 +- .../fluent/models/BatchEndpointInner.java | 76 +- .../fluent/models/CapabilityHostInner.java | 172 + .../fluent/models/CodeContainerInner.java | 24 +- .../fluent/models/CodeVersionInner.java | 24 +- .../models/ComponentContainerInner.java | 24 +- .../fluent/models/ComponentVersionInner.java | 24 +- .../fluent/models/ComputeResourceInner.java | 24 +- .../fluent/models/DataContainerInner.java | 24 +- .../fluent/models/DataVersionBaseInner.java | 24 +- .../fluent/models/DatastoreInner.java | 24 +- .../models/DeltaModelStatusResponseInner.java | 221 + .../fluent/models/EndpointAuthTokenInner.java | 56 +- ...tResourcePropertiesBasicResourceInner.java | 179 + .../fluent/models/EndpointKeysInner.java | 96 + .../models/EndpointModelPropertiesInner.java | 388 ++ .../fluent/models/EndpointModelsInner.java | 129 + .../models/EndpointPropertiesBaseInner.java | 117 +- ...tResourcePropertiesBasicResourceInner.java | 175 + .../models/EnvironmentContainerInner.java | 24 +- .../models/EnvironmentVersionInner.java | 24 +- .../models/ExternalFqdnResponseInner.java | 11 +- .../fluent/models/FeatureInner.java | 24 +- .../models/FeaturesetContainerInner.java | 24 +- .../fluent/models/FeaturesetVersionInner.java | 24 +- .../FeaturestoreEntityContainerInner.java | 24 +- .../FeaturestoreEntityVersionInner.java | 24 +- .../fluent/models/GroupStatusInner.java | 153 + .../fluent/models/InferenceEndpointInner.java | 293 + .../fluent/models/InferenceGroupInner.java | 292 + .../fluent/models/InferencePoolInner.java | 292 + .../fluent/models/JobBaseInner.java | 24 +- .../models/ListNotebookKeysResultInner.java | 8 +- .../ListStorageAccountKeysResultInner.java | 4 +- .../models/ListWorkspaceKeysResultInner.java | 95 +- .../models/ManagedNetworkSettingsInner.java | 50 +- .../models/MarketplaceSubscriptionInner.java | 24 +- .../fluent/models/ModelContainerInner.java | 24 +- .../fluent/models/ModelVersionInner.java | 24 +- .../NotebookAccessTokenResultInner.java | 104 +- .../models/NotebookResourceInfoInner.java | 55 +- .../fluent/models/OnlineDeploymentInner.java | 76 +- .../fluent/models/OnlineEndpointInner.java | 76 +- .../OutboundRuleBasicResourceInner.java | 26 +- .../PrivateEndpointConnectionInner.java | 157 +- .../PrivateEndpointConnectionProperties.java | 61 +- .../models/PrivateLinkResourceInner.java | 349 ++ .../PrivateLinkResourceListResultInner.java | 101 - .../models/PrivateLinkResourceProperties.java | 25 + ...klistItemPropertiesBasicResourceInner.java | 175 + ...BlocklistPropertiesBasicResourceInner.java | 175 + ...RaiPolicyPropertiesBasicResourceInner.java | 174 + .../fluent/models/RegistryInner.java | 48 +- .../fluent/models/RegistryProperties.java | 34 + .../fluent/models/ScheduleInner.java | 24 +- .../models/ServerlessEndpointInner.java | 76 +- .../SharedPrivateLinkResourceProperty.java | 68 +- .../fluent/models/SkuResourceInner.java | 64 +- .../models/UsageAndQuotaDetailsInner.java | 156 + ...nectionPropertiesV2BasicResourceInner.java | 24 +- .../fluent/models/WorkspaceInner.java | 858 ++- .../models/WorkspacePropertiesInner.java | 1106 ++-- ...kspacePropertiesUpdateParametersInner.java | 513 +- .../implementation/AccountApiKeysImpl.java | 36 + .../implementation/AvailableQuotaImpl.java | 33 + .../AzureMachineLearningWorkspacesImpl.java | 456 +- .../implementation/BatchDeploymentImpl.java | 16 +- .../implementation/BatchEndpointImpl.java | 16 +- .../implementation/CapabilityHostImpl.java | 129 + .../CapabilityHostsClientImpl.java | 696 +++ .../implementation/CapabilityHostsImpl.java | 145 + .../implementation/ComputeResourceImpl.java | 50 + .../implementation/ComputesClientImpl.java | 1021 +++- .../implementation/ComputesImpl.java | 74 +- ...ConnectionRaiBlocklistItemsClientImpl.java | 1551 +++++ .../ConnectionRaiBlocklistItemsImpl.java | 242 + ...RaiBlocklistItemsOperationsClientImpl.java | 347 ++ ...ectionRaiBlocklistItemsOperationsImpl.java | 51 + ...ctionRaiBlocklistOperationsClientImpl.java | 899 +++ .../ConnectionRaiBlocklistOperationsImpl.java | 172 + .../ConnectionRaiBlocklistsClientImpl.java | 330 ++ .../ConnectionRaiBlocklistsImpl.java | 51 + .../ConnectionRaiPoliciesClientImpl.java | 325 ++ .../ConnectionRaiPoliciesImpl.java | 51 + ...nnectionRaiPolicyOperationsClientImpl.java | 888 +++ .../ConnectionRaiPolicyOperationsImpl.java | 172 + .../implementation/ConnectionsClientImpl.java | 1567 ++++++ .../implementation/ConnectionsImpl.java | 234 + .../implementation/DatastoreImpl.java | 6 +- .../implementation/DatastoresClientImpl.java | 30 +- .../implementation/DatastoresImpl.java | 7 +- .../DeltaModelStatusResponseImpl.java | 57 + .../implementation/EndpointAuthTokenImpl.java | 8 +- ...ntResourcePropertiesBasicResourceImpl.java | 163 + .../EndpointDeploymentsClientImpl.java | 1318 +++++ .../EndpointDeploymentsImpl.java | 127 + .../implementation/EndpointKeysImpl.java | 39 + .../EndpointModelPropertiesImpl.java | 94 + .../implementation/EndpointModelsImpl.java | 48 + .../EndpointPropertiesBaseImpl.java | 26 +- ...ntResourcePropertiesBasicResourceImpl.java | 154 + .../implementation/EndpointsClientImpl.java | 1313 +++++ .../implementation/EndpointsImpl.java | 185 + .../ExternalFqdnResponseImpl.java | 6 +- .../implementation/GroupStatusImpl.java | 41 + .../implementation/InferenceEndpointImpl.java | 204 + .../InferenceEndpointsClientImpl.java | 1330 +++++ .../InferenceEndpointsImpl.java | 204 + .../implementation/InferenceGroupImpl.java | 232 + .../InferenceGroupsClientImpl.java | 2485 ++++++++ .../implementation/InferenceGroupsImpl.java | 271 + .../implementation/InferencePoolImpl.java | 222 + .../InferencePoolsClientImpl.java | 1261 +++++ .../implementation/InferencePoolsImpl.java | 159 + .../ListWorkspaceKeysResultImpl.java | 16 +- .../ManagedNetworkProvisionsClientImpl.java | 24 +- .../ManagedNetworkProvisionsImpl.java | 2 +- .../ManagedNetworkSettingsImpl.java | 15 + ...ManagedNetworkSettingsRulesClientImpl.java | 90 +- .../NotebookAccessTokenResultImpl.java | 28 +- .../NotebookResourceInfoImpl.java | 8 +- .../implementation/OnlineDeploymentImpl.java | 16 +- .../implementation/OnlineEndpointImpl.java | 16 +- .../PrivateEndpointConnectionImpl.java | 20 +- .../PrivateEndpointConnectionsClientImpl.java | 340 +- .../PrivateEndpointConnectionsImpl.java | 20 +- .../PrivateLinkResourceImpl.java | 93 + .../PrivateLinkResourcesClientImpl.java | 116 +- .../PrivateLinkResourcesImpl.java | 31 +- .../implementation/PtuQuotasClientImpl.java | 614 ++ .../implementation/PtuQuotasImpl.java | 78 + .../implementation/QuotasImpl.java | 2 +- ...cklistItemPropertiesBasicResourceImpl.java | 125 + ...iBlocklistPropertiesBasicResourceImpl.java | 120 + .../implementation/RaiPoliciesClientImpl.java | 324 ++ .../implementation/RaiPoliciesImpl.java | 51 + .../RaiPolicyOperationsClientImpl.java | 885 +++ .../RaiPolicyOperationsImpl.java | 91 + .../RaiPolicyPropertiesBasicResourceImpl.java | 120 + .../implementation/RegistryImpl.java | 10 + .../ServerlessEndpointImpl.java | 24 +- .../implementation/SkuResourceImpl.java | 8 +- ...mpl.java => UsageAndQuotaDetailsImpl.java} | 26 +- ...nnectionPropertiesV2BasicResourceImpl.java | 68 +- .../WorkspaceConnectionsClientImpl.java | 992 +++- .../WorkspaceConnectionsImpl.java | 59 +- .../implementation/WorkspaceImpl.java | 466 +- .../WorkspacePropertiesImpl.java | 203 +- ...rkspacePropertiesUpdateParametersImpl.java | 87 +- .../implementation/WorkspacesClientImpl.java | 1861 +++--- .../implementation/WorkspacesImpl.java | 131 +- ...AuthTypeWorkspaceConnectionProperties.java | 91 +- ...AuthTypeWorkspaceConnectionProperties.java | 92 +- .../models/AccountApiKeys.java | 33 + ...AuthTypeWorkspaceConnectionProperties.java | 98 +- .../AccountKeyDatastoreCredentials.java | 1 - .../models/AccountKeyDatastoreSecrets.java | 1 - .../models/ActualCapacityInfo.java | 220 + .../machinelearning/models/Aks.java | 94 +- .../models/AksComputeSecrets.java | 1 - .../machinelearning/models/AllFeatures.java | 1 - .../machinelearning/models/AllNodes.java | 1 - .../models/AllowedContentLevel.java | 56 + .../machinelearning/models/AmlCompute.java | 94 +- .../machinelearning/models/AmlToken.java | 1 - .../models/AmlTokenComputeIdentity.java | 1 - .../models/AnonymousAccessCredential.java | 1 - ...iKeyAuthWorkspaceConnectionProperties.java | 90 +- .../machinelearning/models/AssetBase.java | 63 +- .../models/AssetContainer.java | 17 +- .../machinelearning/models/AssetJobInput.java | 40 +- .../models/AssetJobOutput.java | 54 +- .../machinelearning/models/AuthMode.java | 46 + .../models/AutoForecastHorizon.java | 1 - .../machinelearning/models/AutoMLJob.java | 213 +- .../models/AutoMLVertical.java | 46 +- .../models/AutoNCrossValidations.java | 1 - .../models/AutoSeasonality.java | 1 - .../models/AutoTargetLags.java | 1 - .../models/AutoTargetRollingWindowSize.java | 1 - .../models/AvailableQuota.java | 26 + .../AvailableQuotaArmPaginatedResult.java | 131 + .../models/AvailableQuotaProperties.java | 93 + .../models/AzureBlobDatastore.java | 83 +- .../models/AzureDataLakeGen1Datastore.java | 101 +- .../models/AzureDataLakeGen2Datastore.java | 141 +- .../models/AzureDatastore.java | 48 +- .../models/AzureDevOpsWebhook.java | 1 - .../models/AzureFileDatastore.java | 120 +- .../models/AzureOpenAiFineTuning.java | 186 + .../models/AzureOpenAiHyperParameters.java | 157 + .../machinelearning/models/BanditPolicy.java | 63 +- .../models/BatchDeployment.java | 42 +- .../models/BatchDeploymentProperties.java | 202 +- ...mentTrackedResourceArmPaginatedResult.java | 52 +- .../machinelearning/models/BatchEndpoint.java | 42 +- .../models/BatchEndpointProperties.java | 58 +- ...ointTrackedResourceArmPaginatedResult.java | 52 +- ...elineComponentDeploymentConfiguration.java | 1 - .../models/BayesianSamplingAlgorithm.java | 1 - .../machinelearning/models/BindOptions.java | 2 +- .../BlobReferenceForConsumptionDto.java | 46 +- .../models/CapabilityHost.java | 189 + .../models/CapabilityHostKind.java | 46 + .../models/CapabilityHostProperties.java | 270 + .../CapabilityHostProvisioningState.java | 71 + .../models/CapabilityHosts.java | 118 + .../CategoricalDataDriftMetricThreshold.java | 4 +- ...CategoricalDataQualityMetricThreshold.java | 4 +- ...goricalPredictionDriftMetricThreshold.java | 4 +- .../CertificateDatastoreCredentials.java | 127 +- .../models/CertificateDatastoreSecrets.java | 1 - .../models/Classification.java | 268 +- .../ClassificationTrainingSettings.java | 56 +- .../models/CodeContainerProperties.java | 41 +- ...deContainerResourceArmPaginatedResult.java | 52 +- .../models/CodeVersionProperties.java | 31 +- ...CodeVersionResourceArmPaginatedResult.java | 52 +- ...eEndpointDeploymentResourceProperties.java | 200 + .../models/CognitiveServicesSku.java | 205 + .../machinelearning/models/Collection.java | 62 +- .../machinelearning/models/CommandJob.java | 295 +- .../models/CommandJobLimits.java | 1 - .../models/ComponentContainerProperties.java | 41 +- ...ntContainerResourceArmPaginatedResult.java | 52 +- .../models/ComponentVersionProperties.java | 31 +- ...nentVersionResourceArmPaginatedResult.java | 52 +- .../models/ComputeInstance.java | 94 +- .../ComputeInstanceAutologgerSettings.java | 96 + .../models/ComputeInstanceDataMount.java | 28 + .../models/ComputeInstanceProperties.java | 179 + .../models/ComputeInstanceState.java | 5 + .../models/ComputePowerAction.java | 2 +- .../models/ComputeResource.java | 108 + .../models/ComputeRuntimeDto.java | 2 +- .../models/ComputeTriggerType.java | 2 +- .../machinelearning/models/Computes.java | 148 + .../models/ConnectionCategory.java | 19 +- .../models/ConnectionRaiBlocklistItems.java | 199 + ...ConnectionRaiBlocklistItemsOperations.java | 47 + .../ConnectionRaiBlocklistOperations.java | 126 + .../models/ConnectionRaiBlocklists.java | 45 + .../models/ConnectionRaiPolicies.java | 43 + .../models/ConnectionRaiPolicyOperations.java | 126 + .../machinelearning/models/Connections.java | 214 + .../models/ContainerResourceRequirements.java | 56 +- .../models/ContainerResourceSettings.java | 46 +- .../machinelearning/models/ContentSafety.java | 29 + ...yEndpointDeploymentResourceProperties.java | 231 + ...ntentSafetyEndpointResourceProperties.java | 182 + .../models/ContentSafetyLevel.java | 51 + .../models/CosmosDbSettings.java | 6 +- .../models/CreateMonitorAction.java | 1 - .../machinelearning/models/CronTrigger.java | 1 - .../models/CustomForecastHorizon.java | 1 - ...stomKeysWorkspaceConnectionProperties.java | 90 +- .../models/CustomMetricThreshold.java | 50 +- .../models/CustomModelFineTuning.java | 186 + .../models/CustomModelJobInput.java | 41 +- .../models/CustomModelJobOutput.java | 55 +- .../models/CustomMonitoringSignal.java | 61 +- .../models/CustomNCrossValidations.java | 1 - .../models/CustomSeasonality.java | 1 - .../machinelearning/models/CustomService.java | 31 + .../models/CustomTargetLags.java | 1 - .../models/CustomTargetRollingWindowSize.java | 1 - .../machinelearning/models/DataCollector.java | 62 +- .../models/DataContainerProperties.java | 41 +- ...taContainerResourceArmPaginatedResult.java | 52 +- .../models/DataDriftMonitoringSignal.java | 93 +- .../machinelearning/models/DataFactory.java | 94 +- .../models/DataLakeAnalytics.java | 95 +- .../models/DataPathAssetReference.java | 47 +- .../models/DataQualityMonitoringSignal.java | 93 +- .../models/DataVersionBaseProperties.java | 31 +- ...VersionBaseResourceArmPaginatedResult.java | 52 +- .../machinelearning/models/Databricks.java | 94 +- .../models/DatabricksComputeSecrets.java | 1 - .../machinelearning/models/Datastore.java | 3 +- .../models/DatastoreProperties.java | 57 +- .../DatastoreResourceArmPaginatedResult.java | 52 +- .../machinelearning/models/Datastores.java | 3 +- .../models/DefaultActionType.java | 51 + .../DefaultResourceProvisioningState.java | 91 + .../models/DefaultScaleSettings.java | 1 - .../models/DeltaModelCurrentState.java | 149 + .../models/DeltaModelListRequest.java | 151 + .../models/DeltaModelModifyRequest.java | 154 + .../models/DeltaModelStatusRequest.java | 123 + .../models/DeltaModelStatusResponse.java | 56 + .../DeploymentModelVersionUpgradeOption.java | 59 + .../DeploymentResourceConfiguration.java | 1 - .../models/DestinationAsset.java | 58 +- .../models/DiagnoseRequestProperties.java | 264 +- .../models/DiagnoseWorkspaceParameters.java | 6 +- .../machinelearning/models/Docker.java | 8 +- .../models/DockerCredential.java | 47 +- .../models/EarlyTerminationPolicy.java | 46 +- .../models/EncryptionProperty.java | 147 +- .../machinelearning/models/Endpoint.java | 2 +- .../models/EndpointAuthToken.java | 14 +- .../models/EndpointDeploymentModel.java | 177 + .../EndpointDeploymentPropertiesBase.java | 106 +- .../EndpointDeploymentResourceProperties.java | 170 + ...oymentResourcePropertiesBasicResource.java | 223 + ...ertiesBasicResourceArmPaginatedResult.java | 134 + .../models/EndpointDeployments.java | 167 + .../machinelearning/models/EndpointKeys.java | 26 + .../EndpointModelDeprecationProperties.java | 129 + .../models/EndpointModelProperties.java | 101 + .../EndpointModelSkuCapacityProperties.java | 123 + .../models/EndpointModelSkuProperties.java | 250 + .../EndpointModelSkuRateLimitProperties.java | 158 + ...odelSkuRateLimitRulePatternProperties.java | 123 + ...dpointModelSkuRateLimitRuleProperties.java | 246 + .../models/EndpointModels.java | 35 + .../models/EndpointPropertiesBase.java | 33 +- .../models/EndpointResourceProperties.java | 362 ++ ...dpointResourcePropertiesBasicResource.java | 234 + ...ertiesBasicResourceArmPaginatedResult.java | 133 + .../models/EndpointScheduleAction.java | 1 - .../EndpointServiceConnectionStatus.java | 5 + .../machinelearning/models/EndpointType.java | 71 + .../machinelearning/models/Endpoints.java | 195 + .../EnvironmentContainerProperties.java | 41 +- ...ntContainerResourceArmPaginatedResult.java | 52 +- .../models/EnvironmentVariable.java | 8 +- .../models/EnvironmentVersionProperties.java | 204 +- ...mentVersionResourceArmPaginatedResult.java | 52 +- .../models/ExternalFqdnResponse.java | 2 +- ...atureAttributionDriftMonitoringSignal.java | 93 +- .../FeatureAttributionMetricThreshold.java | 50 +- .../models/FeatureProperties.java | 63 +- .../FeatureResourceArmPaginatedResult.java | 48 +- .../models/FeatureStoreSettings.java | 8 +- .../machinelearning/models/FeatureSubset.java | 1 - .../machinelearning/models/FeatureWindow.java | 56 +- .../models/FeaturesetContainerProperties.java | 41 +- ...etContainerResourceArmPaginatedResult.java | 52 +- .../FeaturesetVersionBackfillRequest.java | 136 +- .../models/FeaturesetVersionProperties.java | 135 +- ...esetVersionResourceArmPaginatedResult.java | 52 +- ...FeaturestoreEntityContainerProperties.java | 41 +- ...tyContainerResourceArmPaginatedResult.java | 54 +- .../FeaturestoreEntityVersionProperties.java | 63 +- ...tityVersionResourceArmPaginatedResult.java | 52 +- .../machinelearning/models/FineTuningJob.java | 386 ++ .../models/FineTuningTaskType.java | 96 + .../models/FineTuningVertical.java | 245 + .../machinelearning/models/FirewallSku.java | 51 + .../models/FixedInputData.java | 34 +- .../machinelearning/models/Forecasting.java | 286 +- .../models/ForecastingSettings.java | 356 +- .../models/ForecastingTrainingSettings.java | 56 +- .../machinelearning/models/FqdnEndpoints.java | 60 +- .../models/FqdnEndpointsProperties.java | 126 - .../models/FqdnEndpointsPropertyBag.java | 96 + .../models/FqdnOutboundRule.java | 5 +- .../GetBlobReferenceForConsumptionDto.java | 46 +- .../models/GridSamplingAlgorithm.java | 1 - .../models/GroupEnvironmentConfiguration.java | 228 + .../models/GroupModelConfiguration.java | 93 + .../machinelearning/models/GroupStatus.java | 40 + .../machinelearning/models/HDInsight.java | 94 +- .../models/IdAssetReference.java | 1 - .../models/IdentityForCmk.java | 10 +- .../models/IdleShutdownSetting.java | 93 + .../machinelearning/models/Image.java | 49 +- .../models/ImageClassification.java | 16 +- .../models/ImageClassificationBase.java | 17 +- .../models/ImageClassificationMultilabel.java | 16 +- .../machinelearning/models/ImageDetails.java | 155 + .../machinelearning/models/ImageInfo.java | 177 + .../models/ImageInstanceSegmentation.java | 16 +- .../models/ImageLimitSettings.java | 58 +- .../machinelearning/models/ImageMetadata.java | 19 + .../ImageModelDistributionSettings.java | 50 +- ...delDistributionSettingsClassification.java | 17 +- ...elDistributionSettingsObjectDetection.java | 17 +- .../models/ImageModelSettings.java | 148 +- .../ImageModelSettingsClassification.java | 50 +- .../ImageModelSettingsObjectDetection.java | 50 +- .../models/ImageObjectDetection.java | 16 +- .../models/ImageObjectDetectionBase.java | 17 +- .../models/ImageSweepSettings.java | 46 +- .../machinelearning/models/ImageType.java | 3 +- .../machinelearning/models/IndexColumn.java | 48 +- .../models/InferenceEndpoint.java | 375 ++ .../models/InferenceEndpointProperties.java | 232 + ...ointTrackedResourceArmPaginatedResult.java | 133 + .../models/InferenceEndpoints.java | 191 + .../models/InferenceGroup.java | 353 ++ .../models/InferenceGroupProperties.java | 236 + ...roupTrackedResourceArmPaginatedResult.java | 132 + .../models/InferenceGroups.java | 318 ++ .../machinelearning/models/InferencePool.java | 345 ++ .../models/InferencePoolProperties.java | 146 + ...PoolTrackedResourceArmPaginatedResult.java | 131 + .../models/InferencePools.java | 152 + .../machinelearning/models/IpRule.java | 97 + .../models/JobBaseProperties.java | 265 +- .../JobBaseResourceArmPaginatedResult.java | 48 +- .../models/JobResourceConfiguration.java | 99 +- .../machinelearning/models/JobResources.java | 96 + .../models/JobScheduleAction.java | 1 - .../machinelearning/models/JobService.java | 146 +- .../machinelearning/models/JobType.java | 5 + .../models/JupyterKernelConfig.java | 151 + ...roperties.java => KeyVaultProperties.java} | 103 +- .../machinelearning/models/Kubernetes.java | 94 +- .../models/KubernetesOnlineDeployment.java | 158 +- .../models/LakeHouseArtifact.java | 8 +- .../models/ListNotebookKeysResult.java | 4 +- .../models/ListStorageAccountKeysResult.java | 2 +- .../models/ListWorkspaceKeysResult.java | 30 +- .../models/LiteralJobInput.java | 1 - .../models/MLFlowModelJobInput.java | 41 +- .../models/MLFlowModelJobOutput.java | 55 +- .../machinelearning/models/MLTableData.java | 38 +- .../models/MLTableJobInput.java | 41 +- .../models/MLTableJobOutput.java | 55 +- .../models/ManagedComputeIdentity.java | 1 - .../models/ManagedIdentity.java | 1 - ...AuthTypeWorkspaceConnectionProperties.java | 92 +- .../models/ManagedIdentityCredential.java | 61 +- .../models/ManagedNetworkProvisions.java | 4 +- .../models/ManagedNetworkSettings.java | 15 + .../models/ManagedNetworkSettingsRules.java | 12 +- .../models/ManagedOnlineDeployment.java | 158 +- ...eEndpointDeploymentResourceProperties.java | 158 + ...nagedOnlineEndpointResourceProperties.java | 354 ++ .../models/ManagedPERequirement.java | 56 + .../models/ManagedPEStatus.java | 56 + ...anagedResourceGroupAssignedIdentities.java | 85 + .../models/ManagedResourceGroupSettings.java | 101 + .../models/MarketplacePlan.java | 34 +- .../MarketplaceSubscriptionProperties.java | 52 +- ...ubscriptionResourceArmPaginatedResult.java | 52 +- .../models/MaterializationSettings.java | 122 +- .../models/MedianStoppingPolicy.java | 17 +- .../models/MlflowAutologger.java | 51 + .../models/ModelContainerProperties.java | 41 +- ...elContainerResourceArmPaginatedResult.java | 52 +- .../models/ModelLifecycleStatus.java | 51 + .../machinelearning/models/ModelProvider.java | 51 + .../models/ModelVersionProperties.java | 87 +- ...odelVersionResourceArmPaginatedResult.java | 52 +- .../models/MonitorDefinition.java | 120 +- .../models/MonitorServerlessSparkCompute.java | 1 - .../models/MonitoringInputDataBase.java | 56 +- .../models/MonitoringTarget.java | 46 +- .../machinelearning/models/MountMode.java | 51 + .../machinelearning/models/Mpi.java | 1 - .../machinelearning/models/NetworkAcls.java | 129 + .../machinelearning/models/NlpVertical.java | 54 +- .../NlpVerticalFeaturizationSettings.java | 1 - .../models/NlpVerticalLimitSettings.java | 54 +- ...AuthTypeWorkspaceConnectionProperties.java | 91 +- .../models/NoneDatastoreCredentials.java | 1 - .../models/NotebookAccessTokenResult.java | 44 +- .../models/NotebookResourceInfo.java | 13 +- .../models/NotificationSetting.java | 54 +- .../NumericalDataDriftMetricThreshold.java | 4 +- .../NumericalDataQualityMetricThreshold.java | 4 +- ...mericalPredictionDriftMetricThreshold.java | 4 +- ...AuthTypeWorkspaceConnectionProperties.java | 92 +- .../machinelearning/models/Objective.java | 56 +- .../models/OneLakeDatastore.java | 80 +- .../models/OnlineDeployment.java | 42 +- .../models/OnlineDeploymentProperties.java | 334 +- ...mentTrackedResourceArmPaginatedResult.java | 52 +- .../models/OnlineEndpoint.java | 42 +- .../models/OnlineEndpointProperties.java | 144 +- ...ointTrackedResourceArmPaginatedResult.java | 52 +- .../models/OnlineRequestSettings.java | 64 +- ...IEndpointDeploymentResourceProperties.java | 229 + .../OpenAIEndpointResourceProperties.java | 181 + .../machinelearning/models/OperationName.java | 5 + .../models/OperationStatus.java | 5 + .../models/OsPatchingStatus.java | 212 + .../machinelearning/models/OutboundRule.java | 35 +- .../models/OutboundRuleBasicResource.java | 2 +- .../models/OutputPathAssetReference.java | 47 +- .../models/PackageDetails.java | 177 + ...ialMinimalTrackedResourceWithIdentity.java | 1 - .../PartialMinimalTrackedResourceWithSku.java | 1 - ...imalTrackedResourceWithSkuAndIdentity.java | 53 +- .../machinelearning/models/PartialSku.java | 142 +- ...AuthTypeWorkspaceConnectionProperties.java | 91 +- .../machinelearning/models/PatchStatus.java | 66 + .../machinelearning/models/PipelineJob.java | 179 +- .../models/PoolProvisioningState.java | 71 + .../PredictionDriftMonitoringSignal.java | 53 +- .../models/PrivateEndpointConnection.java | 117 +- .../models/PrivateEndpointConnections.java | 58 +- .../models/PrivateEndpointOutboundRule.java | 34 +- .../models/PrivateEndpointResource.java | 1 - ...rivateEndpointServiceConnectionStatus.java | 67 - .../models/PrivateLinkResource.java | 287 +- .../models/PrivateLinkResourceListResult.java | 90 +- .../models/PrivateLinkResources.java | 29 +- .../PrivateLinkServiceConnectionState.java | 64 +- .../machinelearning/models/ProbeSettings.java | 96 +- .../models/PropertiesBase.java | 127 + .../models/ProvisioningState.java | 3 +- .../models/PtuDeploymentUsage.java | 205 + .../machinelearning/models/PtuQuotas.java | 85 + .../models/PublicNetworkAccess.java | 51 - .../machinelearning/models/PyTorch.java | 1 - .../models/RaiBlocklistConfig.java | 121 + .../models/RaiBlocklistItemBulkRequest.java | 124 + .../models/RaiBlocklistItemProperties.java | 121 + ...iBlocklistItemPropertiesBasicResource.java | 154 + ...ertiesBasicResourceArmPaginatedResult.java | 133 + .../models/RaiBlocklistProperties.java | 93 + .../RaiBlocklistPropertiesBasicResource.java | 153 + ...ertiesBasicResourceArmPaginatedResult.java | 132 + .../machinelearning/models/RaiPolicies.java | 43 + .../models/RaiPolicyContentFilter.java | 207 + .../models/RaiPolicyContentSource.java | 51 + .../machinelearning/models/RaiPolicyMode.java | 56 + .../models/RaiPolicyOperations.java | 108 + .../models/RaiPolicyProperties.java | 252 + .../RaiPolicyPropertiesBasicResource.java | 153 + ...ertiesBasicResourceArmPaginatedResult.java | 132 + .../machinelearning/models/RaiPolicyType.java | 51 + .../models/RandomSamplingAlgorithm.java | 47 +- .../models/RecurrenceSchedule.java | 48 +- .../models/RecurrenceTrigger.java | 1 - .../RegenerateServiceAccountKeyContent.java | 95 + .../machinelearning/models/Registry.java | 25 +- .../models/RegistryListCredentialsResult.java | 34 +- ...RegistryPartialManagedServiceIdentity.java | 48 +- .../machinelearning/models/Regression.java | 240 +- .../models/RegressionTrainingSettings.java | 56 +- .../models/RequestConfiguration.java | 130 + .../machinelearning/models/ResizeSchema.java | 93 + .../machinelearning/models/ResourceBase.java | 48 +- .../models/RollingInputData.java | 73 +- ...AuthTypeWorkspaceConnectionProperties.java | 91 +- .../machinelearning/models/SasCredential.java | 1 - .../models/SasCredentialDto.java | 1 - .../models/SasDatastoreCredentials.java | 1 - .../models/SasDatastoreSecrets.java | 1 - .../models/ScaleUnitConfiguration.java | 125 + .../models/ScheduleProperties.java | 109 +- .../ScheduleResourceArmPaginatedResult.java | 48 +- .../models/ScriptReference.java | 6 +- .../machinelearning/models/SecretExpiry.java | 121 + .../models/ServerlessEndpoint.java | 66 +- ...ServerlessEndpointCapacityReservation.java | 133 + .../ServerlessEndpointContentSafety.java | 105 + .../ServerlessEndpointInferenceEndpoint.java | 122 + .../ServerlessEndpointModelSettings.java | 103 + .../models/ServerlessEndpointProperties.java | 138 +- .../ServerlessEndpointResourceProperties.java | 457 ++ ...ointTrackedResourceArmPaginatedResult.java | 52 +- .../models/ServerlessInferenceEndpoint.java | 26 +- .../ServerlessInferenceEndpointAuthMode.java | 10 + .../models/ServerlessOffer.java | 133 + .../models/ServiceAccountKeyName.java | 51 + .../ServiceManagedResourcesSettings.java | 6 +- ...AuthTypeWorkspaceConnectionProperties.java | 92 +- .../ServicePrincipalDatastoreCredentials.java | 101 +- .../ServicePrincipalDatastoreSecrets.java | 1 - .../models/ServiceTagDestination.java | 13 + .../models/ServiceTagOutboundRule.java | 5 +- .../models/SharedPrivateLinkResource.java | 48 +- .../machinelearning/models/SkuCapacity.java | 52 +- .../machinelearning/models/SkuResource.java | 14 +- .../models/SkuResourceArmPaginatedResult.java | 52 +- .../machinelearning/models/SparkJob.java | 349 +- .../models/SparkJobPythonEntry.java | 1 - .../models/SparkJobScalaEntry.java | 1 - ...hEndpointDeploymentResourceProperties.java | 229 + .../SpeechEndpointResourceProperties.java | 181 + .../models/StackEnsembleSettings.java | 58 +- .../models/StaticInputData.java | 85 +- .../models/StringArmPaginatedResult.java | 123 + .../models/StringKeyValuePair.java | 121 + .../machinelearning/models/SweepJob.java | 333 +- .../models/SweepJobLimits.java | 47 +- .../machinelearning/models/SynapseSpark.java | 94 +- .../models/SystemDatastoresAuthMode.java | 56 + .../machinelearning/models/TableVertical.java | 226 +- .../TableVerticalFeaturizationSettings.java | 131 +- .../models/TableVerticalLimitSettings.java | 172 +- .../TargetUtilizationScaleSettings.java | 101 +- .../machinelearning/models/TensorFlow.java | 47 +- .../models/TextClassification.java | 71 +- .../models/TextClassificationMultilabel.java | 73 +- .../machinelearning/models/TextNer.java | 70 +- .../machinelearning/models/TmpfsOptions.java | 2 +- .../models/TopNFeaturesByAttribution.java | 1 - .../models/TrainingSettings.java | 130 +- .../models/TrialComponent.java | 66 +- .../models/TritonModelJobInput.java | 41 +- .../models/TritonModelJobOutput.java | 55 +- .../models/TruncationSelectionPolicy.java | 17 +- .../models/UriFileDataVersion.java | 38 +- .../models/UriFileJobInput.java | 41 +- .../models/UriFileJobOutput.java | 55 +- .../models/UriFolderDataVersion.java | 38 +- .../models/UriFolderJobInput.java | 41 +- .../models/UriFolderJobOutput.java | 55 +- .../models/UsageAndQuotaDetails.java | 41 + ...sageAndQuotaDetailsArmPaginatedResult.java | 132 + .../machinelearning/models/UserIdentity.java | 1 - ...AuthTypeWorkspaceConnectionProperties.java | 92 +- .../machinelearning/models/ValueFormat.java | 46 - .../models/VirtualMachine.java | 94 +- .../models/VirtualMachineSecrets.java | 1 - .../models/VolumeDefinition.java | 2 +- .../machinelearning/models/VolumeOptions.java | 2 +- .../models/VulnerabilityDetails.java | 430 ++ .../models/VulnerabilityFindings.java | 294 + .../models/VulnerabilityRisk.java | 66 + .../machinelearning/models/Workspace.java | 1020 ++-- .../models/WorkspaceConnectionAccountKey.java | 2 +- .../WorkspaceConnectionManagedIdentity.java | 48 +- .../WorkspaceConnectionPropertiesV2.java | 180 +- ...ceConnectionPropertiesV2BasicResource.java | 74 +- ...tiesV2BasicResourceArmPaginatedResult.java | 46 +- .../WorkspaceConnectionUpdateParameter.java | 98 + .../WorkspaceConnectionUsernamePassword.java | 58 +- .../models/WorkspaceConnections.java | 100 +- .../models/WorkspaceListResult.java | 56 +- .../WorkspacePrivateEndpointResource.java | 101 + .../models/WorkspaceProperties.java | 278 +- .../WorkspacePropertiesUpdateParameters.java | 117 +- .../models/WorkspaceUpdateParameters.java | 425 +- .../machinelearning/models/Workspaces.java | 205 +- .../proxy-config.json | 2 +- ...BatchDeploymentsCreateOrUpdateSamples.java | 19 +- .../BatchDeploymentsDeleteSamples.java | 4 +- .../generated/BatchDeploymentsGetSamples.java | 4 +- .../BatchDeploymentsListSamples.java | 4 +- .../BatchDeploymentsUpdateSamples.java | 4 +- .../BatchEndpointsCreateOrUpdateSamples.java | 10 +- .../BatchEndpointsDeleteSamples.java | 4 +- .../generated/BatchEndpointsGetSamples.java | 4 +- .../BatchEndpointsListKeysSamples.java | 4 +- .../generated/BatchEndpointsListSamples.java | 4 +- .../BatchEndpointsUpdateSamples.java | 4 +- .../CapabilityHostsCreateOrUpdateSamples.java | 32 + .../CapabilityHostsDeleteSamples.java | 25 + .../generated/CapabilityHostsGetSamples.java | 25 + .../CodeContainersCreateOrUpdateSamples.java | 4 +- .../CodeContainersDeleteSamples.java | 4 +- .../generated/CodeContainersGetSamples.java | 4 +- .../generated/CodeContainersListSamples.java | 4 +- ...sCreateOrGetStartPendingUploadSamples.java | 4 +- .../CodeVersionsCreateOrUpdateSamples.java | 6 +- .../generated/CodeVersionsDeleteSamples.java | 4 +- .../generated/CodeVersionsGetSamples.java | 4 +- .../generated/CodeVersionsListSamples.java | 4 +- .../generated/CodeVersionsPublishSamples.java | 10 +- ...ponentContainersCreateOrUpdateSamples.java | 8 +- .../ComponentContainersDeleteSamples.java | 4 +- .../ComponentContainersGetSamples.java | 4 +- .../ComponentContainersListSamples.java | 4 +- ...omponentVersionsCreateOrUpdateSamples.java | 6 +- .../ComponentVersionsDeleteSamples.java | 4 +- .../ComponentVersionsGetSamples.java | 4 +- .../ComponentVersionsListSamples.java | 4 +- .../ComponentVersionsPublishSamples.java | 10 +- .../ComputeCreateOrUpdateSamples.java | 64 +- .../generated/ComputeDeleteSamples.java | 4 +- .../ComputeGetAllowedResizeSizesSamples.java | 26 + .../generated/ComputeGetSamples.java | 16 +- .../generated/ComputeListKeysSamples.java | 4 +- .../generated/ComputeListNodesSamples.java | 4 +- .../generated/ComputeListSamples.java | 4 +- .../generated/ComputeResizeSamples.java | 28 + .../generated/ComputeRestartSamples.java | 4 +- .../generated/ComputeStartSamples.java | 4 +- .../generated/ComputeStopSamples.java | 4 +- .../ComputeUpdateCustomServicesSamples.java | 70 + .../ComputeUpdateDataMountsSamples.java | 39 + ...mputeUpdateIdleShutdownSettingSamples.java | 29 + .../generated/ComputeUpdateSamples.java | 4 +- ...ectionCreateOrUpdateDeploymentSamples.java | 36 + .../ConnectionDeleteDeploymentSamples.java | 27 + .../ConnectionGetAllModelsSamples.java | 26 + .../ConnectionGetDeploymentSamples.java | 27 + .../generated/ConnectionGetModelsSamples.java | 26 + .../ConnectionListDeploymentsSamples.java | 27 + ...nectionRaiBlocklistItemAddBulkSamples.java | 37 + ...nnectionRaiBlocklistItemCreateSamples.java | 31 + ...tionRaiBlocklistItemDeleteBulkSamples.java | 33 + ...nnectionRaiBlocklistItemDeleteSamples.java | 27 + .../ConnectionRaiBlocklistItemGetSamples.java | 27 + ...RaiBlocklistItemsOperationListSamples.java | 26 + ...ionRaiBlocklistOperationCreateSamples.java | 30 + ...ionRaiBlocklistOperationDeleteSamples.java | 26 + ...ectionRaiBlocklistOperationGetSamples.java | 26 + .../ConnectionRaiBlocklistsListSamples.java | 25 + .../ConnectionRaiPoliciesListSamples.java | 25 + ...ectionRaiPolicyOperationCreateSamples.java | 49 + ...ectionRaiPolicyOperationDeleteSamples.java | 26 + ...onnectionRaiPolicyOperationGetSamples.java | 26 + .../DataContainersCreateOrUpdateSamples.java | 6 +- .../DataContainersDeleteSamples.java | 4 +- .../generated/DataContainersGetSamples.java | 4 +- .../generated/DataContainersListSamples.java | 4 +- .../DataVersionsCreateOrUpdateSamples.java | 6 +- .../generated/DataVersionsDeleteSamples.java | 4 +- .../generated/DataVersionsGetSamples.java | 4 +- .../generated/DataVersionsListSamples.java | 4 +- .../generated/DataVersionsPublishSamples.java | 10 +- .../DatastoresCreateOrUpdateSamples.java | 32 +- .../generated/DatastoresDeleteSamples.java | 4 +- .../generated/DatastoresGetSamples.java | 4 +- .../generated/DatastoresListSamples.java | 4 +- .../DatastoresListSecretsSamples.java | 10 +- .../EndpointCreateOrUpdateSamples.java | 32 + ...dpointDeploymentCreateOrUpdateSamples.java | 39 + .../EndpointDeploymentDeleteSamples.java | 27 + ...dpointDeploymentGetInWorkspaceSamples.java | 26 + .../EndpointDeploymentGetSamples.java | 26 + .../EndpointDeploymentListSamples.java | 26 + .../generated/EndpointGetModelsSamples.java | 25 + .../generated/EndpointGetSamples.java | 25 + .../generated/EndpointListKeysSamples.java | 25 + .../generated/EndpointListSamples.java | 28 + .../EndpointRegenerateKeysSamples.java | 31 + ...onmentContainersCreateOrUpdateSamples.java | 8 +- .../EnvironmentContainersDeleteSamples.java | 4 +- .../EnvironmentContainersGetSamples.java | 4 +- .../EnvironmentContainersListSamples.java | 4 +- ...ironmentVersionsCreateOrUpdateSamples.java | 10 +- .../EnvironmentVersionsDeleteSamples.java | 4 +- .../EnvironmentVersionsGetSamples.java | 4 +- .../EnvironmentVersionsListSamples.java | 4 +- .../EnvironmentVersionsPublishSamples.java | 10 +- .../generated/FeaturesGetSamples.java | 4 +- .../generated/FeaturesListSamples.java | 4 +- ...uresetContainersCreateOrUpdateSamples.java | 6 +- .../FeaturesetContainersDeleteSamples.java | 4 +- .../FeaturesetContainersGetEntitySamples.java | 4 +- .../FeaturesetContainersListSamples.java | 4 +- .../FeaturesetVersionsBackfillSamples.java | 21 +- ...aturesetVersionsCreateOrUpdateSamples.java | 43 +- .../FeaturesetVersionsDeleteSamples.java | 4 +- .../FeaturesetVersionsGetSamples.java | 4 +- .../FeaturesetVersionsListSamples.java | 4 +- ...EntityContainersCreateOrUpdateSamples.java | 6 +- ...urestoreEntityContainersDeleteSamples.java | 4 +- ...storeEntityContainersGetEntitySamples.java | 4 +- ...aturestoreEntityContainersListSamples.java | 4 +- ...reEntityVersionsCreateOrUpdateSamples.java | 10 +- ...aturestoreEntityVersionsDeleteSamples.java | 4 +- .../FeaturestoreEntityVersionsGetSamples.java | 4 +- ...FeaturestoreEntityVersionsListSamples.java | 4 +- ...ferenceEndpointsCreateOrUpdateSamples.java | 71 + .../InferenceEndpointsDeleteSamples.java | 26 + .../InferenceEndpointsGetSamples.java | 27 + .../InferenceEndpointsListSamples.java | 29 + .../InferenceEndpointsUpdateSamples.java | 33 + .../InferenceGroupsCreateOrUpdateSamples.java | 91 + .../InferenceGroupsDeleteSamples.java | 26 + ...roupsGetDeltaModelsStatusAsyncSamples.java | 32 + .../generated/InferenceGroupsGetSamples.java | 26 + .../InferenceGroupsGetStatusSamples.java | 26 + ...enceGroupsListDeltaModelsAsyncSamples.java | 32 + .../generated/InferenceGroupsListSamples.java | 29 + .../InferenceGroupsListSkusSamples.java | 26 + ...ceGroupsModifyDeltaModelsAsyncSamples.java | 33 + .../InferenceGroupsUpdateSamples.java | 53 + .../InferencePoolsCreateOrUpdateSamples.java | 67 + .../InferencePoolsDeleteSamples.java | 25 + .../generated/InferencePoolsGetSamples.java | 26 + .../generated/InferencePoolsListSamples.java | 29 + .../InferencePoolsUpdateSamples.java | 62 + .../generated/JobsCancelSamples.java | 4 +- .../generated/JobsCreateOrUpdateSamples.java | 161 +- .../generated/JobsDeleteSamples.java | 4 +- .../generated/JobsGetSamples.java | 30 +- .../generated/JobsListSamples.java | 34 +- ...visionsProvisionManagedNetworkSamples.java | 4 +- ...workSettingsRuleCreateOrUpdateSamples.java | 4 +- ...nagedNetworkSettingsRuleDeleteSamples.java | 4 +- .../ManagedNetworkSettingsRuleGetSamples.java | 4 +- ...ManagedNetworkSettingsRuleListSamples.java | 4 +- ...aceSubscriptionsCreateOrUpdateSamples.java | 4 +- ...MarketplaceSubscriptionsDeleteSamples.java | 4 +- .../MarketplaceSubscriptionsGetSamples.java | 4 +- .../MarketplaceSubscriptionsListSamples.java | 4 +- .../ModelContainersCreateOrUpdateSamples.java | 4 +- .../ModelContainersDeleteSamples.java | 4 +- .../generated/ModelContainersGetSamples.java | 4 +- .../generated/ModelContainersListSamples.java | 4 +- .../ModelVersionsCreateOrUpdateSamples.java | 6 +- .../generated/ModelVersionsDeleteSamples.java | 4 +- .../generated/ModelVersionsGetSamples.java | 4 +- .../generated/ModelVersionsListSamples.java | 4 +- .../ModelVersionsPublishSamples.java | 10 +- ...nlineDeploymentsCreateOrUpdateSamples.java | 72 +- .../OnlineDeploymentsDeleteSamples.java | 4 +- .../OnlineDeploymentsGetLogsSamples.java | 4 +- .../OnlineDeploymentsGetSamples.java | 8 +- .../OnlineDeploymentsListSamples.java | 4 +- .../OnlineDeploymentsListSkusSamples.java | 8 +- .../OnlineDeploymentsUpdateSamples.java | 24 +- .../OnlineEndpointsCreateOrUpdateSamples.java | 10 +- .../OnlineEndpointsDeleteSamples.java | 4 +- .../generated/OnlineEndpointsGetSamples.java | 4 +- .../OnlineEndpointsGetTokenSamples.java | 4 +- .../OnlineEndpointsListKeysSamples.java | 4 +- .../generated/OnlineEndpointsListSamples.java | 4 +- .../OnlineEndpointsRegenerateKeysSamples.java | 4 +- .../OnlineEndpointsUpdateSamples.java | 4 +- .../generated/OperationsListSamples.java | 4 +- ...pointConnectionsCreateOrUpdateSamples.java | 10 +- ...ivateEndpointConnectionsDeleteSamples.java | 8 +- .../PrivateEndpointConnectionsGetSamples.java | 4 +- ...PrivateEndpointConnectionsListSamples.java | 4 +- .../PrivateLinkResourcesListSamples.java | 6 +- .../PtuQuotaGetAvailableSamples.java | 25 + .../PtuQuotaListAvailableSamples.java | 25 + .../generated/PtuQuotaListSamples.java | 25 + .../generated/QuotasListSamples.java | 4 +- .../generated/QuotasUpdateSamples.java | 4 +- .../generated/RaiPoliciesListSamples.java | 25 + .../RaiPolicyOperationCreateSamples.java | 50 + .../RaiPolicyOperationDeleteSamples.java | 26 + .../RaiPolicyOperationGetSamples.java | 26 + .../RegistriesCreateOrUpdateSamples.java | 8 +- .../generated/RegistriesDeleteSamples.java | 4 +- .../RegistriesGetByResourceGroupSamples.java | 8 +- .../RegistriesListByResourceGroupSamples.java | 8 +- .../generated/RegistriesListSamples.java | 4 +- .../RegistriesRemoveRegionsSamples.java | 4 +- .../generated/RegistriesUpdateSamples.java | 24 +- ...ryCodeContainersCreateOrUpdateSamples.java | 4 +- .../RegistryCodeContainersDeleteSamples.java | 4 +- .../RegistryCodeContainersGetSamples.java | 4 +- .../RegistryCodeContainersListSamples.java | 4 +- ...sCreateOrGetStartPendingUploadSamples.java | 4 +- ...stryCodeVersionsCreateOrUpdateSamples.java | 6 +- .../RegistryCodeVersionsDeleteSamples.java | 4 +- .../RegistryCodeVersionsGetSamples.java | 4 +- .../RegistryCodeVersionsListSamples.java | 4 +- ...ponentContainersCreateOrUpdateSamples.java | 8 +- ...istryComponentContainersDeleteSamples.java | 4 +- ...RegistryComponentContainersGetSamples.java | 4 +- ...egistryComponentContainersListSamples.java | 4 +- ...omponentVersionsCreateOrUpdateSamples.java | 6 +- ...egistryComponentVersionsDeleteSamples.java | 4 +- .../RegistryComponentVersionsGetSamples.java | 4 +- .../RegistryComponentVersionsListSamples.java | 4 +- ...ryDataContainersCreateOrUpdateSamples.java | 6 +- .../RegistryDataContainersDeleteSamples.java | 4 +- .../RegistryDataContainersGetSamples.java | 4 +- .../RegistryDataContainersListSamples.java | 4 +- ...aReferencesGetBlobReferenceSasSamples.java | 4 +- ...sCreateOrGetStartPendingUploadSamples.java | 4 +- ...stryDataVersionsCreateOrUpdateSamples.java | 8 +- .../RegistryDataVersionsDeleteSamples.java | 4 +- .../RegistryDataVersionsGetSamples.java | 4 +- .../RegistryDataVersionsListSamples.java | 4 +- ...onmentContainersCreateOrUpdateSamples.java | 8 +- ...tryEnvironmentContainersDeleteSamples.java | 4 +- ...gistryEnvironmentContainersGetSamples.java | 4 +- ...istryEnvironmentContainersListSamples.java | 4 +- ...ironmentVersionsCreateOrUpdateSamples.java | 10 +- ...istryEnvironmentVersionsDeleteSamples.java | 4 +- ...RegistryEnvironmentVersionsGetSamples.java | 4 +- ...egistryEnvironmentVersionsListSamples.java | 4 +- ...yModelContainersCreateOrUpdateSamples.java | 4 +- .../RegistryModelContainersDeleteSamples.java | 4 +- .../RegistryModelContainersGetSamples.java | 4 +- .../RegistryModelContainersListSamples.java | 4 +- ...sCreateOrGetStartPendingUploadSamples.java | 4 +- ...tryModelVersionsCreateOrUpdateSamples.java | 6 +- .../RegistryModelVersionsDeleteSamples.java | 4 +- .../RegistryModelVersionsGetSamples.java | 4 +- .../RegistryModelVersionsListSamples.java | 4 +- .../SchedulesCreateOrUpdateSamples.java | 16 +- .../generated/SchedulesDeleteSamples.java | 4 +- .../generated/SchedulesGetSamples.java | 4 +- .../generated/SchedulesListSamples.java | 4 +- ...verlessEndpointsCreateOrUpdateSamples.java | 15 +- .../ServerlessEndpointsDeleteSamples.java | 4 +- .../ServerlessEndpointsGetSamples.java | 4 +- .../ServerlessEndpointsListKeysSamples.java | 4 +- .../ServerlessEndpointsListSamples.java | 4 +- ...verlessEndpointsRegenerateKeysSamples.java | 4 +- .../ServerlessEndpointsUpdateSamples.java | 14 +- .../generated/UsagesListSamples.java | 4 +- .../VirtualMachineSizesListSamples.java | 4 +- .../WorkspaceConnectionsCreateSamples.java | 6 +- .../WorkspaceConnectionsDeleteSamples.java | 4 +- .../WorkspaceConnectionsGetSamples.java | 4 +- .../WorkspaceConnectionsListSamples.java | 6 +- ...orkspaceConnectionsListSecretsSamples.java | 4 +- ...spaceConnectionsTestConnectionSamples.java | 36 + .../WorkspaceConnectionsUpdateSamples.java | 56 + .../WorkspaceFeaturesListSamples.java | 4 +- .../WorkspacesCreateOrUpdateSamples.java | 34 +- .../generated/WorkspacesDeleteSamples.java | 4 +- .../generated/WorkspacesDiagnoseSamples.java | 23 +- .../WorkspacesGetByResourceGroupSamples.java | 4 +- .../WorkspacesListByResourceGroupSamples.java | 6 +- .../generated/WorkspacesListKeysSamples.java | 4 +- ...kspacesListNotebookAccessTokenSamples.java | 4 +- .../WorkspacesListNotebookKeysSamples.java | 4 +- ...ndNetworkDependenciesEndpointsSamples.java | 4 +- .../generated/WorkspacesListSamples.java | 6 +- ...rkspacesListStorageAccountKeysSamples.java | 4 +- .../WorkspacesPrepareNotebookSamples.java | 4 +- .../WorkspacesResyncKeysSamples.java | 4 +- .../generated/WorkspacesUpdateSamples.java | 8 +- ...ypeWorkspaceConnectionPropertiesTests.java | 66 - .../generated/AcrDetailsTests.java | 40 - .../AksNetworkingConfigurationTests.java | 35 - .../generated/AllFeaturesTests.java | 21 - .../generated/AllNodesTests.java | 21 - .../AmlComputeNodeInformationTests.java | 23 - .../AmlComputeNodesInformationTests.java | 23 - .../AmlTokenComputeIdentityTests.java | 22 - .../generated/AmlTokenTests.java | 21 - .../generated/AmlUserFeatureInnerTests.java | 31 - .../generated/ArmResourceIdTests.java | 24 - .../generated/AssetBaseTests.java | 53 - .../generated/AssetContainerTests.java | 49 - .../generated/AssetJobInputTests.java | 28 - .../generated/AssetJobOutputTests.java | 28 - .../generated/AssetReferenceBaseTests.java | 22 - .../generated/AssignedUserTests.java | 27 - .../generated/AutoForecastHorizonTests.java | 21 - .../generated/AutoMLJobTests.java | 160 - .../generated/AutoMLVerticalTests.java | 41 - .../generated/AutoNCrossValidationsTests.java | 22 - .../generated/AutoPausePropertiesTests.java | 27 - .../generated/AutoScalePropertiesTests.java | 31 - .../generated/AutoSeasonalityTests.java | 21 - .../generated/AutoTargetLagsTests.java | 21 - .../AutoTargetRollingWindowSizeTests.java | 22 - .../generated/AzureDatastoreTests.java | 28 - .../generated/AzureDevOpsWebhookTests.java | 26 - .../generated/BanditPolicyTests.java | 35 - .../BatchDeploymentConfigurationTests.java | 23 - .../BatchDeploymentsDeleteMockTests.java | 34 - .../generated/BatchEndpointDefaultsTests.java | 25 - .../BatchEndpointsDeleteMockTests.java | 33 - ...ComponentDeploymentConfigurationTests.java | 52 - .../generated/BatchRetrySettingsTests.java | 29 - .../BayesianSamplingAlgorithmTests.java | 22 - .../generated/BindOptionsTests.java | 31 - .../generated/BuildContextTests.java | 28 - ...egoricalDataDriftMetricThresholdTests.java | 32 - ...oricalDataQualityMetricThresholdTests.java | 32 - ...alPredictionDriftMetricThresholdTests.java | 32 - .../generated/ClassificationTests.java | 220 - .../ClassificationTrainingSettingsTests.java | 66 - .../ClusterUpdateParametersTests.java | 38 - .../ClusterUpdatePropertiesTests.java | 38 - .../generated/CodeContainerInnerTests.java | 52 - .../CodeContainerPropertiesTests.java | 49 - ...tainerResourceArmPaginatedResultTests.java | 67 - ...rsCreateOrUpdateWithResponseMockTests.java | 63 - ...ContainersDeleteWithResponseMockTests.java | 34 - ...odeContainersGetWithResponseMockTests.java | 42 - .../CodeContainersListMockTests.java | 42 - ...deVersionsDeleteWithResponseMockTests.java | 34 - .../CodeVersionsPublishMockTests.java | 39 - .../generated/CollectionTests.java | 36 - .../generated/ColumnTransformerTests.java | 29 - .../generated/CommandJobLimitsTests.java | 26 - .../ComponentContainerInnerTests.java | 51 - .../ComponentContainerPropertiesTests.java | 49 - ...tainerResourceArmPaginatedResultTests.java | 63 - ...rsCreateOrUpdateWithResponseMockTests.java | 62 - ...ContainersDeleteWithResponseMockTests.java | 34 - ...entContainersGetWithResponseMockTests.java | 42 - .../ComponentContainersListMockTests.java | 43 - .../generated/ComponentVersionInnerTests.java | 56 - .../ComponentVersionPropertiesTests.java | 54 - ...ersionResourceArmPaginatedResultTests.java | 74 - ...nsCreateOrUpdateWithResponseMockTests.java | 66 - ...ntVersionsDeleteWithResponseMockTests.java | 35 - ...onentVersionsGetWithResponseMockTests.java | 44 - .../ComponentVersionsListMockTests.java | 45 - .../ComponentVersionsPublishMockTests.java | 39 - .../ComputeInstanceApplicationTests.java | 29 - ...uteInstanceConnectivityEndpointsTests.java | 23 - .../ComputeInstanceContainerTests.java | 43 - .../ComputeInstanceCreatedByTests.java | 23 - .../ComputeInstanceDataDiskTests.java | 37 - .../ComputeInstanceDataMountTests.java | 54 - .../ComputeInstanceEnvironmentInfoTests.java | 28 - .../ComputeInstanceLastOperationTests.java | 39 - .../ComputeInstanceVersionTests.java | 25 - .../ComputeRecurrenceScheduleTests.java | 39 - .../generated/ComputeRuntimeDtoTests.java | 25 - .../generated/ComputeSchedulesTests.java | 108 - .../generated/ComputeSecretsInnerTests.java | 22 - .../ComputeStartStopScheduleTests.java | 84 - .../generated/ComputesDeleteMockTests.java | 36 - ...ComputesListKeysWithResponseMockTests.java | 36 - .../generated/ComputesListNodesMockTests.java | 37 - .../ContainerResourceRequirementsTests.java | 41 - .../ContainerResourceSettingsTests.java | 31 - .../generated/ContentSafetyTests.java | 26 - .../generated/CosmosDbSettingsTests.java | 25 - .../generated/CreateMonitorActionTests.java | 93 - .../machinelearning/generated/CronTests.java | 30 - .../generated/CronTriggerTests.java | 35 - .../generated/CustomForecastHorizonTests.java | 25 - .../generated/CustomMetricThresholdTests.java | 31 - .../generated/CustomModelJobInputTests.java | 33 - .../generated/CustomModelJobOutputTests.java | 33 - .../CustomMonitoringSignalTests.java | 83 - .../CustomNCrossValidationsTests.java | 25 - .../generated/CustomSeasonalityTests.java | 25 - .../generated/CustomServiceTests.java | 169 - .../generated/CustomTargetLagsTests.java | 26 - .../CustomTargetRollingWindowSizeTests.java | 25 - .../generated/DataCollectorTests.java | 64 - .../generated/DataContainerInnerTests.java | 55 - .../DataContainerPropertiesTests.java | 53 - ...tainerResourceArmPaginatedResultTests.java | 84 - ...rsCreateOrUpdateWithResponseMockTests.java | 65 - ...ContainersDeleteWithResponseMockTests.java | 34 - ...ataContainersGetWithResponseMockTests.java | 44 - .../DataContainersListMockTests.java | 45 - .../DataDriftMetricThresholdBaseTests.java | 28 - .../DataDriftMonitoringSignalTests.java | 97 - ...ataLakeAnalyticsSchemaPropertiesTests.java | 26 - .../DataLakeAnalyticsSchemaTests.java | 28 - .../DataPathAssetReferenceTests.java | 30 - .../DataQualityMetricThresholdBaseTests.java | 28 - .../DataQualityMonitoringSignalTests.java | 104 - .../generated/DataVersionBaseInnerTests.java | 58 - .../DataVersionBasePropertiesTests.java | 55 - ...onBaseResourceArmPaginatedResultTests.java | 77 - ...nsCreateOrUpdateWithResponseMockTests.java | 66 - ...taVersionsDeleteWithResponseMockTests.java | 34 - .../DataVersionsGetWithResponseMockTests.java | 44 - .../generated/DataVersionsListMockTests.java | 46 - .../DataVersionsPublishMockTests.java | 39 - ...DatastoresDeleteWithResponseMockTests.java | 34 - .../generated/DefaultScaleSettingsTests.java | 22 - .../generated/DeploymentLogsInnerTests.java | 24 - .../generated/DeploymentLogsRequestTests.java | 30 - .../DeploymentResourceConfigurationTests.java | 44 - .../generated/DestinationAssetTests.java | 32 - .../DistributionConfigurationTests.java | 22 - .../generated/DockerTests.java | 40 - .../EarlyTerminationPolicyTests.java | 29 - .../EndpointScheduleActionTests.java | 25 - .../generated/EndpointTests.java | 39 - .../EnvironmentContainerInnerTests.java | 52 - .../EnvironmentContainerPropertiesTests.java | 50 - ...tainerResourceArmPaginatedResultTests.java | 68 - ...rsCreateOrUpdateWithResponseMockTests.java | 62 - ...ContainersDeleteWithResponseMockTests.java | 34 - ...entContainersGetWithResponseMockTests.java | 42 - .../EnvironmentContainersListMockTests.java | 43 - .../generated/EnvironmentVariableTests.java | 45 - .../EnvironmentVersionInnerTests.java | 96 - .../EnvironmentVersionPropertiesTests.java | 93 - ...ersionResourceArmPaginatedResultTests.java | 108 - ...nsCreateOrUpdateWithResponseMockTests.java | 92 - ...ntVersionsDeleteWithResponseMockTests.java | 34 - ...nmentVersionsGetWithResponseMockTests.java | 58 - .../EnvironmentVersionsListMockTests.java | 66 - .../EnvironmentVersionsPublishMockTests.java | 39 - .../generated/EstimatedVMPriceTests.java | 34 - .../generated/EstimatedVMPricesTests.java | 54 - .../ExternalFqdnResponseInnerTests.java | 60 - ...AttributionDriftMonitoringSignalTests.java | 115 - ...eatureAttributionMetricThresholdTests.java | 33 - .../FeatureImportanceSettingsTests.java | 30 - .../generated/FeatureInnerTests.java | 54 - .../generated/FeaturePropertiesTests.java | 54 - ...eatureResourceArmPaginatedResultTests.java | 74 - .../generated/FeatureStoreSettingsTests.java | 34 - .../generated/FeatureSubsetTests.java | 29 - .../generated/FeatureWindowTests.java | 30 - .../FeaturesGetWithResponseMockTests.java | 45 - .../generated/FeaturesListMockTests.java | 46 - .../FeaturesetContainerInnerTests.java | 52 - .../FeaturesetContainerPropertiesTests.java | 49 - ...tainerResourceArmPaginatedResultTests.java | 64 - ...esetContainersCreateOrUpdateMockTests.java | 63 - .../FeaturesetContainersDeleteMockTests.java | 34 - ...tainersGetEntityWithResponseMockTests.java | 42 - .../FeaturesetContainersListMockTests.java | 45 - .../FeaturesetSpecificationTests.java | 25 - ...FeaturesetVersionBackfillRequestTests.java | 77 - ...esetVersionBackfillResponseInnerTests.java | 28 - .../FeaturesetVersionInnerTests.java | 147 - .../FeaturesetVersionPropertiesTests.java | 128 - ...ersionResourceArmPaginatedResultTests.java | 191 - .../FeaturesetVersionsBackfillMockTests.java | 69 - ...uresetVersionsCreateOrUpdateMockTests.java | 124 - .../FeaturesetVersionsDeleteMockTests.java | 34 - ...resetVersionsGetWithResponseMockTests.java | 73 - .../FeaturesetVersionsListMockTests.java | 80 - ...FeaturestoreEntityContainerInnerTests.java | 51 - ...restoreEntityContainerPropertiesTests.java | 50 - ...tainerResourceArmPaginatedResultTests.java | 79 - ...tityContainersCreateOrUpdateMockTests.java | 63 - ...estoreEntityContainersDeleteMockTests.java | 34 - ...tainersGetEntityWithResponseMockTests.java | 43 - ...urestoreEntityContainersListMockTests.java | 44 - .../FeaturestoreEntityVersionInnerTests.java | 66 - ...turestoreEntityVersionPropertiesTests.java | 67 - ...ersionResourceArmPaginatedResultTests.java | 112 - ...EntityVersionsCreateOrUpdateMockTests.java | 77 - ...urestoreEntityVersionsDeleteMockTests.java | 34 - ...ntityVersionsGetWithResponseMockTests.java | 47 - ...aturestoreEntityVersionsListMockTests.java | 51 - .../generated/FeaturizationSettingsTests.java | 25 - .../generated/FixedInputDataTests.java | 51 - .../generated/FlavorDataTests.java | 41 - .../generated/ForecastHorizonTests.java | 21 - .../generated/ForecastingSettingsTests.java | 63 - .../generated/ForecastingTests.java | 261 - .../ForecastingTrainingSettingsTests.java | 63 - .../generated/FqdnEndpointDetailTests.java | 24 - .../generated/FqdnEndpointTests.java | 32 - .../FqdnEndpointsPropertiesTests.java | 42 - .../generated/FqdnEndpointsTests.java | 44 - .../generated/FqdnOutboundRuleTests.java | 35 - .../GetBlobReferenceSasRequestDtoTests.java | 28 - .../generated/GridSamplingAlgorithmTests.java | 22 - .../generated/IdAssetReferenceTests.java | 25 - .../generated/IdentityConfigurationTests.java | 22 - .../generated/IdentityForCmkTests.java | 24 - .../ImageClassificationBaseTests.java | 312 - .../ImageClassificationMultilabelTests.java | 393 -- .../generated/ImageClassificationTests.java | 299 - .../ImageInstanceSegmentationTests.java | 394 -- .../generated/ImageLimitSettingsTests.java | 33 - .../generated/ImageMetadataTests.java | 32 - ...stributionSettingsClassificationTests.java | 120 - ...tributionSettingsObjectDetectionTests.java | 147 - .../ImageModelDistributionSettingsTests.java | 107 - ...ImageModelSettingsClassificationTests.java | 141 - ...mageModelSettingsObjectDetectionTests.java | 170 - .../generated/ImageModelSettingsTests.java | 129 - .../ImageObjectDetectionBaseTests.java | 456 -- .../generated/ImageObjectDetectionTests.java | 353 -- .../generated/ImageSweepSettingsTests.java | 34 - .../machinelearning/generated/ImageTests.java | 44 - .../generated/ImageVerticalTests.java | 63 - .../generated/IndexColumnTests.java | 28 - .../InferenceContainerPropertiesTests.java | 40 - .../InstanceTypeSchemaResourcesTests.java | 45 - .../generated/InstanceTypeSchemaTests.java | 49 - .../generated/JobBaseInnerTests.java | 114 - .../generated/JobBasePropertiesTests.java | 106 - ...obBaseResourceArmPaginatedResultTests.java | 146 - .../generated/JobInputTests.java | 25 - .../generated/JobLimitsTests.java | 26 - .../generated/JobOutputTests.java | 25 - .../JobResourceConfigurationTests.java | 51 - .../generated/JobScheduleActionTests.java | 121 - .../generated/JobServiceTests.java | 51 - .../generated/JobsCancelMockTests.java | 33 - ...bsCreateOrUpdateWithResponseMockTests.java | 117 - .../generated/JobsDeleteMockTests.java | 33 - .../JobsGetWithResponseMockTests.java | 57 - .../generated/JobsListMockTests.java | 61 - .../generated/KubernetesPropertiesTests.java | 74 - .../generated/KubernetesSchemaTests.java | 79 - .../generated/LakeHouseArtifactTests.java | 25 - .../ListAmlUserFeatureResultTests.java | 23 - .../generated/ListUsagesResultTests.java | 23 - .../generated/ListWorkspaceQuotasTests.java | 23 - .../generated/LiteralJobInputTests.java | 28 - .../generated/MLFlowModelJobInputTests.java | 33 - .../generated/MLFlowModelJobOutputTests.java | 33 - .../generated/MLTableDataTests.java | 61 - .../generated/MLTableJobInputTests.java | 33 - .../generated/MLTableJobOutputTests.java | 33 - .../ManagedComputeIdentityTests.java | 47 - .../generated/ManagedIdentityTests.java | 34 - .../ManagedNetworkProvisionOptionsTests.java | 25 - ...nagedNetworkProvisionStatusInnerTests.java | 30 - ...sionsProvisionManagedNetworkMockTests.java | 41 - .../ManagedNetworkSettingsInnerTests.java | 59 - ...kSettingsRulesCreateOrUpdateMockTests.java | 45 - ...edNetworkSettingsRulesDeleteMockTests.java | 34 - ...SettingsRulesGetWithResponseMockTests.java | 42 - ...agedNetworkSettingsRulesListMockTests.java | 42 - .../ManagedServiceIdentityTests.java | 43 - .../generated/MarketplacePlanTests.java | 23 - .../MarketplaceSubscriptionInnerTests.java | 28 - ...arketplaceSubscriptionPropertiesTests.java | 26 - ...iptionResourceArmPaginatedResultTests.java | 38 - ...eSubscriptionsCreateOrUpdateMockTests.java | 42 - ...SubscriptionsGetWithResponseMockTests.java | 39 - ...MarketplaceSubscriptionsListMockTests.java | 39 - .../MaterializationComputeResourceTests.java | 25 - .../MaterializationSettingsTests.java | 98 - .../generated/MedianStoppingPolicyTests.java | 30 - .../generated/ModelContainerInnerTests.java | 51 - .../ModelContainerPropertiesTests.java | 49 - ...tainerResourceArmPaginatedResultTests.java | 66 - ...rsCreateOrUpdateWithResponseMockTests.java | 62 - ...ContainersDeleteWithResponseMockTests.java | 33 - ...delContainersGetWithResponseMockTests.java | 42 - .../ModelContainersListMockTests.java | 43 - .../generated/ModelSettingsTests.java | 24 - .../generated/ModelVersionInnerTests.java | 70 - .../ModelVersionPropertiesTests.java | 68 - ...ersionResourceArmPaginatedResultTests.java | 91 - ...nsCreateOrUpdateWithResponseMockTests.java | 82 - ...elVersionsDeleteWithResponseMockTests.java | 34 - ...ModelVersionsGetWithResponseMockTests.java | 49 - .../generated/ModelVersionsListMockTests.java | 51 - .../ModelVersionsPublishMockTests.java | 39 - .../MonitorComputeConfigurationBaseTests.java | 23 - .../MonitorComputeIdentityBaseTests.java | 23 - .../generated/MonitorDefinitionTests.java | 79 - ...MonitorEmailNotificationSettingsTests.java | 26 - .../MonitorNotificationSettingsTests.java | 30 - .../MonitorServerlessSparkComputeTests.java | 32 - .../MonitoringFeatureFilterBaseTests.java | 22 - .../MonitoringInputDataBaseTests.java | 50 - .../generated/MonitoringSignalBaseTests.java | 48 - .../generated/MonitoringTargetTests.java | 33 - .../generated/MonitoringThresholdTests.java | 25 - .../machinelearning/generated/MpiTests.java | 25 - .../generated/NCrossValidationsTests.java | 22 - ...NlpVerticalFeaturizationSettingsTests.java | 25 - .../NlpVerticalLimitSettingsTests.java | 33 - .../generated/NlpVerticalTests.java | 50 - .../generated/NodeStateCountsTests.java | 23 - .../machinelearning/generated/NodesTests.java | 21 - ...ypeWorkspaceConnectionPropertiesTests.java | 67 - .../generated/NotificationSettingTests.java | 53 - ...umericalDataDriftMetricThresholdTests.java | 32 - ...ericalDataQualityMetricThresholdTests.java | 32 - ...alPredictionDriftMetricThresholdTests.java | 32 - .../generated/ObjectiveTests.java | 28 - .../generated/OneLakeArtifactTests.java | 26 - .../OnlineDeploymentsDeleteMockTests.java | 34 - ...ploymentsGetLogsWithResponseMockTests.java | 42 - .../OnlineDeploymentsListSkusMockTests.java | 47 - .../OnlineEndpointsDeleteMockTests.java | 33 - .../generated/OnlineRequestSettingsTests.java | 33 - .../generated/OnlineScaleSettingsTests.java | 22 - .../generated/OperationDisplayTests.java | 23 - .../generated/OperationInnerTests.java | 24 - .../generated/OperationListResultTests.java | 23 - .../generated/OperationsListMockTests.java | 36 - .../OutboundRuleBasicResourceInnerTests.java | 32 - .../OutboundRuleListResultTests.java | 44 - .../generated/OutboundRuleTests.java | 30 - .../OutputPathAssetReferenceTests.java | 28 - ...malTrackedResourceWithPropertiesTests.java | 47 - .../PartialBatchDeploymentTests.java | 25 - .../PartialManagedServiceIdentityTests.java | 44 - .../PartialMinimalTrackedResourceTests.java | 40 - ...nimalTrackedResourceWithIdentityTests.java | 50 - ...rackedResourceWithSkuAndIdentityTests.java | 65 - ...ialMinimalTrackedResourceWithSkuTests.java | 58 - ...alRegistryPartialTrackedResourceTests.java | 67 - .../generated/PartialSkuTests.java | 39 - .../generated/PasswordTests.java | 21 - .../PendingUploadRequestDtoTests.java | 30 - .../PersonalComputeInstanceSettingsTests.java | 30 - .../generated/PipelineJobTests.java | 126 - ...edictionDriftMetricThresholdBaseTests.java | 29 - .../PredictionDriftMonitoringSignalTests.java | 89 - .../PrivateEndpointConnectionInnerTests.java | 85 - ...vateEndpointConnectionListResultTests.java | 93 - ...vateEndpointConnectionPropertiesTests.java | 40 - ...nsCreateOrUpdateWithResponseMockTests.java | 89 - ...onnectionsDeleteWithResponseMockTests.java | 34 - ...ntConnectionsGetWithResponseMockTests.java | 53 - ...ivateEndpointConnectionsListMockTests.java | 56 - .../PrivateEndpointDestinationTests.java | 36 - .../PrivateEndpointOutboundRuleTests.java | 44 - .../PrivateEndpointResourceTests.java | 25 - .../generated/PrivateEndpointTests.java | 21 - ...ivateLinkResourceListResultInnerTests.java | 85 - .../PrivateLinkResourcePropertiesTests.java | 28 - .../generated/PrivateLinkResourceTests.java | 73 - ...inkResourcesListWithResponseMockTests.java | 49 - ...rivateLinkServiceConnectionStateTests.java | 35 - .../generated/ProbeSettingsTests.java | 39 - .../generated/PyTorchTests.java | 26 - .../generated/QueueSettingsTests.java | 25 - .../generated/QuotaBasePropertiesTests.java | 37 - .../generated/QuotaUpdateParametersTests.java | 50 - .../generated/QuotasListMockTests.java | 36 - .../QuotasUpdateWithResponseMockTests.java | 56 - .../RandomSamplingAlgorithmTests.java | 30 - .../generated/RecurrenceScheduleTests.java | 37 - .../generated/RecurrenceTests.java | 53 - .../generated/RecurrenceTriggerTests.java | 55 - .../RegistriesCreateOrUpdateMockTests.java | 128 - .../generated/RegistriesDeleteMockTests.java | 33 - ...tByResourceGroupWithResponseMockTests.java | 60 - ...egistriesListByResourceGroupMockTests.java | 63 - .../generated/RegistriesListMockTests.java | 62 - .../RegistriesRemoveRegionsMockTests.java | 130 - ...CodeContainersCreateOrUpdateMockTests.java | 63 - ...RegistryCodeContainersDeleteMockTests.java | 33 - ...odeContainersGetWithResponseMockTests.java | 42 - .../RegistryCodeContainersListMockTests.java | 43 - .../RegistryCodeVersionsDeleteMockTests.java | 34 - ...nentContainersCreateOrUpdateMockTests.java | 62 - ...tryComponentContainersDeleteMockTests.java | 34 - ...entContainersGetWithResponseMockTests.java | 42 - ...istryComponentContainersListMockTests.java | 42 - ...ponentVersionsCreateOrUpdateMockTests.java | 65 - ...istryComponentVersionsDeleteMockTests.java | 33 - ...onentVersionsGetWithResponseMockTests.java | 43 - ...egistryComponentVersionsListMockTests.java | 44 - ...DataContainersCreateOrUpdateMockTests.java | 66 - ...RegistryDataContainersDeleteMockTests.java | 33 - ...ataContainersGetWithResponseMockTests.java | 44 - .../RegistryDataContainersListMockTests.java | 45 - ...ryDataVersionsCreateOrUpdateMockTests.java | 66 - .../RegistryDataVersionsDeleteMockTests.java | 34 - ...yDataVersionsGetWithResponseMockTests.java | 44 - .../RegistryDataVersionsListMockTests.java | 46 - ...mentContainersCreateOrUpdateMockTests.java | 64 - ...yEnvironmentContainersDeleteMockTests.java | 34 - ...entContainersGetWithResponseMockTests.java | 42 - ...tryEnvironmentContainersListMockTests.java | 44 - ...onmentVersionsCreateOrUpdateMockTests.java | 93 - ...tryEnvironmentVersionsDeleteMockTests.java | 34 - ...nmentVersionsGetWithResponseMockTests.java | 58 - ...istryEnvironmentVersionsListMockTests.java | 66 - .../generated/RegistryInnerTests.java | 202 - ...odelContainersCreateOrUpdateMockTests.java | 62 - ...egistryModelContainersDeleteMockTests.java | 33 - ...delContainersGetWithResponseMockTests.java | 42 - .../RegistryModelContainersListMockTests.java | 43 - ...yModelVersionsCreateOrUpdateMockTests.java | 85 - .../RegistryModelVersionsDeleteMockTests.java | 34 - ...ModelVersionsGetWithResponseMockTests.java | 48 - .../RegistryModelVersionsListMockTests.java | 51 - ...tryPartialManagedServiceIdentityTests.java | 44 - ...vateEndpointConnectionPropertiesTests.java | 49 - ...egistryPrivateEndpointConnectionTests.java | 54 - ...rivateLinkServiceConnectionStateTests.java | 34 - .../generated/RegistryPropertiesTests.java | 281 - .../RegistryRegionArmDetailsTests.java | 113 - ...rackedResourceArmPaginatedResultTests.java | 233 - .../generated/RegressionTests.java | 215 - .../RegressionTrainingSettingsTests.java | 64 - .../generated/RequestLoggingTests.java | 26 - .../generated/ResourceBaseTests.java | 46 - .../generated/ResourceConfigurationTests.java | 44 - .../generated/ResourceIdTests.java | 24 - .../generated/ResourceNameTests.java | 22 - .../generated/ResourceQuotaInnerTests.java | 23 - .../generated/RollingInputDataTests.java | 61 - .../machinelearning/generated/RouteTests.java | 26 - .../generated/SamplingAlgorithmTests.java | 22 - .../ScaleSettingsInformationTests.java | 35 - .../generated/ScaleSettingsTests.java | 33 - .../generated/ScheduleActionBaseTests.java | 22 - .../generated/ScheduleBaseTests.java | 34 - .../generated/ScheduleInnerTests.java | 65 - .../generated/SchedulePropertiesTests.java | 65 - ...heduleResourceArmPaginatedResultTests.java | 96 - .../SchedulesCreateOrUpdateMockTests.java | 74 - .../generated/SchedulesDeleteMockTests.java | 33 - .../SchedulesGetWithResponseMockTests.java | 46 - .../generated/SchedulesListMockTests.java | 48 - .../generated/ScriptReferenceTests.java | 35 - .../generated/ScriptsToExecuteTests.java | 49 - .../generated/SeasonalityTests.java | 21 - .../ServerlessComputeSettingsTests.java | 29 - .../ServerlessEndpointInnerTests.java | 85 - .../ServerlessEndpointPropertiesTests.java | 37 - ...rackedResourceArmPaginatedResultTests.java | 152 - ...rlessEndpointsCreateOrUpdateMockTests.java | 90 - ...lessEndpointsGetWithResponseMockTests.java | 55 - .../ServerlessEndpointsListMockTests.java | 57 - .../ServerlessInferenceEndpointTests.java | 26 - .../ServiceManagedResourcesSettingsTests.java | 28 - .../generated/ServiceTagDestinationTests.java | 36 - .../ServiceTagOutboundRuleTests.java | 45 - .../generated/SetupScriptsTests.java | 50 - ...haredPrivateLinkResourcePropertyTests.java | 37 - .../SharedPrivateLinkResourceTests.java | 39 - .../generated/SkuCapacityTests.java | 36 - .../SkuResourceArmPaginatedResultTests.java | 50 - .../generated/SkuResourceInnerTests.java | 45 - .../generated/SkuSettingTests.java | 28 - .../machinelearning/generated/SkuTests.java | 39 - .../generated/SparkJobEntryTests.java | 22 - .../generated/SparkJobPythonEntryTests.java | 26 - .../generated/SparkJobScalaEntryTests.java | 26 - .../SparkResourceConfigurationTests.java | 29 - .../generated/StackEnsembleSettingsTests.java | 32 - .../generated/StaticInputDataTests.java | 60 - .../generated/StorageAccountDetailsTests.java | 46 - .../generated/SweepJobLimitsTests.java | 36 - .../SynapseSparkPropertiesTests.java | 63 - .../SystemCreatedAcrAccountTests.java | 33 - .../SystemCreatedStorageAccountTests.java | 39 - .../generated/SystemServiceTests.java | 24 - ...bleVerticalFeaturizationSettingsTests.java | 78 - .../TableVerticalLimitSettingsTests.java | 45 - .../generated/TableVerticalTests.java | 131 - .../generated/TargetLagsTests.java | 21 - .../TargetRollingWindowSizeTests.java | 22 - .../TargetUtilizationScaleSettingsTests.java | 37 - .../generated/TensorFlowTests.java | 29 - .../TextClassificationMultilabelTests.java | 65 - .../generated/TextClassificationTests.java | 69 - .../generated/TextNerTests.java | 65 - .../generated/TmpfsOptionsTests.java | 24 - .../TopNFeaturesByAttributionTests.java | 26 - .../generated/TrainingSettingsTests.java | 54 - .../generated/TriggerBaseTests.java | 31 - .../generated/TritonModelJobInputTests.java | 33 - .../generated/TritonModelJobOutputTests.java | 33 - .../TruncationSelectionPolicyTests.java | 32 - ...UpdateWorkspaceQuotasResultInnerTests.java | 23 - .../generated/UpdateWorkspaceQuotasTests.java | 30 - .../generated/UriFileDataVersionTests.java | 55 - .../generated/UriFileJobInputTests.java | 33 - .../generated/UriFileJobOutputTests.java | 33 - .../generated/UriFolderDataVersionTests.java | 57 - .../generated/UriFolderJobInputTests.java | 33 - .../generated/UriFolderJobOutputTests.java | 33 - .../generated/UsageInnerTests.java | 23 - .../generated/UsageNameTests.java | 22 - .../generated/UsagesListMockTests.java | 36 - .../generated/UserAssignedIdentityTests.java | 23 - .../generated/UserCreatedAcrAccountTests.java | 27 - .../UserCreatedStorageAccountTests.java | 27 - .../generated/UserIdentityTests.java | 21 - .../generated/VirtualMachineImageTests.java | 24 - ...irtualMachineSizeListResultInnerTests.java | 80 - .../generated/VirtualMachineSizeTests.java | 59 - ...MachineSizesListWithResponseMockTests.java | 50 - .../generated/VolumeDefinitionTests.java | 55 - .../generated/VolumeOptionsTests.java | 24 - .../generated/WebhookTests.java | 25 - ...rkspaceConnectionManagedIdentityTests.java | 29 - ...aceConnectionPersonalAccessTokenTests.java | 25 - ...2BasicResourceArmPaginatedResultTests.java | 86 - ...onPropertiesV2BasicResourceInnerTests.java | 69 - .../WorkspaceConnectionPropertiesV2Tests.java | 66 - ...eConnectionSharedAccessSignatureTests.java | 25 - ...onnectionsCreateWithResponseMockTests.java | 73 - ...onnectionsDeleteWithResponseMockTests.java | 34 - ...ceConnectionsGetWithResponseMockTests.java | 48 - .../WorkspaceConnectionsListMockTests.java | 49 - ...tionsListSecretsWithResponseMockTests.java | 48 - .../WorkspaceFeaturesListMockTests.java | 41 - .../generated/WorkspaceHubConfigTests.java | 32 - .../generated/WorkspacesDeleteMockTests.java | 33 - ...denciesEndpointsWithResponseMockTests.java | 40 - .../WorkspacesResyncKeysMockTests.java | 33 - 1491 files changed, 74554 insertions(+), 45029 deletions(-) create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CapabilityHostsClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistItemsClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistItemsOperationsClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistOperationsClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistsClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiPoliciesClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiPolicyOperationsClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionsClient.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/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/PtuQuotasClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RaiPoliciesClient.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RaiPolicyOperationsClient.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/AvailableQuotaInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CapabilityHostInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DeltaModelStatusResponseInner.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/EndpointModelPropertiesInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointModelsInner.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/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/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/RaiBlocklistItemPropertiesBasicResourceInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RaiBlocklistPropertiesBasicResourceInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RaiPolicyPropertiesBasicResourceInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/UsageAndQuotaDetailsInner.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AccountApiKeysImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AvailableQuotaImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapabilityHostImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapabilityHostsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapabilityHostsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsOperationsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsOperationsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistOperationsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistOperationsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPoliciesClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPoliciesImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPolicyOperationsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPolicyOperationsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DeltaModelStatusResponseImpl.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/EndpointModelPropertiesImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointModelsImpl.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/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/PrivateLinkResourceImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PtuQuotasClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PtuQuotasImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiBlocklistItemPropertiesBasicResourceImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiBlocklistPropertiesBasicResourceImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPoliciesClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPoliciesImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPolicyOperationsClientImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPolicyOperationsImpl.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPolicyPropertiesBasicResourceImpl.java rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/{PrivateLinkResourceListResultImpl.java => UsageAndQuotaDetailsImpl.java} (53%) 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/ActualCapacityInfo.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllowedContentLevel.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/AvailableQuota.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AvailableQuotaArmPaginatedResult.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AvailableQuotaProperties.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/CapabilityHost.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHostKind.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHostProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHostProvisioningState.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHosts.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/ComputeInstanceAutologgerSettings.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiBlocklistItems.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiBlocklistItemsOperations.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiBlocklistOperations.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiBlocklists.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiPolicies.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiPolicyOperations.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Connections.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/ContentSafetyLevel.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/DefaultActionType.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/DeltaModelCurrentState.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelListRequest.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelModifyRequest.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelStatusRequest.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelStatusResponse.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/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/EndpointModelDeprecationProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuCapacityProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuRateLimitProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuRateLimitRulePatternProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuRateLimitRuleProperties.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/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/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/FirewallSku.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/GroupEnvironmentConfiguration.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GroupModelConfiguration.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/IdleShutdownSetting.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageDetails.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageInfo.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/IpRule.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobResources.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JupyterKernelConfig.java rename sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/{EncryptionKeyVaultProperties.java => KeyVaultProperties.java} (55%) 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/ManagedPERequirement.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedPEStatus.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/MlflowAutologger.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/ModelProvider.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/NetworkAcls.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/OsPatchingStatus.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageDetails.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/PoolProvisioningState.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/PropertiesBase.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PtuDeploymentUsage.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PtuQuotas.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/RaiBlocklistConfig.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistItemBulkRequest.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistItemProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistItemPropertiesBasicResource.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistPropertiesBasicResource.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistPropertiesBasicResourceArmPaginatedResult.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicies.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyContentFilter.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyContentSource.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyMode.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyOperations.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyProperties.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyPropertiesBasicResource.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyPropertiesBasicResourceArmPaginatedResult.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyType.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/RequestConfiguration.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/ScaleUnitConfiguration.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SecretExpiry.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/ServerlessEndpointContentSafety.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointInferenceEndpoint.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointModelSettings.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointResourceProperties.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/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/StringArmPaginatedResult.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StringKeyValuePair.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemDatastoresAuthMode.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageAndQuotaDetails.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageAndQuotaDetailsArmPaginatedResult.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/VulnerabilityDetails.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VulnerabilityFindings.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VulnerabilityRisk.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/WorkspacePrivateEndpointResource.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostsCreateOrUpdateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostsDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostsGetSamples.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/ConnectionCreateOrUpdateDeploymentSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionDeleteDeploymentSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionGetAllModelsSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionGetDeploymentSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionGetModelsSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionListDeploymentsSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemAddBulkSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemCreateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemDeleteBulkSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemGetSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemsOperationListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistOperationCreateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistOperationDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistOperationGetSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistsListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPoliciesListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPolicyOperationCreateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPolicyOperationDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPolicyOperationGetSamples.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/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/InferenceGroupsGetDeltaModelsStatusAsyncSamples.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/InferenceGroupsListDeltaModelsAsyncSamples.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/InferenceGroupsModifyDeltaModelsAsyncSamples.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/InferencePoolsListSamples.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/PtuQuotaGetAvailableSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PtuQuotaListAvailableSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PtuQuotaListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RaiPoliciesListSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyOperationCreateSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyOperationDeleteSamples.java create mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyOperationGetSamples.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/AadAuthTypeWorkspaceConnectionPropertiesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AcrDetailsTests.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/AllFeaturesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AllNodesTests.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/AmlTokenComputeIdentityTests.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/ArmResourceIdTests.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/AzureDatastoreTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AzureDevOpsWebhookTests.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/BatchDeploymentConfigurationTests.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/BatchEndpointsDeleteMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchPipelineComponentDeploymentConfigurationTests.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/BindOptionsTests.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/CategoricalDataDriftMetricThresholdTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CategoricalDataQualityMetricThresholdTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CategoricalPredictionDriftMetricThresholdTests.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/CodeVersionsPublishMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CollectionTests.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/ComponentVersionsPublishMockTests.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/ComputeRecurrenceScheduleTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeRuntimeDtoTests.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/ComputesDeleteMockTests.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/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/ContentSafetyTests.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/CreateMonitorActionTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CronTests.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/CustomMetricThresholdTests.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/CustomMonitoringSignalTests.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/CustomServiceTests.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/DataCollectorTests.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/DataDriftMetricThresholdBaseTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataDriftMonitoringSignalTests.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/DataPathAssetReferenceTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataQualityMetricThresholdBaseTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataQualityMonitoringSignalTests.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/DataVersionsPublishMockTests.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/DestinationAssetTests.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/DockerTests.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/EndpointTests.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/EnvironmentVariableTests.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/EnvironmentVersionsPublishMockTests.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/FeatureAttributionDriftMonitoringSignalTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureAttributionMetricThresholdTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureImportanceSettingsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturePropertiesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureResourceArmPaginatedResultTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureStoreSettingsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureSubsetTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureWindowTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesGetWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesListMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainerInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainerPropertiesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainerResourceArmPaginatedResultTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersCreateOrUpdateMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersDeleteMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersGetEntityWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersListMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetSpecificationTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionBackfillRequestTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionBackfillResponseInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionPropertiesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionResourceArmPaginatedResultTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsBackfillMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsCreateOrUpdateMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsDeleteMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsGetWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsListMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainerInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainerPropertiesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainerResourceArmPaginatedResultTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersCreateOrUpdateMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersDeleteMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersGetEntityWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersListMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionPropertiesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionResourceArmPaginatedResultTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsCreateOrUpdateMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsDeleteMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsGetWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsListMockTests.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/FixedInputDataTests.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/FqdnOutboundRuleTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/GetBlobReferenceSasRequestDtoTests.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/ImageMetadataTests.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/ImageTests.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/IndexColumnTests.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/LakeHouseArtifactTests.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/ManagedComputeIdentityTests.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/ManagedNetworkProvisionOptionsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionStatusInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionsProvisionManagedNetworkMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesCreateOrUpdateMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesDeleteMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesGetWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesListMockTests.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/MarketplacePlanTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionPropertiesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionResourceArmPaginatedResultTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsCreateOrUpdateMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsGetWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsListMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MaterializationComputeResourceTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MaterializationSettingsTests.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/ModelSettingsTests.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/ModelVersionsPublishMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorComputeConfigurationBaseTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorComputeIdentityBaseTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorDefinitionTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorEmailNotificationSettingsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorNotificationSettingsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorServerlessSparkComputeTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringFeatureFilterBaseTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringInputDataBaseTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringSignalBaseTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringTargetTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringThresholdTests.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/NodesTests.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/NotificationSettingTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NumericalDataDriftMetricThresholdTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NumericalDataQualityMetricThresholdTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NumericalPredictionDriftMetricThresholdTests.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/OneLakeArtifactTests.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/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/OperationDisplayTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationListResultTests.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/OutboundRuleBasicResourceInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleListResultTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleTests.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/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/PartialMinimalTrackedResourceWithSkuAndIdentityTests.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/PartialRegistryPartialTrackedResourceTests.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/PendingUploadRequestDtoTests.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/PredictionDriftMetricThresholdBaseTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PredictionDriftMonitoringSignalTests.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/PrivateEndpointDestinationTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointOutboundRuleTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointResourceTests.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/QueueSettingsTests.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/RecurrenceTests.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/RegistriesCreateOrUpdateMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesDeleteMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesGetByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListByResourceGroupMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesRemoveRegionsMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersCreateOrUpdateMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersDeleteMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersGetWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersListMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsDeleteMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersCreateOrUpdateMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersDeleteMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersGetWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersListMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsCreateOrUpdateMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsDeleteMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsGetWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsListMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersCreateOrUpdateMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersDeleteMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersGetWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersListMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsCreateOrUpdateMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsDeleteMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsGetWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsListMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersCreateOrUpdateMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersDeleteMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersGetWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersListMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsCreateOrUpdateMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsDeleteMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsGetWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsListMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersCreateOrUpdateMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersDeleteMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersGetWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersListMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsCreateOrUpdateMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsDeleteMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsGetWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsListMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPartialManagedServiceIdentityTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPrivateEndpointConnectionPropertiesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPrivateEndpointConnectionTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPrivateLinkServiceConnectionStateTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPropertiesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryRegionArmDetailsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryTrackedResourceArmPaginatedResultTests.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/RequestLoggingTests.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/RollingInputDataTests.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/ServerlessComputeSettingsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointInnerTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointPropertiesTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointTrackedResourceArmPaginatedResultTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsCreateOrUpdateMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsGetWithResponseMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsListMockTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessInferenceEndpointTests.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/ServiceTagDestinationTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServiceTagOutboundRuleTests.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/SparkJobEntryTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkJobPythonEntryTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkJobScalaEntryTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkResourceConfigurationTests.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/StaticInputDataTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StorageAccountDetailsTests.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/SystemCreatedAcrAccountTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SystemCreatedStorageAccountTests.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/TmpfsOptionsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TopNFeaturesByAttributionTests.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/UserCreatedAcrAccountTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserCreatedStorageAccountTests.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/VolumeDefinitionTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VolumeOptionsTests.java delete mode 100644 sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WebhookTests.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/WorkspaceConnectionsListSecretsWithResponseMockTests.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/WorkspaceHubConfigTests.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 66d924503f0c3..8bad8900af3aa 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/CHANGELOG.md +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/CHANGELOG.md @@ -1,14 +1,1155 @@ # Release History -## 1.2.0-beta.1 (Unreleased) +## 1.0.0-beta.1 (2025-01-22) -### Features Added +- 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-2025-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +#### `models.FqdnEndpointsProperties` was removed + +#### `models.EncryptionKeyVaultProperties` was removed + +#### `models.ValueFormat` was removed + +#### `models.PublicNetworkAccess` was removed + +#### `models.PrivateEndpointServiceConnectionStatus` was removed + +#### `models.WorkspaceConnectionPropertiesV2` was modified + +* `withValueFormat(models.ValueFormat)` was removed +* `withValue(java.lang.String)` was removed +* `valueFormat()` was removed +* `value()` was removed + +#### `models.ListWorkspaceKeysResult` was modified + +* `userStorageResourceId()` was removed + +#### `models.AzureBlobDatastore` was modified + +* `isDefault()` was removed + +#### `models.SynapseSpark` was modified + +* `provisioningErrors()` was removed +* `createdOn()` was removed +* `modifiedOn()` was removed +* `provisioningState()` was removed +* `isAttachedCompute()` was removed + +#### `models.FqdnEndpoints` was modified + +* `withProperties(models.FqdnEndpointsProperties)` was removed +* `properties()` was removed + +#### `models.Aks` was modified + +* `modifiedOn()` was removed +* `provisioningErrors()` was removed +* `isAttachedCompute()` was removed +* `createdOn()` was removed +* `provisioningState()` was removed + +#### `models.DataLakeAnalytics` was modified + +* `createdOn()` was removed +* `isAttachedCompute()` was removed +* `modifiedOn()` was removed +* `provisioningErrors()` was removed +* `provisioningState()` was removed + +#### `models.Workspace$Update` was modified + +* `withPublicNetworkAccess(models.PublicNetworkAccess)` was removed + +#### `models.PrivateEndpointConnection$Definition` was modified + +* `withPrivateEndpoint(models.PrivateEndpoint)` was removed + +#### `models.OneLakeDatastore` was modified + +* `isDefault()` was removed + +#### `models.ServicePrincipalAuthTypeWorkspaceConnectionProperties` was modified + +* `withValueFormat(models.ValueFormat)` was removed +* `group()` was removed +* `createdByWorkspaceArmId()` was removed +* `withValue(java.lang.String)` was removed + +#### `models.AzureDataLakeGen1Datastore` was modified + +* `isDefault()` was removed + +#### `models.Workspaces` was modified + +* `list(java.lang.String,com.azure.core.util.Context)` was removed +* `listByResourceGroup(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed + +#### `models.Kubernetes` was modified + +* `isAttachedCompute()` was removed +* `provisioningErrors()` was removed +* `modifiedOn()` was removed +* `provisioningState()` was removed +* `createdOn()` was removed + +#### `models.ManagedOnlineDeployment` was modified + +* `provisioningState()` was removed + +#### `models.PrivateLinkServiceConnectionState` was modified + +* `withStatus(models.PrivateEndpointServiceConnectionStatus)` was removed +* `models.PrivateEndpointServiceConnectionStatus status()` -> `models.EndpointServiceConnectionStatus status()` + +#### `models.OAuth2AuthTypeWorkspaceConnectionProperties` was modified + +* `group()` was removed +* `createdByWorkspaceArmId()` was removed +* `withValueFormat(models.ValueFormat)` was removed +* `withValue(java.lang.String)` was removed + +#### `models.Workspace$Definition` was modified + +* `withPublicNetworkAccess(models.PublicNetworkAccess)` was removed + +#### `models.Datastores` was modified + +* `listSecretsWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed + +#### `models.PrivateLinkResource` was modified + +* `java.util.List requiredMembers()` -> `java.util.List requiredMembers()` +* `fromJson(com.azure.json.JsonReader)` was removed +* `models.ManagedServiceIdentity identity()` -> `models.ManagedServiceIdentity identity()` +* `withRequiredZoneNames(java.util.List)` was removed +* `java.lang.String location()` -> `java.lang.String location()` +* `java.lang.String type()` -> `java.lang.String type()` +* `java.lang.String groupId()` -> `java.lang.String groupId()` +* `java.util.Map tags()` -> `java.util.Map tags()` +* `validate()` was removed +* `java.util.List requiredZoneNames()` -> `java.util.List requiredZoneNames()` +* `java.lang.String name()` -> `java.lang.String name()` +* `withIdentity(models.ManagedServiceIdentity)` was removed +* `com.azure.core.management.SystemData systemData()` -> `com.azure.core.management.SystemData systemData()` +* `toJson(com.azure.json.JsonWriter)` was removed +* `withTags(java.util.Map)` was removed +* `models.Sku sku()` -> `models.Sku sku()` +* `java.lang.String id()` -> `java.lang.String id()` +* `withSku(models.Sku)` was removed +* `withLocation(java.lang.String)` was removed + +#### `models.PipelineJob` was modified + +* `status()` was removed + +#### `models.VirtualMachine` was modified + +* `isAttachedCompute()` was removed +* `modifiedOn()` was removed +* `provisioningState()` was removed +* `createdOn()` was removed +* `provisioningErrors()` was removed + +#### `models.AmlCompute` was modified + +* `createdOn()` was removed +* `modifiedOn()` was removed +* `isAttachedCompute()` was removed +* `provisioningState()` was removed +* `provisioningErrors()` was removed + +#### `models.AzureDataLakeGen2Datastore` was modified + +* `isDefault()` was removed + +#### `models.Databricks` was modified + +* `provisioningErrors()` was removed +* `createdOn()` was removed +* `isAttachedCompute()` was removed +* `modifiedOn()` was removed +* `provisioningState()` was removed + +#### `models.PrivateEndpointConnection$Update` was modified + +* `withPrivateEndpoint(models.PrivateEndpoint)` was removed + +#### `models.ApiKeyAuthWorkspaceConnectionProperties` was modified + +* `withValueFormat(models.ValueFormat)` was removed +* `createdByWorkspaceArmId()` was removed +* `group()` was removed +* `withValue(java.lang.String)` was removed + +#### `models.ComputeInstance` was modified + +* `createdOn()` was removed +* `provisioningErrors()` was removed +* `provisioningState()` was removed +* `isAttachedCompute()` was removed +* `modifiedOn()` was removed + +#### `models.WorkspaceConnections` was modified + +* `list(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed + +#### `models.Workspace` was modified + +* `models.PublicNetworkAccess publicNetworkAccess()` -> `models.PublicNetworkAccessType publicNetworkAccess()` + +#### `models.Datastore` was modified + +* `listSecretsWithResponse(com.azure.core.util.Context)` was removed + +#### `models.NoneAuthTypeWorkspaceConnectionProperties` was modified + +* `createdByWorkspaceArmId()` was removed +* `withValue(java.lang.String)` was removed +* `withValueFormat(models.ValueFormat)` was removed +* `group()` was removed + +#### `models.CustomKeysWorkspaceConnectionProperties` was modified + +* `withValue(java.lang.String)` was removed +* `group()` was removed +* `withValueFormat(models.ValueFormat)` was removed +* `createdByWorkspaceArmId()` was removed + +#### `models.UsernamePasswordAuthTypeWorkspaceConnectionProperties` was modified + +* `createdByWorkspaceArmId()` was removed +* `withValueFormat(models.ValueFormat)` was removed +* `group()` was removed +* `withValue(java.lang.String)` was removed + +#### `models.AccountKeyAuthTypeWorkspaceConnectionProperties` was modified + +* `withValue(java.lang.String)` was removed +* `withValueFormat(models.ValueFormat)` was removed +* `group()` was removed +* `createdByWorkspaceArmId()` was removed + +#### `models.AzureFileDatastore` was modified + +* `isDefault()` was removed + +#### `models.SparkJob` was modified + +* `status()` was removed + +#### `models.WorkspacePropertiesUpdateParameters` was modified + +* `models.PublicNetworkAccess publicNetworkAccess()` -> `models.PublicNetworkAccessType publicNetworkAccess()` + +#### `models.WorkspaceUpdateParameters` was modified + +* `withPublicNetworkAccess(models.PublicNetworkAccess)` was removed +* `models.PublicNetworkAccess publicNetworkAccess()` -> `models.PublicNetworkAccessType publicNetworkAccess()` + +#### `models.AccessKeyAuthTypeWorkspaceConnectionProperties` was modified + +* `withValueFormat(models.ValueFormat)` was removed +* `createdByWorkspaceArmId()` was removed +* `withValue(java.lang.String)` was removed +* `group()` was removed + +#### `models.AadAuthTypeWorkspaceConnectionProperties` was modified + +* `createdByWorkspaceArmId()` was removed +* `withValueFormat(models.ValueFormat)` was removed +* `withValue(java.lang.String)` was removed +* `group()` was removed + +#### `models.WorkspaceProperties` was modified + +* `models.PublicNetworkAccess publicNetworkAccess()` -> `models.PublicNetworkAccessType publicNetworkAccess()` + +#### `models.SharedPrivateLinkResource` was modified + +* `withStatus(models.PrivateEndpointServiceConnectionStatus)` was removed +* `models.PrivateEndpointServiceConnectionStatus status()` -> `models.EndpointServiceConnectionStatus status()` + +#### `models.PrivateLinkResources` was modified + +* `models.PrivateLinkResourceListResult list(java.lang.String,java.lang.String)` -> `com.azure.core.http.rest.PagedIterable list(java.lang.String,java.lang.String)` +* `listWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was removed + +#### `models.SasAuthTypeWorkspaceConnectionProperties` was modified + +* `withValueFormat(models.ValueFormat)` was removed +* `withValue(java.lang.String)` was removed +* `createdByWorkspaceArmId()` was removed +* `group()` was removed + +#### `models.EncryptionProperty` was modified + +* `withKeyVaultProperties(models.EncryptionKeyVaultProperties)` was removed +* `models.EncryptionKeyVaultProperties keyVaultProperties()` -> `models.KeyVaultProperties keyVaultProperties()` + +#### `models.CommandJob` was modified + +* `status()` was removed + +#### `models.ManagedIdentityAuthTypeWorkspaceConnectionProperties` was modified + +* `withValue(java.lang.String)` was removed +* `withValueFormat(models.ValueFormat)` was removed +* `group()` was removed +* `createdByWorkspaceArmId()` was removed + +#### `models.DataFactory` was modified + +* `createdOn()` was removed +* `modifiedOn()` was removed +* `isAttachedCompute()` was removed +* `provisioningState()` was removed +* `provisioningErrors()` was removed + +#### `models.PrivateLinkResourceListResult` was modified + +* `java.util.List value()` -> `java.util.List value()` +* `innerModel()` was removed + +#### `models.SweepJob` was modified + +* `status()` was removed + +#### `models.PrivateEndpointConnection` was modified + +* `models.PrivateEndpoint privateEndpoint()` -> `models.WorkspacePrivateEndpointResource privateEndpoint()` + +#### `models.AutoMLJob` was modified + +* `status()` was removed + +#### `models.HDInsight` was modified + +* `modifiedOn()` was removed +* `provisioningErrors()` was removed +* `provisioningState()` was removed +* `isAttachedCompute()` was removed +* `createdOn()` was removed + +#### `models.KubernetesOnlineDeployment` was modified + +* `provisioningState()` was removed + +#### `models.PatAuthTypeWorkspaceConnectionProperties` was modified + +* `createdByWorkspaceArmId()` was removed +* `withValueFormat(models.ValueFormat)` was removed +* `withValue(java.lang.String)` was removed +* `group()` was removed + +### Features Added + +* `models.GroupEnvironmentConfiguration` was added + +* `models.ManagedOnlineEndpointResourceProperties` was added + +* `models.ManagedPERequirement` was added + +* `models.PackageDetails` was added + +* `models.DeltaModelStatusRequest` was added + +* `models.Endpoints` was added + +* `models.GroupStatus` was added + +* `models.RaiPolicyPropertiesBasicResource$DefinitionStages` was added + +* `models.WorkspaceConnectionPropertiesV2BasicResource$Update` was added + +* `models.RaiPolicyType` was added + +* `models.RaiBlocklistItemPropertiesBasicResource$Definition` was added + +* `models.RaiPolicies` was added + +* `models.EndpointResourcePropertiesBasicResource` was added + +* `models.EndpointDeployments` was added + +* `models.AvailableQuotaArmPaginatedResult` was added + +* `models.IpRule` was added + +* `models.CapabilityHost$Update` was added + +* `models.InferenceGroup$DefinitionStages` was added + +* `models.PtuDeploymentUsage` was added + +* `models.DeploymentModelVersionUpgradeOption` was added + +* `models.InferenceEndpointTrackedResourceArmPaginatedResult` was added + +* `models.InferencePoolTrackedResourceArmPaginatedResult` was added + +* `models.CapabilityHosts` was added + +* `models.InferenceEndpointProperties` was added + +* `models.ServiceAccountKeyName` was added + +* `models.EndpointDeploymentResourceProperties` was added + +* `models.UsageAndQuotaDetails` was added + +* `models.IdleShutdownSetting` was added + +* `models.InferencePool` was added + +* `models.RaiPolicyPropertiesBasicResource$Definition` was added + +* `models.RaiBlocklistProperties` was added + +* `models.ServerlessOffer` was added + +* `models.CapabilityHost$UpdateStages` was added + +* `models.ManagedResourceGroupSettings` was added + +* `models.ConnectionRaiPolicyOperations` was added + +* `models.StringKeyValuePair` was added + +* `models.CapabilityHost$DefinitionStages` was added + +* `models.EndpointResourcePropertiesBasicResource$Definition` was added + +* `models.EndpointDeploymentResourcePropertiesBasicResource$UpdateStages` was added + +* `models.EndpointModelSkuProperties` was added + +* `models.InferenceGroup` was added + +* `models.EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult` was added + +* `models.EndpointResourcePropertiesBasicResource$UpdateStages` was added + +* `models.InferenceEndpoint$DefinitionStages` was added + +* `models.RequestConfiguration` was added + +* `models.EndpointDeploymentModel` was added + +* `models.EndpointResourcePropertiesBasicResource$DefinitionStages` was added + +* `models.ManagedResourceGroupAssignedIdentities` was added + +* `models.MountMode` was added + +* `models.EndpointKeys` was added + +* `models.ImageDetails` was added + +* `models.EndpointResourceProperties` was added + +* `models.InferencePool$DefinitionStages` was added + +* `models.RaiBlocklistPropertiesBasicResource$DefinitionStages` was added + +* `models.ActualCapacityInfo` was added + +* `models.ServerlessEndpointCapacityReservation` was added + +* `models.SpeechEndpointResourceProperties` was added + +* `models.InferenceGroupProperties` was added + +* `models.EndpointResourcePropertiesBasicResource$Update` was added + +* `models.AllowedContentLevel` was added + +* `models.EndpointDeploymentResourcePropertiesBasicResource$Update` was added + +* `models.CapabilityHost` was added + +* `models.CognitiveServiceEndpointDeploymentResourceProperties` was added + +* `models.FqdnEndpointsPropertyBag` was added + +* `models.InferencePool$Update` was added + +* `models.JobResources` was added + +* `models.ServerlessEndpointModelSettings` was added + +* `models.AuthMode` was added + +* `models.ServerlessEndpointResourceProperties` was added + +* `models.ConnectionRaiBlocklists` was added + +* `models.AccountApiKeys` was added + +* `models.EndpointType` was added + +* `models.DeltaModelListRequest` was added + +* `models.EndpointModelDeprecationProperties` was added + +* `models.ConnectionRaiPolicies` was added + +* `models.EndpointModelSkuRateLimitProperties` was added + +* `models.EndpointDeploymentResourcePropertiesBasicResource` was added + +* `models.RaiPolicyContentFilter` was added + +* `models.FineTuningJob` was added + +* `models.ResizeSchema` was added + +* `models.VulnerabilityDetails` was added + +* `models.ModelProvider` was added + +* `models.MlflowAutologger` was added + +* `models.RaiBlocklistItemPropertiesBasicResource$DefinitionStages` was added + +* `models.ComputeInstanceAutologgerSettings` was added + +* `models.AzureOpenAiHyperParameters` was added + +* `models.ConnectionRaiBlocklistItems` was added + +* `models.FineTuningTaskType` was added + +* `models.GroupModelConfiguration` was added + +* `models.RaiBlocklistPropertiesBasicResource$Definition` was added + +* `models.DefaultActionType` was added + +* `models.CustomModelFineTuning` was added + +* `models.CapabilityHostKind` was added + +* `models.DeltaModelStatusResponse` was added + +* `models.ConnectionRaiBlocklistItemsOperations` was added + +* `models.WorkspaceConnectionUpdateParameter` was added + +* `models.ScaleUnitConfiguration` was added + +* `models.ConnectionRaiBlocklistOperations` was added + +* `models.OpenAIEndpointDeploymentResourceProperties` was added + +* `models.SystemDatastoresAuthMode` was added + +* `models.EndpointModelProperties` was added + +* `models.DeltaModelCurrentState` was added + +* `models.PoolProvisioningState` was added + +* `models.FirewallSku` was added + +* `models.InferenceGroup$Definition` was added + +* `models.RaiBlocklistItemBulkRequest` was added + +* `models.InferenceGroupTrackedResourceArmPaginatedResult` was added + +* `models.Connections` was added + +* `models.JupyterKernelConfig` was added + +* `models.InferenceEndpoint` was added + +* `models.ManagedOnlineEndpointDeploymentResourceProperties` was added + +* `models.RaiBlocklistItemPropertiesBasicResource` was added + +* `models.CapabilityHost$Definition` was added + +* `models.AzureOpenAiFineTuning` was added + +* `models.RaiBlocklistPropertiesBasicResource` was added + +* `models.PtuQuotas` was added + +* `models.InferenceGroup$Update` was added + +* `models.ImageInfo` was added + +* `models.ModelLifecycleStatus` was added + +* `models.AvailableQuotaProperties` was added + +* `models.RaiPolicyMode` was added + +* `models.RaiPolicyOperations` was added + +* `models.KeyVaultProperties` was added + +* `models.InferenceEndpoint$Update` was added + +* `models.EndpointModelSkuCapacityProperties` was added + +* `models.EndpointModelSkuRateLimitRulePatternProperties` was added + +* `models.OsPatchingStatus` was added + +* `models.InferenceEndpoint$Definition` was added + +* `models.PatchStatus` was added + +* `models.InferenceGroups` was added + +* `models.ServerlessEndpointInferenceEndpoint` was added + +* `models.EndpointResourcePropertiesBasicResourceArmPaginatedResult` was added + +* `models.ServerlessEndpointContentSafety` was added + +* `models.StringArmPaginatedResult` was added + +* `models.ContentSafetyEndpointDeploymentResourceProperties` was added + +* `models.EndpointDeploymentResourcePropertiesBasicResource$DefinitionStages` was added + +* `models.CapabilityHostProperties` was added + +* `models.WorkspacePrivateEndpointResource` was added + +* `models.NetworkAcls` was added + +* `models.SpeechEndpointDeploymentResourceProperties` was added + +* `models.InferencePoolProperties` was added + +* `models.RaiBlocklistPropertiesBasicResourceArmPaginatedResult` was added + +* `models.RaiPolicyPropertiesBasicResource` was added + +* `models.RaiPolicyContentSource` was added + +* `models.RaiBlocklistConfig` was added + +* `models.ContentSafetyEndpointResourceProperties` was added + +* `models.InferenceGroup$UpdateStages` was added + +* `models.AvailableQuota` was added + +* `models.InferenceEndpoints` was added + +* `models.VulnerabilityRisk` was added + +* `models.DeltaModelModifyRequest` was added + +* `models.InferencePool$UpdateStages` was added + +* `models.ManagedPEStatus` was added + +* `models.InferenceEndpoint$UpdateStages` was added + +* `models.EndpointDeploymentResourcePropertiesBasicResource$Definition` was added + +* `models.InferencePool$Definition` was added + +* `models.ContentSafetyLevel` was added + +* `models.UsageAndQuotaDetailsArmPaginatedResult` was added + +* `models.FineTuningVertical` was added + +* `models.DefaultResourceProvisioningState` was added + +* `models.PropertiesBase` was added + +* `models.SecretExpiry` was added + +* `models.InferencePools` was added + +* `models.RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult` was added + +* `models.CapabilityHostProvisioningState` was added + +* `models.RaiPolicyPropertiesBasicResourceArmPaginatedResult` was added + +* `models.RegenerateServiceAccountKeyContent` was added + +* `models.EndpointModels` was added + +* `models.OpenAIEndpointResourceProperties` was added + +* `models.CognitiveServicesSku` was added + +* `models.RaiPolicyProperties` was added + +* `models.VulnerabilityFindings` was added + +* `models.RaiBlocklistItemProperties` was added + +* `models.WorkspaceConnectionPropertiesV2BasicResource$UpdateStages` was added + +* `models.EndpointModelSkuRateLimitRuleProperties` was added + +#### `models.Registry$Definition` was modified + +* `withManagedResourceGroupSettings(models.ManagedResourceGroupSettings)` was added + +#### `models.DiagnoseRequestProperties` was modified + +* `requiredResourceProviders()` was added +* `withRequiredResourceProviders(java.util.Map)` was added + +#### `models.WorkspaceConnectionPropertiesV2` was modified + +* `withError(java.lang.String)` was added +* `peStatus()` was added +* `withPeStatus(models.ManagedPEStatus)` was added +* `withPeRequirement(models.ManagedPERequirement)` was added +* `peRequirement()` was added +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added +* `useWorkspaceManagedIdentity()` was added +* `error()` was added + +#### `models.JobResourceConfiguration` was modified + +* `withDockerArgsList(java.util.List)` was added +* `dockerArgsList()` was added + +#### `models.ListWorkspaceKeysResult` was modified + +* `userStorageArmId()` was added + +#### `models.MLFlowModelJobOutput` was modified + +* `assetName()` was added +* `withAssetName(java.lang.String)` was added + +#### `models.FqdnEndpoints` was modified + +* `endpoints()` was added +* `category()` was added +* `withEndpoints(java.util.List)` was added +* `withCategory(java.lang.String)` was added + +#### `models.Registry` was modified + +* `managedResourceGroupSettings()` was added + +#### `models.WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult` was modified + +* `withNextLink(java.lang.String)` was added + +#### `models.Workspace$Update` was modified + +* `withPublicNetworkAccess(models.PublicNetworkAccessType)` was added +* `withNetworkAcls(models.NetworkAcls)` was added +* `withAllowRoleAssignmentOnRG(java.lang.Boolean)` was added +* `withSystemDatastoresAuthMode(models.SystemDatastoresAuthMode)` was added +* `withEnableSoftwareBillOfMaterials(java.lang.Boolean)` was added +* `withIpAllowlist(java.util.List)` was added +* `withSoftDeleteRetentionInDays(java.lang.Integer)` was added + +#### `models.Image` was modified + +* `version()` was added +* `withVersion(java.lang.String)` was added + +#### `models.PrivateEndpointConnection$Definition` was modified + +* `withPrivateEndpoint(models.WorkspacePrivateEndpointResource)` was added +* `withProvisioningState(models.PrivateEndpointConnectionProvisioningState)` was added + +#### `models.ServicePrincipalAuthTypeWorkspaceConnectionProperties` was modified + +* `withError(java.lang.String)` was added +* `withPeStatus(models.ManagedPEStatus)` was added +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added +* `withPeRequirement(models.ManagedPERequirement)` was added + +#### `models.PrivateEndpointOutboundRule` was modified + +* `fqdns()` was added +* `withFqdns(java.util.List)` was added + +#### `models.Workspaces` was modified + +* `listByResourceGroup(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `list(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.PrivateLinkServiceConnectionState` was modified + +* `withStatus(models.EndpointServiceConnectionStatus)` was added + +#### `models.EnvironmentVersionProperties` was modified + +* `withImageDetails(models.ImageDetails)` was added +* `imageDetails()` was added + +#### `models.Computes` was modified + +* `getAllowedResizeSizesWithResponse(java.lang.String,java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `resize(java.lang.String,java.lang.String,java.lang.String,models.ResizeSchema,com.azure.core.util.Context)` was added +* `updateDataMountsWithResponse(java.lang.String,java.lang.String,java.lang.String,java.util.List,com.azure.core.util.Context)` was added +* `updateIdleShutdownSettingWithResponse(java.lang.String,java.lang.String,java.lang.String,models.IdleShutdownSetting,com.azure.core.util.Context)` was added +* `updateIdleShutdownSetting(java.lang.String,java.lang.String,java.lang.String,models.IdleShutdownSetting)` was added +* `updateCustomServices(java.lang.String,java.lang.String,java.lang.String,java.util.List)` was added +* `updateCustomServicesWithResponse(java.lang.String,java.lang.String,java.lang.String,java.util.List,com.azure.core.util.Context)` was added +* `resize(java.lang.String,java.lang.String,java.lang.String,models.ResizeSchema)` was added +* `updateDataMounts(java.lang.String,java.lang.String,java.lang.String,java.util.List)` was added +* `getAllowedResizeSizes(java.lang.String,java.lang.String,java.lang.String)` was added + +#### `models.AssetJobOutput` was modified + +* `withAssetName(java.lang.String)` was added +* `assetName()` was added + +#### `models.OAuth2AuthTypeWorkspaceConnectionProperties` was modified + +* `withError(java.lang.String)` was added +* `withPeStatus(models.ManagedPEStatus)` was added +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added +* `withPeRequirement(models.ManagedPERequirement)` was added + +#### `models.Workspace$Definition` was modified + +* `withNetworkAcls(models.NetworkAcls)` was added +* `withIpAllowlist(java.util.List)` was added +* `withEnableSoftwareBillOfMaterials(java.lang.Boolean)` was added +* `withContainerRegistries(java.util.List)` was added +* `withSystemDatastoresAuthMode(models.SystemDatastoresAuthMode)` was added +* `withAllowRoleAssignmentOnRG(java.lang.Boolean)` was added +* `withEnableSimplifiedCmk(java.lang.Boolean)` was added +* `withKeyVaults(java.util.List)` was added +* `withPublicNetworkAccess(models.PublicNetworkAccessType)` was added +* `withProvisionNetworkNow(java.lang.Boolean)` was added +* `withExistingWorkspaces(java.util.List)` was added +* `withStorageAccounts(java.util.List)` was added +* `withEnableServiceSideCmkEncryption(java.lang.Boolean)` was added +* `withSoftDeleteRetentionInDays(java.lang.Integer)` was added + +#### `models.Datastores` was modified + +* `listSecretsWithResponse(java.lang.String,java.lang.String,java.lang.String,models.SecretExpiry,com.azure.core.util.Context)` was added + +#### `models.PrivateLinkResource` was modified + +* `innerModel()` was added + +#### `models.PipelineJob` was modified + +* `withParentJobName(java.lang.String)` was added + +#### `models.PrivateEndpointConnection$Update` was modified + +* `withProvisioningState(models.PrivateEndpointConnectionProvisioningState)` was added +* `withPrivateEndpoint(models.WorkspacePrivateEndpointResource)` was added + +#### `models.ApiKeyAuthWorkspaceConnectionProperties` was modified + +* `withPeRequirement(models.ManagedPERequirement)` was added +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added +* `withPeStatus(models.ManagedPEStatus)` was added +* `withError(java.lang.String)` was added + +#### `models.WorkspaceConnections` was modified + +* `list(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.Boolean,com.azure.core.util.Context)` was added +* `testConnection(java.lang.String,java.lang.String,java.lang.String,fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner,com.azure.core.util.Context)` was added +* `testConnection(java.lang.String,java.lang.String,java.lang.String)` was added + +#### `models.ManagedNetworkSettings` was modified + +* `changeableIsolationModes()` was added +* `firewallSku()` was added + +#### `models.Workspace` was modified + +* `softDeleteRetentionInDays()` was added +* `networkAcls()` was added +* `agentsEndpointUri()` was added +* `enableServiceSideCmkEncryption()` was added +* `allowRoleAssignmentOnRG()` was added +* `systemDatastoresAuthMode()` was added +* `provisionNetworkNow()` was added +* `enableSoftwareBillOfMaterials()` was added +* `keyVaults()` was added +* `ipAllowlist()` was added +* `containerRegistries()` was added +* `enableSimplifiedCmk()` was added +* `storageAccounts()` was added +* `existingWorkspaces()` was added + +#### `models.UriFileJobOutput` was modified + +* `withAssetName(java.lang.String)` was added +* `assetName()` was added + +#### `models.Datastore` was modified + +* `listSecretsWithResponse(models.SecretExpiry,com.azure.core.util.Context)` was added + +#### `models.NoneAuthTypeWorkspaceConnectionProperties` was modified + +* `withPeStatus(models.ManagedPEStatus)` was added +* `withPeRequirement(models.ManagedPERequirement)` was added +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added +* `withError(java.lang.String)` was added + +#### `MachineLearningManager` was modified + +* `connectionRaiPolicies()` was added +* `endpointDeployments()` was added +* `connectionRaiBlocklistItemsOperations()` was added +* `inferenceEndpoints()` was added +* `ptuQuotas()` was added +* `connectionRaiBlocklists()` was added +* `connections()` was added +* `endpoints()` was added +* `connectionRaiBlocklistItems()` was added +* `capabilityHosts()` was added +* `raiPolicies()` was added +* `connectionRaiBlocklistOperations()` was added +* `connectionRaiPolicyOperations()` was added +* `raiPolicyOperations()` was added +* `inferenceGroups()` was added +* `inferencePools()` was added + +#### `models.ImageMetadata` was modified + +* `osPatchingStatus()` was added + +#### `models.CustomKeysWorkspaceConnectionProperties` was modified + +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added +* `withError(java.lang.String)` was added +* `withPeStatus(models.ManagedPEStatus)` was added +* `withPeRequirement(models.ManagedPERequirement)` was added + +#### `models.UsernamePasswordAuthTypeWorkspaceConnectionProperties` was modified + +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added +* `withError(java.lang.String)` was added +* `withPeRequirement(models.ManagedPERequirement)` was added +* `withPeStatus(models.ManagedPEStatus)` was added + +#### `models.AccountKeyAuthTypeWorkspaceConnectionProperties` was modified + +* `withError(java.lang.String)` was added +* `withPeRequirement(models.ManagedPERequirement)` was added +* `withPeStatus(models.ManagedPEStatus)` was added +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added + +#### `models.SparkJob` was modified + +* `withParentJobName(java.lang.String)` was added + +#### `models.WorkspacePropertiesUpdateParameters` was modified + +* `softDeleteRetentionInDays()` was added +* `systemDatastoresAuthMode()` was added +* `ipAllowlist()` was added +* `networkAcls()` was added +* `enableSoftwareBillOfMaterials()` was added +* `allowRoleAssignmentOnRG()` was added + +#### `models.WorkspaceUpdateParameters` was modified + +* `withAllowRoleAssignmentOnRG(java.lang.Boolean)` was added +* `withSystemDatastoresAuthMode(models.SystemDatastoresAuthMode)` was added +* `withPublicNetworkAccess(models.PublicNetworkAccessType)` was added +* `ipAllowlist()` was added +* `withEnableSoftwareBillOfMaterials(java.lang.Boolean)` was added +* `enableSoftwareBillOfMaterials()` was added +* `withNetworkAcls(models.NetworkAcls)` was added +* `systemDatastoresAuthMode()` was added +* `withSoftDeleteRetentionInDays(java.lang.Integer)` was added +* `allowRoleAssignmentOnRG()` was added +* `withIpAllowlist(java.util.List)` was added +* `softDeleteRetentionInDays()` was added +* `networkAcls()` was added + +#### `models.UriFolderJobOutput` was modified + +* `withAssetName(java.lang.String)` was added +* `assetName()` was added + +#### `models.MLTableJobOutput` was modified + +* `withAssetName(java.lang.String)` was added +* `assetName()` was added + +#### `models.AccessKeyAuthTypeWorkspaceConnectionProperties` was modified + +* `withError(java.lang.String)` was added +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added +* `withPeStatus(models.ManagedPEStatus)` was added +* `withPeRequirement(models.ManagedPERequirement)` was added + +#### `models.CustomService` was modified + +* `withKernel(models.JupyterKernelConfig)` was added +* `kernel()` was added + +#### `models.AadAuthTypeWorkspaceConnectionProperties` was modified + +* `withPeRequirement(models.ManagedPERequirement)` was added +* `withPeStatus(models.ManagedPEStatus)` was added +* `withError(java.lang.String)` was added +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added + +#### `models.TritonModelJobOutput` was modified + +* `assetName()` was added +* `withAssetName(java.lang.String)` was added + +#### `models.WorkspaceConnectionPropertiesV2BasicResource` was modified + +* `testConnection(fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner,com.azure.core.util.Context)` was added +* `update()` was added +* `testConnection()` was added +* `resourceGroupName()` was added + +#### `models.WorkspaceProperties` was modified + +* `systemDatastoresAuthMode()` was added +* `enableServiceSideCmkEncryption()` was added +* `allowRoleAssignmentOnRG()` was added +* `ipAllowlist()` was added +* `storageAccounts()` was added +* `existingWorkspaces()` was added +* `softDeleteRetentionInDays()` was added +* `provisionNetworkNow()` was added +* `networkAcls()` was added +* `containerRegistries()` was added +* `agentsEndpointUri()` was added +* `enableSoftwareBillOfMaterials()` was added +* `keyVaults()` was added +* `enableSimplifiedCmk()` was added + +#### `models.OutboundRule` was modified + +* `parentRuleNames()` was added + +#### `models.SharedPrivateLinkResource` was modified + +* `withStatus(models.EndpointServiceConnectionStatus)` was added + +#### `models.ComputeResource` was modified + +* `updateDataMounts(java.util.List)` was added +* `updateIdleShutdownSettingWithResponse(models.IdleShutdownSetting,com.azure.core.util.Context)` was added +* `updateCustomServices(java.util.List)` was added +* `getAllowedResizeSizes()` was added +* `updateIdleShutdownSetting(models.IdleShutdownSetting)` was added +* `resize(models.ResizeSchema,com.azure.core.util.Context)` was added +* `updateDataMountsWithResponse(java.util.List,com.azure.core.util.Context)` was added +* `updateCustomServicesWithResponse(java.util.List,com.azure.core.util.Context)` was added +* `resize(models.ResizeSchema)` was added +* `getAllowedResizeSizesWithResponse(com.azure.core.util.Context)` was added + +#### `models.CustomModelJobOutput` was modified + +* `assetName()` was added +* `withAssetName(java.lang.String)` was added + +#### `models.PrivateLinkResources` was modified + +* `list(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added + +#### `models.SasAuthTypeWorkspaceConnectionProperties` was modified + +* `withPeRequirement(models.ManagedPERequirement)` was added +* `withPeStatus(models.ManagedPEStatus)` was added +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added +* `withError(java.lang.String)` was added + +#### `models.EncryptionProperty` was modified + +* `withSearchAccountResourceId(java.lang.String)` was added +* `storageAccountResourceId()` was added +* `cosmosDbResourceId()` was added +* `withStorageAccountResourceId(java.lang.String)` was added +* `withKeyVaultProperties(models.KeyVaultProperties)` was added +* `withCosmosDbResourceId(java.lang.String)` was added +* `searchAccountResourceId()` was added + +#### `models.CommandJob` was modified + +* `withParentJobName(java.lang.String)` was added + +#### `models.ManagedIdentityAuthTypeWorkspaceConnectionProperties` was modified + +* `withError(java.lang.String)` was added +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added +* `withPeRequirement(models.ManagedPERequirement)` was added +* `withPeStatus(models.ManagedPEStatus)` was added + +#### `models.ServiceTagDestination` was modified + +* `withAddressPrefixes(java.util.List)` was added + +#### `models.NotebookResourceInfo` was modified + +* `isPrivateLinkEnabled()` was added + +#### `models.PrivateLinkResourceListResult` was modified + +* `fromJson(com.azure.json.JsonReader)` was added +* `withValue(java.util.List)` was added +* `validate()` was added +* `toJson(com.azure.json.JsonWriter)` was added + +#### `models.ComputeInstanceProperties` was modified + +* `withAutologgerSettings(models.ComputeInstanceAutologgerSettings)` was added +* `autologgerSettings()` was added +* `idleTimeBeforeShutdown()` was added +* `withReleaseQuotaOnStop(java.lang.Boolean)` was added +* `withEnableRootAccess(java.lang.Boolean)` was added +* `enableRootAccess()` was added +* `withEnableSso(java.lang.Boolean)` was added +* `releaseQuotaOnStop()` was added +* `withEnableOSPatching(java.lang.Boolean)` was added +* `enableSso()` was added +* `enableOSPatching()` was added +* `withIdleTimeBeforeShutdown(java.lang.String)` was added + +#### `models.SweepJob` was modified + +* `withParentJobName(java.lang.String)` was added + +#### `models.ComputeInstanceDataMount` was modified + +* `mountMode()` was added +* `withMountMode(models.MountMode)` was added + +#### `models.AutoMLJob` was modified + +* `withParentJobName(java.lang.String)` was added + +#### `models.ContentSafety` was modified + +* `withContentSafetyLevel(models.ContentSafetyLevel)` was added +* `contentSafetyLevel()` was added + +#### `models.JobBaseProperties` was modified + +* `parentJobName()` was added +* `withParentJobName(java.lang.String)` was added + +#### `models.PatAuthTypeWorkspaceConnectionProperties` was modified -### Other Changes +* `withPeStatus(models.ManagedPEStatus)` was added +* `withUseWorkspaceManagedIdentity(java.lang.Boolean)` was added +* `withError(java.lang.String)` was added +* `withPeRequirement(models.ManagedPERequirement)` was added ## 1.1.0 (2024-08-22) diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/README.md b/sdk/machinelearning/azure-resourcemanager-machinelearning/README.md index 4184eaf56d90e..0bc248f53b678 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-2024-04. 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-2025-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.1.0 + 1.2.0-beta.1 ``` [//]: # ({x-version-update-end}) @@ -78,39 +78,37 @@ workspace = machineLearningManager.workspaces() .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()) + .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) diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/SAMPLE.md b/sdk/machinelearning/azure-resourcemanager-machinelearning/SAMPLE.md index 0ef21ec43a9a0..e71f2045df062 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/SAMPLE.md +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/SAMPLE.md @@ -18,6 +18,12 @@ - [ListKeys](#batchendpoints_listkeys) - [Update](#batchendpoints_update) +## CapabilityHosts + +- [CreateOrUpdate](#capabilityhosts_createorupdate) +- [Delete](#capabilityhosts_delete) +- [Get](#capabilityhosts_get) + ## CodeContainers - [CreateOrUpdate](#codecontainers_createorupdate) @@ -54,13 +60,59 @@ - [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) + +## Connection + +- [CreateOrUpdateDeployment](#connection_createorupdatedeployment) +- [DeleteDeployment](#connection_deletedeployment) +- [GetAllModels](#connection_getallmodels) +- [GetDeployment](#connection_getdeployment) +- [GetModels](#connection_getmodels) +- [ListDeployments](#connection_listdeployments) + +## ConnectionRaiBlocklistItem + +- [AddBulk](#connectionraiblocklistitem_addbulk) +- [Create](#connectionraiblocklistitem_create) +- [Delete](#connectionraiblocklistitem_delete) +- [DeleteBulk](#connectionraiblocklistitem_deletebulk) +- [Get](#connectionraiblocklistitem_get) + +## ConnectionRaiBlocklistItemsOperation + +- [List](#connectionraiblocklistitemsoperation_list) + +## ConnectionRaiBlocklistOperation + +- [Create](#connectionraiblocklistoperation_create) +- [Delete](#connectionraiblocklistoperation_delete) +- [Get](#connectionraiblocklistoperation_get) + +## ConnectionRaiBlocklists + +- [List](#connectionraiblocklists_list) + +## ConnectionRaiPolicies + +- [List](#connectionraipolicies_list) + +## ConnectionRaiPolicyOperation + +- [Create](#connectionraipolicyoperation_create) +- [Delete](#connectionraipolicyoperation_delete) +- [Get](#connectionraipolicyoperation_get) ## DataContainers @@ -85,6 +137,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) @@ -134,6 +203,35 @@ - [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) +- [GetDeltaModelsStatusAsync](#inferencegroups_getdeltamodelsstatusasync) +- [GetStatus](#inferencegroups_getstatus) +- [List](#inferencegroups_list) +- [ListDeltaModelsAsync](#inferencegroups_listdeltamodelsasync) +- [ListSkus](#inferencegroups_listskus) +- [ModifyDeltaModelsAsync](#inferencegroups_modifydeltamodelsasync) +- [Update](#inferencegroups_update) + +## InferencePools + +- [CreateOrUpdate](#inferencepools_createorupdate) +- [Delete](#inferencepools_delete) +- [Get](#inferencepools_get) +- [List](#inferencepools_list) +- [Update](#inferencepools_update) + ## Jobs - [Cancel](#jobs_cancel) @@ -211,11 +309,27 @@ - [List](#privatelinkresources_list) +## PtuQuota + +- [GetAvailable](#ptuquota_getavailable) +- [List](#ptuquota_list) +- [ListAvailable](#ptuquota_listavailable) + ## Quotas - [List](#quotas_list) - [Update](#quotas_update) +## RaiPolicies + +- [List](#raipolicies_list) + +## RaiPolicyOperation + +- [Create](#raipolicyoperation_create) +- [Delete](#raipolicyoperation_delete) +- [Get](#raipolicyoperation_get) + ## Registries - [CreateOrUpdate](#registries_createorupdate) @@ -335,6 +449,8 @@ - [Get](#workspaceconnections_get) - [List](#workspaceconnections_list) - [ListSecrets](#workspaceconnections_listsecrets) +- [TestConnection](#workspaceconnections_testconnection) +- [Update](#workspaceconnections_update) ## WorkspaceFeatures @@ -384,8 +500,8 @@ import java.util.Map; public final class BatchDeploymentsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchDeployment/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/BatchDeployment/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Batch Deployment. @@ -398,19 +514,19 @@ public final class BatchDeploymentsCreateOrUpdateSamples { .define("testDeploymentName") .withRegion("string") .withExistingBatchEndpoint("test-rg", "my-aml-workspace", "testEndpointName") - .withProperties(new BatchDeploymentProperties().withDescription("string") - .withProperties(mapOf("string", "string")) + .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) - .withRetrySettings(new BatchRetrySettings().withMaxRetries(1).withTimeout(Duration.parse("PT5M"))) - .withMiniBatchSize(1L) .withLoggingLevel(BatchLoggingLevel.INFO) - .withModel(new IdAssetReference().withAssetId("string")) .withMaxConcurrencyPerInstance(1) + .withMiniBatchSize(1L) + .withModel(new IdAssetReference().withAssetId("string")) .withOutputAction(BatchOutputAction.SUMMARY_ONLY) .withOutputFileName("string") .withResources(new DeploymentResourceConfiguration().withInstanceCount(1) @@ -418,11 +534,12 @@ public final class BatchDeploymentsCreateOrUpdateSamples { .withProperties(mapOf("string", SerializerFactory.createDefaultManagementSerializerAdapter() .deserialize("{\"cd3c37dc-2876-4ca4-8a54-21bd7619724a\":null}", Object.class, - SerializerEncoding.JSON))))) + SerializerEncoding.JSON)))) + .withRetrySettings(new BatchRetrySettings().withMaxRetries(1).withTimeout(Duration.parse("PT5M")))) .withTags(mapOf()) - .withKind("string") .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") .withSku(new Sku().withName("string") .withTier(SkuTier.FREE) .withSize("string") @@ -454,8 +571,8 @@ public final class BatchDeploymentsCreateOrUpdateSamples { public final class BatchDeploymentsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchDeployment/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/BatchDeployment/delete.json */ /** * Sample code: Delete Workspace Batch Deployment. @@ -480,8 +597,8 @@ public final class BatchDeploymentsDeleteSamples { public final class BatchDeploymentsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchDeployment/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/BatchDeployment/get.json */ /** * Sample code: Get Workspace Batch Deployment. @@ -506,8 +623,8 @@ public final class BatchDeploymentsGetSamples { public final class BatchDeploymentsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchDeployment/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/BatchDeployment/list.json */ /** * Sample code: List Workspace Batch Deployment. @@ -537,8 +654,8 @@ import java.util.Map; public final class BatchDeploymentsUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchDeployment/update.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/BatchDeployment/update.json */ /** * Sample code: Update Workspace Batch Deployment. @@ -591,8 +708,8 @@ import java.util.Map; public final class BatchEndpointsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchEndpoint/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/BatchEndpoint/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Batch Endpoint. @@ -605,14 +722,14 @@ public final class BatchEndpointsCreateOrUpdateSamples { .define("testEndpointName") .withRegion("string") .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties(new BatchEndpointProperties().withDescription("string") + .withProperties(new BatchEndpointProperties().withAuthMode(EndpointAuthMode.AMLTOKEN) + .withDescription("string") .withProperties(mapOf("string", "string")) - .withAuthMode(EndpointAuthMode.AMLTOKEN) .withDefaults(new BatchEndpointDefaults().withDeploymentName("string"))) .withTags(mapOf()) - .withKind("string") .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") .withSku(new Sku().withName("string") .withTier(SkuTier.FREE) .withSize("string") @@ -644,8 +761,8 @@ public final class BatchEndpointsCreateOrUpdateSamples { public final class BatchEndpointsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchEndpoint/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/BatchEndpoint/delete.json */ /** * Sample code: Delete Workspace Batch Endpoint. @@ -669,8 +786,8 @@ public final class BatchEndpointsDeleteSamples { public final class BatchEndpointsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchEndpoint/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/BatchEndpoint/get.json */ /** * Sample code: Get Workspace Batch Endpoint. @@ -694,8 +811,8 @@ public final class BatchEndpointsGetSamples { public final class BatchEndpointsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchEndpoint/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/BatchEndpoint/list.json */ /** * Sample code: List Workspace Batch Endpoint. @@ -718,8 +835,8 @@ public final class BatchEndpointsListSamples { public final class BatchEndpointsListKeysSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchEndpoint/listKeys.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/BatchEndpoint/listKeys.json */ /** * Sample code: ListKeys Workspace Batch Endpoint. @@ -752,8 +869,8 @@ import java.util.Map; public final class BatchEndpointsUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchEndpoint/update.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/BatchEndpoint/update.json */ /** * Sample code: Update Workspace Batch Endpoint. @@ -788,6 +905,85 @@ public final class BatchEndpointsUpdateSamples { } ``` +### CapabilityHosts_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.CapabilityHostProperties; + +/** + * Samples for CapabilityHosts CreateOrUpdate. + */ +public final class CapabilityHostsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/CapabilityHost/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate CapabilityHost. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + createOrUpdateCapabilityHost(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.capabilityHosts() + .define("capabilityHostName") + .withExistingWorkspace("test-rg", "my-aml-workspace") + .withProperties(new CapabilityHostProperties().withCustomerSubnet( + "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myResourceGroups/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet")) + .create(); + } +} +``` + +### CapabilityHosts_Delete + +```java +/** + * Samples for CapabilityHosts Delete. + */ +public final class CapabilityHostsDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/CapabilityHost/delete.json + */ + /** + * Sample code: Delete CapabilityHost. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteCapabilityHost(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.capabilityHosts() + .delete("test-rg", "my-aml-workspace", "capabilityHostName", com.azure.core.util.Context.NONE); + } +} +``` + +### CapabilityHosts_Get + +```java +/** + * Samples for CapabilityHosts Get. + */ +public final class CapabilityHostsGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/CapabilityHost/get.json + */ + /** + * Sample code: Get CapabilityHost. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getCapabilityHost(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.capabilityHosts() + .getWithResponse("test-rg", "my-aml-workspace", "capabilityHostName", com.azure.core.util.Context.NONE); + } +} +``` + ### CodeContainers_CreateOrUpdate ```java @@ -801,8 +997,8 @@ import java.util.Map; public final class CodeContainersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeContainer/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/CodeContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Code Container. @@ -842,8 +1038,8 @@ public final class CodeContainersCreateOrUpdateSamples { public final class CodeContainersDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeContainer/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/CodeContainer/delete.json */ /** * Sample code: Delete Workspace Code Container. @@ -867,8 +1063,8 @@ public final class CodeContainersDeleteSamples { public final class CodeContainersGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeContainer/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/CodeContainer/get.json */ /** * Sample code: Get Workspace Code Container. @@ -892,8 +1088,8 @@ public final class CodeContainersGetSamples { public final class CodeContainersListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeContainer/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/CodeContainer/list.json */ /** * Sample code: List Workspace Code Container. @@ -919,8 +1115,8 @@ import com.azure.resourcemanager.machinelearning.models.PendingUploadType; public final class CodeVersionsCreateOrGetStartPendingUploadSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeVersion/createOrGetStartPendingUpload.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/CodeVersion/createOrGetStartPendingUpload.json */ /** * Sample code: CreateOrGetStartPendingUpload Workspace Code Version. @@ -951,8 +1147,8 @@ import java.util.Map; public final class CodeVersionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeVersion/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/CodeVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Code Version. @@ -965,8 +1161,8 @@ public final class CodeVersionsCreateOrUpdateSamples { .define("string") .withExistingCode("test-rg", "my-aml-workspace", "string") .withProperties(new CodeVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) .withCodeUri("fakeTokenPlaceholder")) .create(); @@ -995,8 +1191,8 @@ public final class CodeVersionsCreateOrUpdateSamples { public final class CodeVersionsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeVersion/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/CodeVersion/delete.json */ /** * Sample code: Delete Workspace Code Version. @@ -1020,8 +1216,8 @@ public final class CodeVersionsDeleteSamples { public final class CodeVersionsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeVersion/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/CodeVersion/get.json */ /** * Sample code: Get Workspace Code Version. @@ -1045,8 +1241,8 @@ public final class CodeVersionsGetSamples { public final class CodeVersionsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeVersion/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/CodeVersion/list.json */ /** * Sample code: List Workspace Code Version. @@ -1073,8 +1269,8 @@ import com.azure.resourcemanager.machinelearning.models.DestinationAsset; public final class CodeVersionsPublishSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeVersion/publish.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/CodeVersion/publish.json */ /** * Sample code: Publish Workspace Code Version. @@ -1085,9 +1281,9 @@ public final class CodeVersionsPublishSamples { publishWorkspaceCodeVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.codeVersions() .publish("test-rg", "my-aml-workspace", "string", "string", - new DestinationAsset().withRegistryName("string") - .withDestinationName("string") - .withDestinationVersion("string"), + new DestinationAsset().withDestinationName("string") + .withDestinationVersion("string") + .withRegistryName("string"), com.azure.core.util.Context.NONE); } } @@ -1106,8 +1302,8 @@ import java.util.Map; public final class ComponentContainersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentContainer/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ComponentContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Component Container. @@ -1120,8 +1316,8 @@ public final class ComponentContainersCreateOrUpdateSamples { .define("string") .withExistingWorkspace("test-rg", "my-aml-workspace") .withProperties(new ComponentContainerProperties().withDescription("string") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string"))) + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string"))) .create(); } @@ -1148,8 +1344,8 @@ public final class ComponentContainersCreateOrUpdateSamples { public final class ComponentContainersDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentContainer/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ComponentContainer/delete.json */ /** * Sample code: Delete Workspace Component Container. @@ -1173,8 +1369,8 @@ public final class ComponentContainersDeleteSamples { public final class ComponentContainersGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentContainer/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ComponentContainer/get.json */ /** * Sample code: Get Workspace Component Container. @@ -1199,8 +1395,8 @@ public final class ComponentContainersGetSamples { public final class ComponentContainersListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentContainer/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ComponentContainer/list.json */ /** * Sample code: List Workspace Component Container. @@ -1230,8 +1426,8 @@ import java.util.Map; public final class ComponentVersionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentVersion/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ComponentVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Component Version. @@ -1244,8 +1440,8 @@ public final class ComponentVersionsCreateOrUpdateSamples { .define("string") .withExistingComponent("test-rg", "my-aml-workspace", "string") .withProperties(new ComponentVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) .withComponentSpec(SerializerFactory.createDefaultManagementSerializerAdapter() .deserialize("{\"8ced901b-d826-477d-bfef-329da9672513\":null}", Object.class, @@ -1276,8 +1472,8 @@ public final class ComponentVersionsCreateOrUpdateSamples { public final class ComponentVersionsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentVersion/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ComponentVersion/delete.json */ /** * Sample code: Delete Workspace Component Version. @@ -1301,8 +1497,8 @@ public final class ComponentVersionsDeleteSamples { public final class ComponentVersionsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentVersion/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ComponentVersion/get.json */ /** * Sample code: Get Workspace Component Version. @@ -1327,8 +1523,8 @@ public final class ComponentVersionsGetSamples { public final class ComponentVersionsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentVersion/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ComponentVersion/list.json */ /** * Sample code: List Workspace Component Version. @@ -1354,8 +1550,8 @@ import com.azure.resourcemanager.machinelearning.models.DestinationAsset; public final class ComponentVersionsPublishSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentVersion/publish.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ComponentVersion/publish.json */ /** * Sample code: Publish Workspace Component Version. @@ -1366,9 +1562,9 @@ public final class ComponentVersionsPublishSamples { publishWorkspaceComponentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.componentVersions() .publish("test-rg", "my-aml-workspace", "string", "string", - new DestinationAsset().withRegistryName("string") - .withDestinationName("string") - .withDestinationVersion("string"), + new DestinationAsset().withDestinationName("string") + .withDestinationVersion("string") + .withRegistryName("string"), com.azure.core.util.Context.NONE); } } @@ -1385,6 +1581,7 @@ 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; @@ -1402,8 +1599,10 @@ 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; @@ -1427,8 +1626,8 @@ import java.util.Map; public final class ComputeCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/BasicAKSCompute.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/createOrUpdate/BasicAKSCompute.json */ /** * Sample code: Create an AKS Compute. @@ -1446,8 +1645,8 @@ public final class ComputeCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/AKSCompute.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/createOrUpdate/AKSCompute.json */ /** * Sample code: Update an AKS Compute. @@ -1468,8 +1667,8 @@ public final class ComputeCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/KubernetesCompute.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/createOrUpdate/KubernetesCompute.json */ /** * Sample code: Attach a Kubernetes Compute. @@ -1496,8 +1695,8 @@ public final class ComputeCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/ComputeInstanceWithSchedules.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/createOrUpdate/ComputeInstanceWithSchedules.json */ /** * Sample code: Create an ComputeInstance Compute with Schedules. @@ -1530,8 +1729,8 @@ public final class ComputeCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/BasicAmlCompute.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/createOrUpdate/BasicAmlCompute.json */ /** * Sample code: Create a AML Compute. @@ -1559,8 +1758,8 @@ public final class ComputeCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/ComputeInstance.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/createOrUpdate/ComputeInstance.json */ /** * Sample code: Create an ComputeInstance Compute. @@ -1577,26 +1776,35 @@ public final class ComputeCreateOrUpdateSamples { 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") + .withCustomServices(Arrays.asList(new CustomService().withName("rstudio-workbench") .withImage(new Image().withType(ImageType.DOCKER) - .withReference("ghcr.io/azure/rocker-rstudio-ml-verse:latest") + .withReference("ghcr.io/azure/rstudio-workbench:latest") .withAdditionalProperties(mapOf())) - .withEnvironmentVariables(mapOf("test_variable", + .withEnvironmentVariables(mapOf("RSP_LICENSE", new EnvironmentVariable().withType(EnvironmentVariableType.LOCAL) - .withValue("test_value") + .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(8787))) + .withPublished(4444))) .withVolumes(Arrays.asList(new VolumeDefinition().withType(VolumeDefinitionType.BIND) - .withReadOnly(false) - .withSource("/home/azureuser/cloudfiles") - .withTarget("/home/azureuser/cloudfiles"))) + .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"))))) @@ -1605,8 +1813,8 @@ public final class ComputeCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/ComputeInstanceMinimal.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/createOrUpdate/ComputeInstanceMinimal.json */ /** * Sample code: Create an ComputeInstance Compute with minimal inputs. @@ -1626,8 +1834,8 @@ public final class ComputeCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/AmlCompute.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/createOrUpdate/AmlCompute.json */ /** * Sample code: Update a AML Compute. @@ -1648,8 +1856,8 @@ public final class ComputeCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/BasicDataFactoryCompute.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/createOrUpdate/BasicDataFactoryCompute.json */ /** * Sample code: Create a DataFactory Compute. @@ -1691,8 +1899,8 @@ import com.azure.resourcemanager.machinelearning.models.UnderlyingResourceAction public final class ComputeDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/delete.json */ /** * Sample code: Delete Compute. @@ -1716,8 +1924,8 @@ public final class ComputeDeleteSamples { public final class ComputeGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/get/AKSCompute.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/get/AKSCompute.json */ /** * Sample code: Get a AKS Compute. @@ -1731,8 +1939,8 @@ public final class ComputeGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/get/KubernetesCompute.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/get/KubernetesCompute.json */ /** * Sample code: Get a Kubernetes Compute. @@ -1746,8 +1954,8 @@ public final class ComputeGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/get/ComputeInstance.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/get/ComputeInstance.json */ /** * Sample code: Get an ComputeInstance. @@ -1761,8 +1969,8 @@ public final class ComputeGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/get/AmlCompute.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/get/AmlCompute.json */ /** * Sample code: Get a AML Compute. @@ -1776,6 +1984,31 @@ public final class ComputeGetSamples { } ``` +### Compute_GetAllowedResizeSizes + +```java +/** + * Samples for Compute GetAllowedResizeSizes. + */ +public final class ComputeGetAllowedResizeSizesSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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); + } +} +``` + ### Compute_List ```java @@ -1785,8 +2018,8 @@ public final class ComputeGetSamples { public final class ComputeListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/list.json */ /** * Sample code: Get Computes. @@ -1808,8 +2041,8 @@ public final class ComputeListSamples { public final class ComputeListKeysSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/listKeys.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/listKeys.json */ /** * Sample code: List AKS Compute Keys. @@ -1832,8 +2065,8 @@ public final class ComputeListKeysSamples { public final class ComputeListNodesSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/listNodes.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/listNodes.json */ /** * Sample code: Get compute nodes information for a compute. @@ -1847,6 +2080,33 @@ public final class ComputeListNodesSamples { } ``` +### 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/2025-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 @@ -1856,8 +2116,8 @@ public final class ComputeListNodesSamples { public final class ComputeRestartSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/restart.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/restart.json */ /** * Sample code: Restart ComputeInstance Compute. @@ -1880,8 +2140,8 @@ public final class ComputeRestartSamples { public final class ComputeStartSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/start.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/start.json */ /** * Sample code: Start ComputeInstance Compute. @@ -1904,8 +2164,8 @@ public final class ComputeStartSamples { public final class ComputeStopSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/stop.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/stop.json */ /** * Sample code: Stop ComputeInstance Compute. @@ -1933,8 +2193,8 @@ import java.time.Duration; public final class ComputeUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/patch.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/patch.json */ /** * Sample code: Update a AmlCompute Compute. @@ -1955,38 +2215,59 @@ public final class ComputeUpdateSamples { } ``` -### DataContainers_CreateOrUpdate +### Compute_UpdateCustomServices ```java -import com.azure.resourcemanager.machinelearning.models.DataContainerProperties; -import com.azure.resourcemanager.machinelearning.models.DataType; +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 DataContainers CreateOrUpdate. + * Samples for Compute UpdateCustomServices. */ -public final class DataContainersCreateOrUpdateSamples { +public final class ComputeUpdateCustomServicesSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataContainer/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/updateCustomServices.json */ /** - * Sample code: CreateOrUpdate Workspace Data Container. + * Sample code: Update Custom Services. * * @param manager Entry point to MachineLearningManager. */ - public static void - createOrUpdateWorkspaceDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.dataContainers() - .define("datacontainer123") - .withExistingWorkspace("testrg123", "workspace123") - .withProperties(new DataContainerProperties().withDescription("string") - .withTags(mapOf("tag1", "value1", "tag2", "value2")) - .withProperties(mapOf("properties1", "value1", "properties2", "value2")) - .withDataType(DataType.fromString("UriFile"))) - .create(); + 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 @@ -2003,644 +2284,789 @@ public final class DataContainersCreateOrUpdateSamples { } ``` -### DataContainers_Delete +### 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; + /** - * Samples for DataContainers Delete. + * Samples for Compute UpdateDataMounts. */ -public final class DataContainersDeleteSamples { +public final class ComputeUpdateDataMountsSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataContainer/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/updateDataMounts.json */ /** - * Sample code: Delete Workspace Data Container. + * Sample code: Update Data Mounts. * * @param manager Entry point to MachineLearningManager. */ - public static void - deleteWorkspaceDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.dataContainers() - .deleteWithResponse("testrg123", "workspace123", "datacontainer123", com.azure.core.util.Context.NONE); + 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); } } ``` -### DataContainers_Get +### Compute_UpdateIdleShutdownSetting ```java +import com.azure.resourcemanager.machinelearning.models.IdleShutdownSetting; + /** - * Samples for DataContainers Get. + * Samples for Compute UpdateIdleShutdownSetting. */ -public final class DataContainersGetSamples { +public final class ComputeUpdateIdleShutdownSettingSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataContainer/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/updateIdleShutdownSetting.json */ /** - * Sample code: Get Workspace Data Container. + * Sample code: Update idle shutdown setting of ComputeInstance. * * @param manager Entry point to MachineLearningManager. */ - public static void - getWorkspaceDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.dataContainers() - .getWithResponse("testrg123", "workspace123", "datacontainer123", com.azure.core.util.Context.NONE); + 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_List +### Connection_CreateOrUpdateDeployment ```java +import com.azure.resourcemanager.machinelearning.models.DeploymentModelVersionUpgradeOption; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentModel; +import com.azure.resourcemanager.machinelearning.models.OpenAIEndpointDeploymentResourceProperties; /** - * Samples for DataContainers List. + * Samples for Connection CreateOrUpdateDeployment. */ -public final class DataContainersListSamples { +public final class ConnectionCreateOrUpdateDeploymentSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataContainer/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/createDeployment.json */ /** - * Sample code: List Workspace Data Container. + * Sample code: Create Azure OpenAI Connection Deployment. * * @param manager Entry point to MachineLearningManager. */ - public static void - listWorkspaceDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.dataContainers().list("testrg123", "workspace123", null, null, com.azure.core.util.Context.NONE); + public static void createAzureOpenAIConnectionDeployment( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connections() + .define("text-davinci-003") + .withExistingConnection("resourceGroup-1", "testworkspace", "testConnection") + .withProperties(new OpenAIEndpointDeploymentResourceProperties() + .withModel( + new EndpointDeploymentModel().withFormat("OpenAI").withName("text-davinci-003").withVersion("1")) + .withVersionUpgradeOption(DeploymentModelVersionUpgradeOption.ONCE_NEW_DEFAULT_VERSION_AVAILABLE)) + .create(); } } ``` -### DataVersions_CreateOrUpdate +### Connection_DeleteDeployment ```java -import com.azure.resourcemanager.machinelearning.models.UriFileDataVersion; -import java.util.HashMap; -import java.util.Map; - /** - * Samples for DataVersions CreateOrUpdate. + * Samples for Connection DeleteDeployment. */ -public final class DataVersionsCreateOrUpdateSamples { +public final class ConnectionDeleteDeploymentSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataVersionBase/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/deleteDeployment.json */ /** - * Sample code: CreateOrUpdate Workspace Data Version Base. + * Sample code: Delete Azure OpenAI Connection Deployment. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateWorkspaceDataVersionBase( + public static void deleteAzureOpenAIConnectionDeployment( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.dataVersions() - .define("string") - .withExistingData("test-rg", "my-aml-workspace", "string") - .withProperties(new UriFileDataVersion().withDescription("string") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string")) - .withIsAnonymous(false) - .withDataUri("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; + manager.connections() + .deleteDeployment("test-rg", "aml-workspace-name", "testConnection", "testDeploymentName", null, + com.azure.core.util.Context.NONE); } } ``` -### DataVersions_Delete +### Connection_GetAllModels ```java /** - * Samples for DataVersions Delete. + * Samples for Connection GetAllModels. */ -public final class DataVersionsDeleteSamples { +public final class ConnectionGetAllModelsSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataVersionBase/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/listConnectionModels.json */ /** - * Sample code: Delete Workspace Data Version Base. + * Sample code: Get models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. * * @param manager Entry point to MachineLearningManager. */ - 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); + public static void getModelsUnderTheAzureMLWorkspaceForAllAzureOpenAIConnectionsThatTheUserCanDeploy( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connections() + .getAllModelsWithResponse("test-rg", "aml-workspace-name", com.azure.core.util.Context.NONE); } } ``` -### DataVersions_Get +### Connection_GetDeployment ```java /** - * Samples for DataVersions Get. + * Samples for Connection GetDeployment. */ -public final class DataVersionsGetSamples { +public final class ConnectionGetDeploymentSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataVersionBase/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/getDeployment.json */ /** - * Sample code: Get Workspace Data Version Base. + * Sample code: Get Azure OpenAI Connection Deployment. * * @param manager Entry point to MachineLearningManager. */ 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); + getAzureOpenAIConnectionDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connections() + .getDeploymentWithResponse("resourceGroup-1", "testworkspace", "testConnection", "text-davinci-003", + com.azure.core.util.Context.NONE); } } ``` -### DataVersions_List +### Connection_GetModels ```java - /** - * Samples for DataVersions List. + * Samples for Connection GetModels. */ -public final class DataVersionsListSamples { +public final class ConnectionGetModelsSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataVersionBase/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/getModels.json */ /** - * Sample code: List Workspace Data Version Base. + * Sample code: Get Azure OpenAI Connection Models. * * @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, - com.azure.core.util.Context.NONE); + getAzureOpenAIConnectionModels(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connections() + .getModels("test-rg", "aml-workspace-name", "testConnection", null, com.azure.core.util.Context.NONE); } } ``` -### DataVersions_Publish +### Connection_ListDeployments ```java -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; - /** - * Samples for DataVersions Publish. + * Samples for Connection ListDeployments. */ -public final class DataVersionsPublishSamples { +public final class ConnectionListDeploymentsSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataVersionBase/publish.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/listDeployments.json */ /** - * Sample code: Publish Workspace Data Version Base. + * Sample code: List Azure OpenAI Connection Deployments. * * @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().withRegistryName("string") - .withDestinationName("string") - .withDestinationVersion("string"), + listAzureOpenAIConnectionDeployments(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connections() + .listDeployments("resourceGroup-1", "testworkspace", "testConnection", null, com.azure.core.util.Context.NONE); } } ``` -### Datastores_CreateOrUpdate +### ConnectionRaiBlocklistItem_AddBulk ```java -import com.azure.resourcemanager.machinelearning.models.AccountKeyDatastoreCredentials; -import com.azure.resourcemanager.machinelearning.models.AccountKeyDatastoreSecrets; -import com.azure.resourcemanager.machinelearning.models.AzureBlobDatastore; -import com.azure.resourcemanager.machinelearning.models.AzureDataLakeGen1Datastore; -import com.azure.resourcemanager.machinelearning.models.AzureDataLakeGen2Datastore; -import com.azure.resourcemanager.machinelearning.models.AzureFileDatastore; -import com.azure.resourcemanager.machinelearning.models.ServicePrincipalDatastoreCredentials; -import com.azure.resourcemanager.machinelearning.models.ServicePrincipalDatastoreSecrets; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemBulkRequest; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemProperties; +import java.util.Arrays; /** - * Samples for Datastores CreateOrUpdate. + * Samples for ConnectionRaiBlocklistItem AddBulk. */ -public final class DatastoresCreateOrUpdateSamples { +public final class ConnectionRaiBlocklistItemAddBulkSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/RaiBlocklistItem/addBulk.json */ /** - * Sample code: CreateOrUpdate datastore (Azure Data Lake Gen1 w/ ServicePrincipal). + * Sample code: Create Bulk Rai Blocklist Items. * * @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") - .withResourceUrl("string") - .withTenantId(UUID.fromString("00000000-1111-2222-3333-444444444444")) - .withClientId(UUID.fromString("00000000-1111-2222-3333-444444444444")) - .withSecrets(new ServicePrincipalDatastoreSecrets().withClientSecret("fakeTokenPlaceholder"))) - .withStoreName("string")) - .withSkipValidation(false) - .create(); + public static void + createBulkRaiBlocklistItems(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiBlocklistItems() + .addBulk("test-rg", "aml-workspace-name", "testConnection", "raiBlocklistName", + Arrays.asList( + new RaiBlocklistItemBulkRequest().withName("myblocklistitem1") + .withProperties( + new RaiBlocklistItemProperties().withIsRegex(true).withPattern("^[a-z0-9_-]{2,16}$")), + new RaiBlocklistItemBulkRequest().withName("myblocklistitem2") + .withProperties(new RaiBlocklistItemProperties().withIsRegex(false).withPattern("blockwords"))), + com.azure.core.util.Context.NONE); } +} +``` + +### ConnectionRaiBlocklistItem_Create + +```java +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemProperties; +/** + * Samples for ConnectionRaiBlocklistItem Create. + */ +public final class ConnectionRaiBlocklistItemCreateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/RaiBlocklistItem/create.json */ /** - * Sample code: CreateOrUpdate datastore (Azure Data Lake Gen2 w/ Service Principal). + * Sample code: Create RaiBlocklist Item. * * @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") - .withResourceUrl("string") - .withTenantId(UUID.fromString("00000000-1111-2222-3333-444444444444")) - .withClientId(UUID.fromString("00000000-1111-2222-3333-444444444444")) - .withSecrets(new ServicePrincipalDatastoreSecrets().withClientSecret("fakeTokenPlaceholder"))) - .withFilesystem("string") - .withAccountName("string") - .withEndpoint("string") - .withProtocol("string")) - .withSkipValidation(false) + public static void + createRaiBlocklistItem(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiBlocklistItems() + .define("raiBlocklistItemName") + .withExistingRaiBlocklist("test-rg", "aml-workspace-name", "testConnection", "raiBlocklistName") + .withProperties(new RaiBlocklistItemProperties().withIsRegex(false).withPattern("Pattern To Block")) .create(); } +} +``` +### ConnectionRaiBlocklistItem_Delete + +```java +/** + * Samples for ConnectionRaiBlocklistItem Delete. + */ +public final class ConnectionRaiBlocklistItemDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/AzureBlobWAccountKey/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/RaiBlocklistItem/delete.json */ /** - * Sample code: CreateOrUpdate datastore (AzureBlob w/ AccountKey). + * Sample code: Delete RaiBlocklist Item. * * @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 + deleteRaiBlocklistItem(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiBlocklistItems() + .delete("test-rg", "aml-workspace-name", "testConnection", "raiBlocklistName", "raiBlocklistItemName", null, + com.azure.core.util.Context.NONE); } +} +``` + +### ConnectionRaiBlocklistItem_DeleteBulk + +```java +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import java.io.IOException; +/** + * Samples for ConnectionRaiBlocklistItem DeleteBulk. + */ +public final class ConnectionRaiBlocklistItemDeleteBulkSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/AzureFileWAccountKey/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/RaiBlocklistItem/deleteBulk.json */ /** - * Sample code: CreateOrUpdate datastore (Azure File store w/ AccountKey). + * Sample code: Delete Bulk Rai Blocklist Items. * * @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") - .withFileShareName("string") - .withEndpoint("string") - .withProtocol("string")) - .withSkipValidation(false) - .create(); + public static void deleteBulkRaiBlocklistItems( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { + manager.connectionRaiBlocklistItems() + .deleteBulk("test-rg", "aml-workspace-name", "testConnection", "raiBlocklistName", + SerializerFactory.createDefaultManagementSerializerAdapter() + .deserialize("[\"myblocklistitem1\",\"myblocklistitem2\"]", 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<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; +### ConnectionRaiBlocklistItem_Get + +```java +/** + * Samples for ConnectionRaiBlocklistItem Get. + */ +public final class ConnectionRaiBlocklistItemGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/RaiBlocklistItem/get.json + */ + /** + * Sample code: Get Rai RaiBlocklist Item. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + getRaiRaiBlocklistItem(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiBlocklistItems() + .getWithResponse("test-rg", "aml-workspace-name", "testConnection", "raiBlocklistName", + "raiBlocklistItemName", com.azure.core.util.Context.NONE); } } ``` -### Datastores_Delete +### ConnectionRaiBlocklistItemsOperation_List ```java /** - * Samples for Datastores Delete. + * Samples for ConnectionRaiBlocklistItemsOperation List. */ -public final class DatastoresDeleteSamples { +public final class ConnectionRaiBlocklistItemsOperationListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/RaiBlocklistItem/list.json */ /** - * Sample code: Delete datastore. + * Sample code: List RaiBlocklist Items. * * @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); + public static void listRaiBlocklistItems(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiBlocklistItemsOperations() + .list("test-rg", "aml-workspace-name", "testConnection", "raiBlocklistName", null, + com.azure.core.util.Context.NONE); } } ``` -### Datastores_Get +### ConnectionRaiBlocklistOperation_Create ```java +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistProperties; + /** - * Samples for Datastores Get. + * Samples for ConnectionRaiBlocklistOperation Create. */ -public final class DatastoresGetSamples { +public final class ConnectionRaiBlocklistOperationCreateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/RaiBlocklist/create.json */ /** - * Sample code: Get datastore. + * Sample code: Create Rai Blocklist. * * @param manager Entry point to MachineLearningManager. */ - public static void getDatastore(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.datastores().getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + public static void createRaiBlocklist(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiBlocklistOperations() + .define("raiBlocklistName") + .withExistingConnection("test-rg", "aml-workspace-name", "testConnection") + .withProperties(new RaiBlocklistProperties().withDescription("Basic blocklist description")) + .create(); } } ``` -### Datastores_List +### ConnectionRaiBlocklistOperation_Delete ```java -import java.util.Arrays; - /** - * Samples for Datastores List. + * Samples for ConnectionRaiBlocklistOperation Delete. */ -public final class DatastoresListSamples { +public final class ConnectionRaiBlocklistOperationDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/RaiBlocklist/delete.json */ /** - * Sample code: List datastores. + * Sample code: Delete Rai Blocklist. * * @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, + public static void deleteRaiBlocklist(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiBlocklistOperations() + .delete("test-rg", "aml-workspace-name", "testConnection", "raiBlocklistName", null, com.azure.core.util.Context.NONE); } } ``` -### Datastores_ListSecrets +### ConnectionRaiBlocklistOperation_Get ```java /** - * Samples for Datastores ListSecrets. + * Samples for ConnectionRaiBlocklistOperation Get. */ -public final class DatastoresListSecretsSamples { +public final class ConnectionRaiBlocklistOperationGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/listSecrets.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/RaiBlocklist/get.json */ /** - * Sample code: Get datastore secrets. + * Sample code: Get Rai Blocklist. * * @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); + public static void getRaiBlocklist(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiBlocklistOperations() + .getWithResponse("test-rg", "aml-workspace-name", "testConnection", "raiBlocklistName", + com.azure.core.util.Context.NONE); } } ``` -### EnvironmentContainers_CreateOrUpdate +### ConnectionRaiBlocklists_List ```java -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties; -import java.util.HashMap; -import java.util.Map; - /** - * Samples for EnvironmentContainers CreateOrUpdate. + * Samples for ConnectionRaiBlocklists List. */ -public final class EnvironmentContainersCreateOrUpdateSamples { +public final class ConnectionRaiBlocklistsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentContainer/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/RaiBlocklist/list.json */ /** - * Sample code: CreateOrUpdate Workspace Environment Container. + * Sample code: List Rai Blocklist. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateWorkspaceEnvironmentContainer( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.environmentContainers() - .define("testEnvironment") - .withExistingWorkspace("testrg123", "testworkspace") - .withProperties(new EnvironmentContainerProperties().withDescription("string") - .withTags(mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) - .withProperties( - mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string"))) - .create(); + public static void listRaiBlocklist(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiBlocklists() + .list("test-rg", "aml-workspace-name", "testConnection", null, 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; +### ConnectionRaiPolicies_List + +```java +/** + * Samples for ConnectionRaiPolicies List. + */ +public final class ConnectionRaiPoliciesListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/RaiPolicy/list.json + */ + /** + * Sample code: List Rai policy. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRaiPolicy(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiPolicies() + .list("test-rg", "aml-workspace-name", "testConnection", null, com.azure.core.util.Context.NONE); } } ``` -### EnvironmentContainers_Delete +### ConnectionRaiPolicyOperation_Create ```java +import com.azure.resourcemanager.machinelearning.models.AllowedContentLevel; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistConfig; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyContentFilter; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyContentSource; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyMode; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyProperties; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyType; +import java.util.Arrays; + /** - * Samples for EnvironmentContainers Delete. + * Samples for ConnectionRaiPolicyOperation Create. */ -public final class EnvironmentContainersDeleteSamples { +public final class ConnectionRaiPolicyOperationCreateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentContainer/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/RaiPolicy/create.json */ /** - * Sample code: Delete Workspace Environment Container. + * Sample code: Create Rai policy. * * @param manager Entry point to MachineLearningManager. */ - public static void - deleteWorkspaceEnvironmentContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.environmentContainers() - .deleteWithResponse("testrg123", "testworkspace", "testContainer", com.azure.core.util.Context.NONE); + public static void createRaiPolicy(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiPolicyOperations() + .define("raiPolicyName") + .withExistingConnection("test-rg", "aml-workspace-name", "testConnection") + .withProperties(new RaiPolicyProperties().withBasePolicyName("112") + .withCompletionBlocklists( + Arrays.asList(new RaiBlocklistConfig().withBlocking(false).withBlocklistName("blocklistName"))) + .withContentFilters( + Arrays.asList(new RaiPolicyContentFilter().withAllowedContentLevel(AllowedContentLevel.LOW) + .withBlocking(false) + .withEnabled(false) + .withName("policyName") + .withSource(RaiPolicyContentSource.PROMPT))) + .withMode(RaiPolicyMode.BLOCKING) + .withPromptBlocklists( + Arrays.asList(new RaiBlocklistConfig().withBlocking(false).withBlocklistName("blocklistName"))) + .withType(RaiPolicyType.SYSTEM_MANAGED)) + .create(); } } ``` -### EnvironmentContainers_Get +### ConnectionRaiPolicyOperation_Delete ```java /** - * Samples for EnvironmentContainers Get. + * Samples for ConnectionRaiPolicyOperation Delete. */ -public final class EnvironmentContainersGetSamples { +public final class ConnectionRaiPolicyOperationDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentContainer/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/RaiPolicy/delete.json */ /** - * Sample code: Get Workspace Environment Container. + * Sample code: Delete Rai policy. * * @param manager Entry point to MachineLearningManager. */ - public static void - getWorkspaceEnvironmentContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.environmentContainers() - .getWithResponse("testrg123", "testworkspace", "testEnvironment", com.azure.core.util.Context.NONE); + public static void deleteRaiPolicy(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiPolicyOperations() + .delete("test-rg", "aml-workspace-name", "testConnection", "raiPolicyName", null, + com.azure.core.util.Context.NONE); } } ``` -### EnvironmentContainers_List +### ConnectionRaiPolicyOperation_Get ```java - /** - * Samples for EnvironmentContainers List. + * Samples for ConnectionRaiPolicyOperation Get. */ -public final class EnvironmentContainersListSamples { +public final class ConnectionRaiPolicyOperationGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentContainer/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/RaiPolicy/get.json */ /** - * Sample code: List Workspace Environment Container. + * Sample code: Get Rai policy. * * @param manager Entry point to MachineLearningManager. */ - public static void - listWorkspaceEnvironmentContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.environmentContainers() - .list("testrg123", "testworkspace", null, null, com.azure.core.util.Context.NONE); + public static void getRaiPolicy(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiPolicyOperations() + .getWithResponse("test-rg", "aml-workspace-name", "testConnection", "raiPolicyName", + com.azure.core.util.Context.NONE); } } ``` -### EnvironmentVersions_CreateOrUpdate +### DataContainers_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 com.azure.resourcemanager.machinelearning.models.DataContainerProperties; +import com.azure.resourcemanager.machinelearning.models.DataType; import java.util.HashMap; import java.util.Map; /** - * Samples for EnvironmentVersions CreateOrUpdate. + * Samples for DataContainers CreateOrUpdate. */ -public final class EnvironmentVersionsCreateOrUpdateSamples { +public final class DataContainersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentVersion/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/DataContainer/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Workspace Environment Version. + * Sample code: CreateOrUpdate Workspace Data Container. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateWorkspaceEnvironmentVersion( + public static void + createOrUpdateWorkspaceDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.dataContainers() + .define("datacontainer123") + .withExistingWorkspace("testrg123", "workspace123") + .withProperties(new DataContainerProperties().withDescription("string") + .withProperties(mapOf("properties1", "value1", "properties2", "value2")) + .withTags(mapOf("tag1", "value1", "tag2", "value2")) + .withDataType(DataType.fromString("UriFile"))) + .create(); + } + + // 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; + } +} +``` + +### DataContainers_Delete + +```java +/** + * Samples for DataContainers Delete. + */ +public final class DataContainersDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/DataContainer/delete.json + */ + /** + * Sample code: Delete Workspace Data Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + deleteWorkspaceDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.dataContainers() + .deleteWithResponse("testrg123", "workspace123", "datacontainer123", com.azure.core.util.Context.NONE); + } +} +``` + +### DataContainers_Get + +```java +/** + * Samples for DataContainers Get. + */ +public final class DataContainersGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/DataContainer/get.json + */ + /** + * Sample code: Get Workspace Data Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + getWorkspaceDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.dataContainers() + .getWithResponse("testrg123", "workspace123", "datacontainer123", com.azure.core.util.Context.NONE); + } +} +``` + +### DataContainers_List + +```java + +/** + * Samples for DataContainers List. + */ +public final class DataContainersListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/DataContainer/list.json + */ + /** + * Sample code: List Workspace Data Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + listWorkspaceDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.dataContainers().list("testrg123", "workspace123", null, null, com.azure.core.util.Context.NONE); + } +} +``` + +### DataVersions_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.UriFileDataVersion; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for DataVersions CreateOrUpdate. + */ +public final class DataVersionsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/DataVersionBase/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Workspace Data Version Base. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateWorkspaceDataVersionBase( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.environmentVersions() + manager.dataVersions() .define("string") - .withExistingEnvironment("test-rg", "my-aml-workspace", "string") - .withProperties(new EnvironmentVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) + .withExistingData("test-rg", "my-aml-workspace", "string") + .withProperties(new UriFileDataVersion().withDescription("string") .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) - .withImage("docker.io/tensorflow/serving:latest") - .withCondaFile("string") - .withBuild(new BuildContext().withContextUri( - "https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/") - .withDockerfilePath("prod/Dockerfile")) - .withInferenceConfig( - new InferenceContainerProperties().withLivenessRoute(new Route().withPath("string").withPort(1)) - .withReadinessRoute(new Route().withPath("string").withPort(1)) - .withScoringRoute(new Route().withPath("string").withPort(1)))) + .withDataUri("string")) .create(); } @@ -2658,194 +3084,1850 @@ public final class EnvironmentVersionsCreateOrUpdateSamples { } ``` -### EnvironmentVersions_Delete +### DataVersions_Delete ```java /** - * Samples for EnvironmentVersions Delete. + * Samples for DataVersions Delete. */ -public final class EnvironmentVersionsDeleteSamples { +public final class DataVersionsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentVersion/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/DataVersionBase/delete.json */ /** - * Sample code: Delete Workspace Environment Version. + * Sample code: Delete Workspace Data Version Base. * * @param manager Entry point to MachineLearningManager. */ public static void - deleteWorkspaceEnvironmentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.environmentVersions() + deleteWorkspaceDataVersionBase(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.dataVersions() .deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); } } ``` -### EnvironmentVersions_Get +### DataVersions_Get ```java /** - * Samples for EnvironmentVersions Get. + * Samples for DataVersions Get. */ -public final class EnvironmentVersionsGetSamples { +public final class DataVersionsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentVersion/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/DataVersionBase/get.json */ /** - * Sample code: Get Workspace Environment Version. + * Sample code: Get Workspace Data Version Base. * * @param manager Entry point to MachineLearningManager. */ public static void - getWorkspaceEnvironmentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.environmentVersions() + getWorkspaceDataVersionBase(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.dataVersions() .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); } } ``` -### EnvironmentVersions_List +### DataVersions_List ```java /** - * Samples for EnvironmentVersions List. + * Samples for DataVersions List. */ -public final class EnvironmentVersionsListSamples { +public final class DataVersionsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentVersion/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/DataVersionBase/list.json */ /** - * Sample code: List Workspace Environment Version. + * Sample code: List Workspace Data Version Base. * * @param manager Entry point to MachineLearningManager. */ public static void - listWorkspaceEnvironmentVersion(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); + listWorkspaceDataVersionBase(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); + } +} +``` + +### 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/2025-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); + } +} +``` + +### Datastores_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.AccountKeyDatastoreCredentials; +import com.azure.resourcemanager.machinelearning.models.AccountKeyDatastoreSecrets; +import com.azure.resourcemanager.machinelearning.models.AzureBlobDatastore; +import com.azure.resourcemanager.machinelearning.models.AzureDataLakeGen1Datastore; +import com.azure.resourcemanager.machinelearning.models.AzureDataLakeGen2Datastore; +import com.azure.resourcemanager.machinelearning.models.AzureFileDatastore; +import com.azure.resourcemanager.machinelearning.models.ServicePrincipalDatastoreCredentials; +import com.azure.resourcemanager.machinelearning.models.ServicePrincipalDatastoreSecrets; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + +/** + * Samples for Datastores CreateOrUpdate. + */ +public final class DatastoresCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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(); + } + + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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/preview/2025-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(); + } + + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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(); + } + + // 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; + } +} +``` + +### Datastores_Delete + +```java +/** + * Samples for Datastores Delete. + */ +public final class DatastoresDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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); + } +} +``` + +### Datastores_Get + +```java +/** + * Samples for Datastores Get. + */ +public final class DatastoresGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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) { + manager.datastores().getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); + } +} +``` + +### Datastores_List + +```java +import java.util.Arrays; + +/** + * Samples for Datastores List. + */ +public final class DatastoresListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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); + } +} +``` + +### Datastores_ListSecrets + +```java +import com.azure.resourcemanager.machinelearning.models.SecretExpiry; + +/** + * Samples for Datastores ListSecrets. + */ +public final class DatastoresListSecretsSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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", + new SecretExpiry().withExpirableSecret(false).withExpireAfterHours(1), + com.azure.core.util.Context.NONE); + } +} +``` + +### Endpoint_CreateOrUpdate + +```java +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/2025-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(); + } +} +``` + +### Endpoint_Get + +```java +/** + * Samples for Endpoint Get. + */ +public final class EndpointGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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); + } +} +``` + +### Endpoint_GetModels + +```java +/** + * Samples for Endpoint GetModels. + */ +public final class EndpointGetModelsSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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); + } +} +``` + +### Endpoint_List + +```java +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/2025-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, null, null, null, "skip_string", null, + com.azure.core.util.Context.NONE); + } +} +``` + +### Endpoint_ListKeys + +```java +/** + * Samples for Endpoint ListKeys. + */ +public final class EndpointListKeysSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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); + } +} +``` + +### Endpoint_RegenerateKeys + +```java +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/2025-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); + } +} +``` + +### EndpointDeployment_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; +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/2025-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() + .createOrUpdate("resourceGroup-1", "testworkspace", "Azure.OpenAI", "text-davinci-003", + new EndpointDeploymentResourcePropertiesBasicResourceInner() + .withProperties(new OpenAIEndpointDeploymentResourceProperties() + .withModel(new EndpointDeploymentModel().withFormat("OpenAI") + .withName("text-davinci-003") + .withVersion("1")) + .withVersionUpgradeOption( + DeploymentModelVersionUpgradeOption.ONCE_NEW_DEFAULT_VERSION_AVAILABLE)), + com.azure.core.util.Context.NONE); + } +} +``` + +### EndpointDeployment_Delete + +```java +/** + * Samples for EndpointDeployment Delete. + */ +public final class EndpointDeploymentDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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", null, + com.azure.core.util.Context.NONE); + } +} +``` + +### EndpointDeployment_Get + +```java +/** + * Samples for EndpointDeployment Get. + */ +public final class EndpointDeploymentGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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); + } +} +``` + +### EndpointDeployment_GetInWorkspace + +```java + +/** + * Samples for EndpointDeployment GetInWorkspace. + */ +public final class EndpointDeploymentGetInWorkspaceSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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); + } +} +``` + +### EndpointDeployment_List + +```java +/** + * Samples for EndpointDeployment List. + */ +public final class EndpointDeploymentListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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); + } +} +``` + +### EnvironmentContainers_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for EnvironmentContainers CreateOrUpdate. + */ +public final class EnvironmentContainersCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/EnvironmentContainer/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Workspace Environment Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createOrUpdateWorkspaceEnvironmentContainer( + 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(); + } + + // 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; + } +} +``` + +### EnvironmentContainers_Delete + +```java +/** + * Samples for EnvironmentContainers Delete. + */ +public final class EnvironmentContainersDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/EnvironmentContainer/delete.json + */ + /** + * Sample code: Delete Workspace Environment Container. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + deleteWorkspaceEnvironmentContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.environmentContainers() + .deleteWithResponse("testrg123", "testworkspace", "testContainer", com.azure.core.util.Context.NONE); + } +} +``` + +### EnvironmentContainers_Get + +```java +/** + * Samples for EnvironmentContainers Get. + */ +public final class EnvironmentContainersGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/EnvironmentContainer/get.json + */ + /** + * Sample code: Get Workspace Environment Container. + * + * @param manager Entry point to MachineLearningManager. + */ + 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 + +/** + * Samples for EnvironmentContainers List. + */ +public final class EnvironmentContainersListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/EnvironmentContainer/list.json + */ + /** + * Sample code: List Workspace Environment Container. + * + * @param manager Entry point to MachineLearningManager. + */ + 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.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/preview/2025-01-01- + * preview/examples/Workspace/EnvironmentVersion/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate Workspace Environment Version. + * + * @param manager Entry point to MachineLearningManager. + */ + 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(); + } + + // 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; + } +} +``` + +### EnvironmentVersions_Delete + +```java +/** + * Samples for EnvironmentVersions Delete. + */ +public final class EnvironmentVersionsDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/EnvironmentVersion/delete.json + */ + /** + * Sample code: Delete Workspace Environment Version. + * + * @param manager Entry point to MachineLearningManager. + */ + 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/preview/2025-01-01- + * preview/examples/Workspace/EnvironmentVersion/get.json + */ + /** + * Sample code: Get Workspace Environment Version. + * + * @param manager Entry point to MachineLearningManager. + */ + 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 + +/** + * Samples for EnvironmentVersions List. + */ +public final class EnvironmentVersionsListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/EnvironmentVersion/list.json + */ + /** + * Sample code: List Workspace Environment Version. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + listWorkspaceEnvironmentVersion(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); + } +} +``` + +### 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/preview/2025-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); + } +} +``` + +### Features_Get + +```java +/** + * Samples for Features Get. + */ +public final class FeaturesGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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 + +/** + * Samples for Features List. + */ +public final class FeaturesListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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 FeaturesetContainers CreateOrUpdate. + */ +public final class FeaturesetContainersCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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; + } +} +``` + +### FeaturesetContainers_Delete + +```java +/** + * Samples for FeaturesetContainers Delete. + */ +public final class FeaturesetContainersDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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); + } +} +``` + +### FeaturesetContainers_GetEntity + +```java +/** + * Samples for FeaturesetContainers GetEntity. + */ +public final class FeaturesetContainersGetEntitySamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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); + } +} +``` + +### FeaturesetContainers_List + +```java +import com.azure.resourcemanager.machinelearning.models.ListViewType; + +/** + * Samples for FeaturesetContainers List. + */ +public final class FeaturesetContainersListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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); + } +} +``` + +### FeaturesetVersions_Backfill + +```java +import com.azure.resourcemanager.machinelearning.models.DataAvailabilityStatus; +import com.azure.resourcemanager.machinelearning.models.FeatureWindow; +import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionBackfillRequest; +import com.azure.resourcemanager.machinelearning.models.MaterializationComputeResource; +import java.time.OffsetDateTime; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for FeaturesetVersions Backfill. + */ +public final class FeaturesetVersionsBackfillSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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; + } +} +``` + +### FeaturesetVersions_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; +import com.azure.resourcemanager.machinelearning.models.FeaturesetSpecification; +import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionProperties; +import com.azure.resourcemanager.machinelearning.models.MaterializationComputeResource; +import com.azure.resourcemanager.machinelearning.models.MaterializationSettings; +import com.azure.resourcemanager.machinelearning.models.MaterializationStoreType; +import com.azure.resourcemanager.machinelearning.models.NotificationSetting; +import com.azure.resourcemanager.machinelearning.models.RecurrenceFrequency; +import com.azure.resourcemanager.machinelearning.models.RecurrenceSchedule; +import com.azure.resourcemanager.machinelearning.models.RecurrenceTrigger; +import com.azure.resourcemanager.machinelearning.models.WeekDay; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for FeaturesetVersions CreateOrUpdate. + */ +public final class FeaturesetVersionsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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/preview/2025-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); + } +} +``` + +### FeaturesetVersions_Get + +```java +/** + * Samples for FeaturesetVersions Get. + */ +public final class FeaturesetVersionsGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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); + } +} +``` + +### FeaturesetVersions_List + +```java +import com.azure.resourcemanager.machinelearning.models.ListViewType; + +/** + * Samples for FeaturesetVersions List. + */ +public final class FeaturesetVersionsListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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); + } +} +``` + +### FeaturestoreEntityContainers_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainerProperties; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for FeaturestoreEntityContainers CreateOrUpdate. + */ +public final class FeaturestoreEntityContainersCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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; + } +} +``` + +### FeaturestoreEntityContainers_Delete + +```java +/** + * Samples for FeaturestoreEntityContainers Delete. + */ +public final class FeaturestoreEntityContainersDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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); + } +} +``` + +### FeaturestoreEntityContainers_GetEntity + +```java +/** + * Samples for FeaturestoreEntityContainers GetEntity. + */ +public final class FeaturestoreEntityContainersGetEntitySamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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); + } +} +``` + +### FeaturestoreEntityContainers_List + +```java +import com.azure.resourcemanager.machinelearning.models.ListViewType; + +/** + * Samples for FeaturestoreEntityContainers List. + */ +public final class FeaturestoreEntityContainersListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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); + } +} +``` + +### FeaturestoreEntityVersions_CreateOrUpdate + +```java +import com.azure.resourcemanager.machinelearning.models.FeatureDataType; +import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersionProperties; +import com.azure.resourcemanager.machinelearning.models.IndexColumn; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for FeaturestoreEntityVersions CreateOrUpdate. + */ +public final class FeaturestoreEntityVersionsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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; + } +} +``` + +### FeaturestoreEntityVersions_Delete + +```java +/** + * Samples for FeaturestoreEntityVersions Delete. + */ +public final class FeaturestoreEntityVersionsDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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); + } +} +``` + +### FeaturestoreEntityVersions_Get + +```java +/** + * Samples for FeaturestoreEntityVersions Get. + */ +public final class FeaturestoreEntityVersionsGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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); + } +} +``` + +### FeaturestoreEntityVersions_List + +```java +import com.azure.resourcemanager.machinelearning.models.ListViewType; + +/** + * Samples for FeaturestoreEntityVersions List. + */ +public final class FeaturestoreEntityVersionsListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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); + } +} +``` + +### InferenceEndpoints_CreateOrUpdate + +```java +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.RequestConfiguration; +import com.azure.resourcemanager.machinelearning.models.Sku; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import com.azure.resourcemanager.machinelearning.models.StringKeyValuePair; +import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; +import java.time.Duration; +import java.util.Arrays; +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/2025-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( + Arrays.asList(new StringKeyValuePair().withKey("fakeTokenPlaceholder").withValue("string"))) + .withAuthMode(AuthMode.AAD) + .withGroupName("string") + .withRequestConfiguration(new RequestConfiguration().withMaxConcurrentRequestsPerInstance(1) + .withRequestTimeout(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.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; + } +} +``` + +### InferenceEndpoints_Delete + +```java +/** + * Samples for InferenceEndpoints Delete. + */ +public final class InferenceEndpointsDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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); } } ``` -### EnvironmentVersions_Publish +### InferenceEndpoints_Get ```java -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; - /** - * Samples for EnvironmentVersions Publish. + * Samples for InferenceEndpoints Get. */ -public final class EnvironmentVersionsPublishSamples { +public final class InferenceEndpointsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentVersion/publish.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/InferenceEndpoint/get.json */ /** - * Sample code: Publish Workspace Environment Version. + * Sample code: Get Workspace Inference Endpoint. * * @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().withRegistryName("string") - .withDestinationName("string") - .withDestinationVersion("string"), + getWorkspaceInferenceEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceEndpoints() + .getWithResponse("test-rg", "my-aml-workspace", "string", "testEndpointName", com.azure.core.util.Context.NONE); } } ``` -### Features_Get +### InferenceEndpoints_List ```java +import com.azure.resourcemanager.machinelearning.models.OrderString; + /** - * Samples for Features Get. + * Samples for InferenceEndpoints List. */ -public final class FeaturesGetSamples { +public final class InferenceEndpointsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Feature/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/InferenceEndpoint/list.json */ /** - * Sample code: Get Feature. + * Sample code: List Workspace Inference Endpoint. * * @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", + 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); } } ``` -### Features_List +### InferenceEndpoints_Update ```java +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import java.io.IOException; /** - * Samples for Features List. + * Samples for InferenceEndpoints Update. */ -public final class FeaturesListSamples { +public final class InferenceEndpointsUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Feature/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/InferenceEndpoint/update.json */ /** - * Sample code: List Feature. + * Sample code: Update Workspace Inference Endpoint. * * @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, + 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); } } ``` -### FeaturesetContainers_CreateOrUpdate +### InferenceGroups_CreateOrUpdate ```java -import com.azure.resourcemanager.machinelearning.models.FeaturesetContainerProperties; +import com.azure.resourcemanager.machinelearning.models.GroupEnvironmentConfiguration; +import com.azure.resourcemanager.machinelearning.models.GroupModelConfiguration; +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.ProbeSettings; +import com.azure.resourcemanager.machinelearning.models.Sku; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import com.azure.resourcemanager.machinelearning.models.StringKeyValuePair; +import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; +import java.time.Duration; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; /** - * Samples for FeaturesetContainers CreateOrUpdate. + * Samples for InferenceGroups CreateOrUpdate. */ -public final class FeaturesetContainersCreateOrUpdateSamples { +public final class InferenceGroupsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetContainer/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/InferenceGroup/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Workspace Featureset Container. + * Sample code: CreateOrUpdate Workspace Inference Group. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateWorkspaceFeaturesetContainer( + public static void createOrUpdateWorkspaceInferenceGroup( com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featuresetContainers() + manager.inferenceGroups() .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties(new FeaturesetContainerProperties().withDescription("string") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string")) - .withIsArchived(false)) + .withRegion("string") + .withExistingInferencePool("test-rg", "my-aml-workspace", "string") + .withProperties(new InferenceGroupProperties().withDescription("string") + .withProperties( + Arrays.asList(new StringKeyValuePair().withKey("fakeTokenPlaceholder").withValue("string"))) + .withEnvironmentConfiguration(new GroupEnvironmentConfiguration() + .withEnvironmentId("azureml://registries/test-registry/models/enginefeed/versions/1") + .withEnvironmentVariables( + Arrays.asList(new StringKeyValuePair().withKey("fakeTokenPlaceholder").withValue("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 GroupModelConfiguration() + .withModelId("azureml://registries/test-registry/models/modelabc/versions/1")) + .withNodeSkuType("string") + .withScaleUnitSize(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(); } @@ -2863,326 +4945,329 @@ public final class FeaturesetContainersCreateOrUpdateSamples { } ``` -### FeaturesetContainers_Delete +### InferenceGroups_Delete ```java /** - * Samples for FeaturesetContainers Delete. + * Samples for InferenceGroups Delete. */ -public final class FeaturesetContainersDeleteSamples { +public final class InferenceGroupsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetContainer/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/InferenceGroup/delete.json */ /** - * Sample code: Delete Workspace Featureset Container. + * Sample code: Delete Workspace Inference Group. * * @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); + deleteWorkspaceInferenceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceGroups() + .delete("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); } } ``` -### FeaturesetContainers_GetEntity +### InferenceGroups_Get ```java /** - * Samples for FeaturesetContainers GetEntity. + * Samples for InferenceGroups Get. */ -public final class FeaturesetContainersGetEntitySamples { +public final class InferenceGroupsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetContainer/getEntity.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/InferenceGroup/get.json */ /** - * Sample code: GetEntity Workspace Featureset Container. + * Sample code: Get Workspace Inference Group. * * @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); + 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); } } ``` -### FeaturesetContainers_List +### InferenceGroups_GetDeltaModelsStatusAsync ```java -import com.azure.resourcemanager.machinelearning.models.ListViewType; +import com.azure.resourcemanager.machinelearning.models.DeltaModelStatusRequest; +import java.util.Arrays; /** - * Samples for FeaturesetContainers List. + * Samples for InferenceGroups GetDeltaModelsStatusAsync. */ -public final class FeaturesetContainersListSamples { +public final class InferenceGroupsGetDeltaModelsStatusAsyncSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetContainer/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/InferenceGroup/getDeltaModelsStatusAsync.json */ /** - * Sample code: List Workspace Featureset Container. + * Sample code: GetDeltaModelsStatusAsync Inference Group. * * @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, + public static void getDeltaModelsStatusAsyncInferenceGroup( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceGroups() + .getDeltaModelsStatusAsyncWithResponse("test-rg", "my-aml-workspace", "string", "string", + new DeltaModelStatusRequest().withDeltaModels(Arrays.asList("string")) + .withTargetBaseModel("azureml://registries/test-registry/models/modelabc/versions/1"), com.azure.core.util.Context.NONE); } } ``` -### FeaturesetVersions_Backfill +### InferenceGroups_GetStatus ```java -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.util.Arrays; -import java.util.HashMap; -import java.util.Map; - /** - * Samples for FeaturesetVersions Backfill. + * Samples for InferenceGroups GetStatus. */ -public final class FeaturesetVersionsBackfillSamples { +public final class InferenceGroupsGetStatusSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetVersion/backfill.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/InferenceGroup/getStatus.json */ /** - * Sample code: Backfill Workspace Featureset Version. + * Sample code: GetStatus Workspace Inference Group. * * @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().withDisplayName("string") - .withDescription("string") - .withFeatureWindow(new FeatureWindow() - .withFeatureWindowStart(OffsetDateTime.parse("2020-01-01T12:34:56.999+00:51")) - .withFeatureWindowEnd(OffsetDateTime.parse("2020-01-01T12:34:56.999+00:51"))) - .withDataAvailabilityStatus(Arrays.asList(DataAvailabilityStatus.NONE)) - .withJobId("string") - .withTags(mapOf("string", "string")) - .withResource(new MaterializationComputeResource().withInstanceType("string")) - .withSparkConfiguration(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; + getStatusWorkspaceInferenceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceGroups() + .getStatusWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); } } ``` -### FeaturesetVersions_CreateOrUpdate +### InferenceGroups_List ```java -import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; -import com.azure.resourcemanager.machinelearning.models.FeaturesetSpecification; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionProperties; -import com.azure.resourcemanager.machinelearning.models.MaterializationComputeResource; -import com.azure.resourcemanager.machinelearning.models.MaterializationSettings; -import com.azure.resourcemanager.machinelearning.models.MaterializationStoreType; -import com.azure.resourcemanager.machinelearning.models.NotificationSetting; -import com.azure.resourcemanager.machinelearning.models.RecurrenceFrequency; -import com.azure.resourcemanager.machinelearning.models.RecurrenceSchedule; -import com.azure.resourcemanager.machinelearning.models.RecurrenceTrigger; -import com.azure.resourcemanager.machinelearning.models.WeekDay; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.machinelearning.models.OrderString; /** - * Samples for FeaturesetVersions CreateOrUpdate. + * Samples for InferenceGroups List. */ -public final class FeaturesetVersionsCreateOrUpdateSamples { +public final class InferenceGroupsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetVersion/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/InferenceGroup/list.json */ /** - * Sample code: CreateOrUpdate Workspace Featureset Version. + * Sample code: List Workspace Inference Group. * * @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") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string")) - .withIsArchived(false) - .withIsAnonymous(false) - .withSpecification(new FeaturesetSpecification().withPath("string")) - .withMaterializationSettings( - new MaterializationSettings().withStoreType(MaterializationStoreType.ONLINE) - .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)) - .withWeekDays(Arrays.asList(WeekDay.MONDAY)) - .withMonthDays(Arrays.asList(1)))) - .withNotification(new NotificationSetting().withEmails(Arrays.asList("string")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_FAILED))) - .withResource(new MaterializationComputeResource().withInstanceType("string")) - .withSparkConfiguration(mapOf("string", "string"))) - .withStage("string") - .withEntities(Arrays.asList("string"))) - .create(); + 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); } +} +``` - // 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; +### InferenceGroups_ListDeltaModelsAsync + +```java +import com.azure.resourcemanager.machinelearning.models.DeltaModelListRequest; + +/** + * Samples for InferenceGroups ListDeltaModelsAsync. + */ +public final class InferenceGroupsListDeltaModelsAsyncSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/InferenceGroup/listDeltaModelsAsync.json + */ + /** + * Sample code: ListDeltaModelsAsync Inference Group. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + listDeltaModelsAsyncInferenceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceGroups() + .listDeltaModelsAsync("test-rg", "my-aml-workspace", "string", "string", + new DeltaModelListRequest().withCount(-1) + .withSkipToken("fakeTokenPlaceholder") + .withTargetBaseModel("azureml://registries/test-registry/models/modelabc/versions/1"), + com.azure.core.util.Context.NONE); } } ``` -### FeaturesetVersions_Delete +### InferenceGroups_ListSkus ```java /** - * Samples for FeaturesetVersions Delete. + * Samples for InferenceGroups ListSkus. */ -public final class FeaturesetVersionsDeleteSamples { +public final class InferenceGroupsListSkusSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetVersion/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/InferenceGroup/listSkus.json */ /** - * Sample code: Delete Workspace Featureset Version. + * Sample code: ListSkus Workspace Inference Group. * * @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); + 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); } } ``` -### FeaturesetVersions_Get +### InferenceGroups_ModifyDeltaModelsAsync ```java +import com.azure.resourcemanager.machinelearning.models.DeltaModelModifyRequest; +import java.util.Arrays; + /** - * Samples for FeaturesetVersions Get. + * Samples for InferenceGroups ModifyDeltaModelsAsync. */ -public final class FeaturesetVersionsGetSamples { +public final class InferenceGroupsModifyDeltaModelsAsyncSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetVersion/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/InferenceGroup/modifyDeltaModelsAsync.json */ /** - * Sample code: Get Workspace Featureset Version. + * Sample code: ModifyDeltaModelsAsync Inference Group. * * @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); + modifyDeltaModelsAsyncInferenceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceGroups() + .modifyDeltaModelsAsync("test-rg", "my-aml-workspace", "string", "string", + new DeltaModelModifyRequest().withAddDeltaModels(Arrays.asList("string")) + .withRemoveDeltaModels(Arrays.asList("string")) + .withTargetBaseModel("azureml://registries/test-registry/models/modelabc/versions/1"), + com.azure.core.util.Context.NONE); } } ``` -### FeaturesetVersions_List +### InferenceGroups_Update ```java -import com.azure.resourcemanager.machinelearning.models.ListViewType; +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 FeaturesetVersions List. + * Samples for InferenceGroups Update. */ -public final class FeaturesetVersionsListSamples { +public final class InferenceGroupsUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetVersion/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/InferenceGroup/update.json */ /** - * Sample code: List Workspace Featureset Version. + * Sample code: Update Workspace Inference Group. * * @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); + 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; } } ``` -### FeaturestoreEntityContainers_CreateOrUpdate +### InferencePools_CreateOrUpdate ```java -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainerProperties; +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.ScaleUnitConfiguration; +import com.azure.resourcemanager.machinelearning.models.Sku; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import com.azure.resourcemanager.machinelearning.models.StringKeyValuePair; +import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; /** - * Samples for FeaturestoreEntityContainers CreateOrUpdate. + * Samples for InferencePools CreateOrUpdate. */ -public final class FeaturestoreEntityContainersCreateOrUpdateSamples { +public final class InferencePoolsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityContainer/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/InferencePool/createOrUpdate.json */ /** - * Sample code: CreateOrUpdate Workspace Featurestore Entity Container. + * Sample code: CreateOrUpdate Workspace Inference Pool. * * @param manager Entry point to MachineLearningManager. */ - public static void createOrUpdateWorkspaceFeaturestoreEntityContainer( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featurestoreEntityContainers() + public static void + createOrUpdateWorkspaceInferencePool(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferencePools() .define("string") + .withRegion("string") .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties(new FeaturestoreEntityContainerProperties().withDescription("string") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string")) - .withIsArchived(false)) + .withProperties(new InferencePoolProperties().withDescription("string") + .withProperties( + Arrays.asList(new StringKeyValuePair().withKey("fakeTokenPlaceholder").withValue("string"))) + .withScaleUnitConfiguration(new ScaleUnitConfiguration().withDisablePublicEgress(false) + .withRegistries(Arrays.asList("string", "registryName1")))) + .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(); } @@ -3200,122 +5285,128 @@ public final class FeaturestoreEntityContainersCreateOrUpdateSamples { } ``` -### FeaturestoreEntityContainers_Delete +### InferencePools_Delete ```java /** - * Samples for FeaturestoreEntityContainers Delete. + * Samples for InferencePools Delete. */ -public final class FeaturestoreEntityContainersDeleteSamples { +public final class InferencePoolsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityContainer/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/InferencePool/delete.json */ /** - * Sample code: Delete Workspace Featurestore Entity Container. + * Sample code: Delete Workspace Inference Pool. * * @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); + 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); } } ``` -### FeaturestoreEntityContainers_GetEntity +### InferencePools_Get ```java /** - * Samples for FeaturestoreEntityContainers GetEntity. + * Samples for InferencePools Get. */ -public final class FeaturestoreEntityContainersGetEntitySamples { +public final class InferencePoolsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityContainer/getEntity.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/InferencePool/get.json */ /** - * Sample code: GetEntity Workspace Featurestore Entity Container. + * Sample code: Get Workspace Inference Pool. * * @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); + 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); } } ``` -### FeaturestoreEntityContainers_List +### InferencePools_List ```java -import com.azure.resourcemanager.machinelearning.models.ListViewType; +import com.azure.resourcemanager.machinelearning.models.OrderString; /** - * Samples for FeaturestoreEntityContainers List. + * Samples for InferencePools List. */ -public final class FeaturestoreEntityContainersListSamples { +public final class InferencePoolsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityContainer/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/InferencePool/list.json */ /** - * Sample code: List Workspace Featurestore Entity Container. + * Sample code: List Workspace Inference Pool. * * @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, + 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); } } ``` -### FeaturestoreEntityVersions_CreateOrUpdate +### InferencePools_Update ```java -import com.azure.resourcemanager.machinelearning.models.FeatureDataType; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersionProperties; -import com.azure.resourcemanager.machinelearning.models.IndexColumn; -import java.util.Arrays; +import 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 FeaturestoreEntityVersions CreateOrUpdate. + * Samples for InferencePools Update. */ -public final class FeaturestoreEntityVersionsCreateOrUpdateSamples { +public final class InferencePoolsUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityVersion/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/InferencePool/update.json */ /** - * Sample code: CreateOrUpdate Workspace Featurestore Entity Version. + * Sample code: Update Workspace Inference Pool. * * @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") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string")) - .withIsArchived(false) - .withIsAnonymous(false) - .withIndexColumns(Arrays - .asList(new IndexColumn().withDataType(FeatureDataType.DATETIME).withColumnName("string")))) - .create(); + 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 @@ -3332,84 +5423,6 @@ public final class FeaturestoreEntityVersionsCreateOrUpdateSamples { } ``` -### FeaturestoreEntityVersions_Delete - -```java -/** - * Samples for FeaturestoreEntityVersions Delete. - */ -public final class FeaturestoreEntityVersionsDeleteSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityVersion/delete.json - */ - /** - * Sample code: Delete Workspace Featurestore Entity Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void deleteWorkspaceFeaturestoreEntityVersion( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featurestoreEntityVersions() - .delete("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); - } -} -``` - -### FeaturestoreEntityVersions_Get - -```java -/** - * Samples for FeaturestoreEntityVersions Get. - */ -public final class FeaturestoreEntityVersionsGetSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityVersion/get.json - */ - /** - * Sample code: Get Workspace Featurestore Entity Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getWorkspaceFeaturestoreEntityVersion( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featurestoreEntityVersions() - .getWithResponse("test-rg", "my-aml-workspace", "string", "string", com.azure.core.util.Context.NONE); - } -} -``` - -### FeaturestoreEntityVersions_List - -```java -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -/** - * Samples for FeaturestoreEntityVersions List. - */ -public final class FeaturestoreEntityVersionsListSamples { - /* - * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityVersion/list.json - */ - /** - * Sample code: List Workspace Featurestore Entity Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listWorkspaceFeaturestoreEntityVersion( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.featurestoreEntityVersions() - .list("test-rg", "my-aml-workspace", "string", null, "string", ListViewType.ACTIVE_ONLY, null, null, null, - null, null, null, com.azure.core.util.Context.NONE); - } -} -``` - ### Jobs_Cancel ```java @@ -3419,8 +5432,8 @@ public final class FeaturestoreEntityVersionsListSamples { public final class JobsCancelSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/cancel.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Job/cancel.json */ /** * Sample code: Cancel Job. @@ -3442,25 +5455,35 @@ 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.CustomModelFineTuning; +import com.azure.resourcemanager.machinelearning.models.FineTuningJob; +import com.azure.resourcemanager.machinelearning.models.FineTuningTaskType; 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.InputDeliveryMode; import com.azure.resourcemanager.machinelearning.models.JobResourceConfiguration; +import com.azure.resourcemanager.machinelearning.models.JobResources; 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.MedianStoppingPolicy; +import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput; +import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobOutput; 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.QueueSettings; 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.UriFileJobInput; import com.azure.resourcemanager.machinelearning.models.UriFileJobOutput; import java.io.IOException; import java.time.Duration; @@ -3474,8 +5497,8 @@ import java.util.Map; public final class JobsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/AutoMLJob/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Job/AutoMLJob/createOrUpdate.json */ /** * Sample code: CreateOrUpdate AutoML Job. @@ -3488,43 +5511,43 @@ public final class JobsCreateOrUpdateSamples { .define("string") .withExistingWorkspace("test-rg", "my-aml-workspace") .withProperties(new AutoMLJob().withDescription("string") - .withTags(mapOf("string", "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().withJobServiceType("string") + new JobService().withEndpoint("string") + .withJobServiceType("string") .withPort(1) - .withEndpoint("string") .withProperties(mapOf("string", "string")))) - .withComputeId("string") - .withIsArchived(false) - .withIdentity(new AmlToken()) + .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)))) - .withEnvironmentId("string") - .withEnvironmentVariables(mapOf("string", "string")) - .withTaskDetails(new ImageClassification().withTrainingData(new MLTableJobInput().withUri("string")) - .withTargetColumnName("string") + .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))) - .withOutputs(mapOf("string", - new UriFileJobOutput().withDescription("string") - .withUri("string") - .withMode(OutputDeliveryMode.READ_WRITE_MOUNT)))) + .withLimitSettings(new ImageLimitSettings().withMaxTrials(2)))) .create(); } /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/SweepJob/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Job/SweepJob/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Sweep Job. @@ -3537,29 +5560,29 @@ public final class JobsCreateOrUpdateSamples { .define("string") .withExistingWorkspace("test-rg", "my-aml-workspace") .withProperties(new SweepJob().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withComputeId("string") .withDisplayName("string") .withExperimentName("string") .withServices(mapOf("string", - new JobService().withJobServiceType("string") + new JobService().withEndpoint("string") + .withJobServiceType("string") .withPort(1) - .withEndpoint("string") .withProperties(mapOf("string", "string")))) - .withComputeId("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)) - .withSamplingAlgorithm(new GridSamplingAlgorithm()) - .withLimits(new SweepJobLimits().withMaxTotalTrials(1) - .withMaxConcurrentTrials(1) - .withTrialTimeout(Duration.parse("PT1S"))) - .withEarlyTermination(new MedianStoppingPolicy().withEvaluationInterval(1).withDelayEvaluation(1)) - .withObjective(new Objective().withPrimaryMetric("string").withGoal(Goal.MINIMIZE)) .withTrial(new TrialComponent().withCodeId("fakeTokenPlaceholder") .withCommand("string") + .withDistribution(new Mpi().withProcessCountPerInstance(1)) .withEnvironmentId("string") .withEnvironmentVariables(mapOf("string", "string")) - .withDistribution(new Mpi().withProcessCountPerInstance(1)) .withResources(new JobResourceConfiguration().withInstanceCount(1) .withInstanceType("string") .withProperties(mapOf("string", @@ -3571,8 +5594,8 @@ public final class JobsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/PipelineJob/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Job/PipelineJob/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Pipeline Job. @@ -3585,30 +5608,62 @@ public final class JobsCreateOrUpdateSamples { .define("string") .withExistingWorkspace("test-rg", "my-aml-workspace") .withProperties(new PipelineJob().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withComputeId("string") .withDisplayName("string") .withExperimentName("string") .withServices(mapOf("string", - new JobService().withJobServiceType("string") + new JobService().withEndpoint("string") + .withJobServiceType("string") .withPort(1) - .withEndpoint("string") .withProperties(mapOf("string", "string")))) - .withComputeId("string") - .withSettings(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON)) .withInputs(mapOf("string", new LiteralJobInput().withDescription("string").withValue("string"))) .withOutputs(mapOf("string", new UriFileJobOutput().withDescription("string") - .withUri("string") - .withMode(OutputDeliveryMode.UPLOAD)))) + .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/2025-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().withComputeId("gpu-compute") + .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") + .withMode(OutputDeliveryMode.READ_WRITE_MOUNT) + .withUri("string"))) + .withQueueSettings(new QueueSettings().withJobTier(JobTier.STANDARD)) + .withResources(new JobResources().withInstanceTypes(Arrays.asList("Standard_NC6")))) .create(); } /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/CommandJob/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Job/CommandJob/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Command Job. @@ -3621,34 +5676,35 @@ public final class JobsCreateOrUpdateSamples { .define("string") .withExistingWorkspace("test-rg", "my-aml-workspace") .withProperties(new CommandJob().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withComputeId("string") .withDisplayName("string") .withExperimentName("string") + .withIdentity(new AmlToken()) + .withParentJobName("ParentRun") .withServices(mapOf("string", - new JobService().withJobServiceType("string") + new JobService().withEndpoint("string") + .withJobServiceType("string") .withPort(1) - .withEndpoint("string") .withProperties(mapOf("string", "string")))) - .withComputeId("string") - .withIdentity(new AmlToken()) - .withResources(new JobResourceConfiguration().withInstanceCount(1) - .withInstanceType("string") - .withProperties(mapOf("string", - SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{\"e6b6493e-7d5e-4db3-be1e-306ec641327e\":null}", Object.class, - SerializerEncoding.JSON)))) .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") - .withUri("string") - .withMode(OutputDeliveryMode.READ_WRITE_MOUNT))) - .withDistribution(new TensorFlow().withWorkerCount(1).withParameterServerCount(1)) - .withLimits(new CommandJobLimits().withTimeout(Duration.parse("PT5M"))) - .withEnvironmentVariables(mapOf("string", "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(); } @@ -3675,8 +5731,8 @@ public final class JobsCreateOrUpdateSamples { public final class JobsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Job/delete.json */ /** * Sample code: Delete Job. @@ -3701,8 +5757,8 @@ public final class JobsDeleteSamples { public final class JobsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/CommandJob/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Job/CommandJob/get.json */ /** * Sample code: Get Command Job. @@ -3715,8 +5771,8 @@ public final class JobsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/AutoMLJob/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Job/AutoMLJob/get.json */ /** * Sample code: Get AutoML Job. @@ -3729,8 +5785,8 @@ public final class JobsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/SweepJob/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Job/SweepJob/get.json */ /** * Sample code: Get Sweep Job. @@ -3743,8 +5799,8 @@ public final class JobsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/PipelineJob/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Job/PipelineJob/get.json */ /** * Sample code: Get Pipeline Job. @@ -3754,12 +5810,27 @@ public final class JobsGetSamples { 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/2025-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; /** * Samples for Jobs List. @@ -3767,8 +5838,8 @@ public final class JobsGetSamples { public final class JobsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/CommandJob/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Job/CommandJob/list.json */ /** * Sample code: List Command Job. @@ -3783,8 +5854,8 @@ public final class JobsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/PipelineJob/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Job/PipelineJob/list.json */ /** * Sample code: List Pipeline Job. @@ -3799,8 +5870,24 @@ public final class JobsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/SweepJob/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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, + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Job/SweepJob/list.json */ /** * Sample code: List Sweep Job. @@ -3815,8 +5902,8 @@ public final class JobsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/AutoMLJob/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Job/AutoMLJob/list.json */ /** * Sample code: List AutoML Job. @@ -3841,8 +5928,8 @@ import com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisionO public final class ManagedNetworkProvisionsProvisionManagedNetworkSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/ManagedNetwork/provision.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/ManagedNetwork/provision.json */ /** * Sample code: Provision ManagedNetwork. @@ -3871,8 +5958,8 @@ import com.azure.resourcemanager.machinelearning.models.RuleStatus; public final class ManagedNetworkSettingsRuleCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/ManagedNetwork/createOrUpdateRule.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/ManagedNetwork/createOrUpdateRule.json */ /** * Sample code: CreateOrUpdate ManagedNetworkSettingsRule. @@ -3901,8 +5988,8 @@ public final class ManagedNetworkSettingsRuleCreateOrUpdateSamples { public final class ManagedNetworkSettingsRuleDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/ManagedNetwork/deleteRule.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/ManagedNetwork/deleteRule.json */ /** * Sample code: Delete ManagedNetworkSettingsRule. @@ -3926,8 +6013,8 @@ public final class ManagedNetworkSettingsRuleDeleteSamples { public final class ManagedNetworkSettingsRuleGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/ManagedNetwork/getRule.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/ManagedNetwork/getRule.json */ /** * Sample code: Get ManagedNetworkSettingsRule. @@ -3952,8 +6039,8 @@ public final class ManagedNetworkSettingsRuleGetSamples { public final class ManagedNetworkSettingsRuleListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/ManagedNetwork/listRule.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/ManagedNetwork/listRule.json */ /** * Sample code: List ManagedNetworkSettingsRule. @@ -3978,8 +6065,8 @@ import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptionP public final class MarketplaceSubscriptionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/MarketplaceSubscription/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/MarketplaceSubscription/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Marketplace Subscription. @@ -4006,8 +6093,8 @@ public final class MarketplaceSubscriptionsCreateOrUpdateSamples { public final class MarketplaceSubscriptionsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/MarketplaceSubscription/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/MarketplaceSubscription/delete.json */ /** * Sample code: Delete Workspace Marketplace Subscription. @@ -4031,8 +6118,8 @@ public final class MarketplaceSubscriptionsDeleteSamples { public final class MarketplaceSubscriptionsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/MarketplaceSubscription/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/MarketplaceSubscription/get.json */ /** * Sample code: Get Workspace Marketplace Subscription. @@ -4056,8 +6143,8 @@ public final class MarketplaceSubscriptionsGetSamples { public final class MarketplaceSubscriptionsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/MarketplaceSubscription/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/MarketplaceSubscription/list.json */ /** * Sample code: List Workspace Marketplace Subscription. @@ -4084,8 +6171,8 @@ import java.util.Map; public final class ModelContainersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelContainer/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ModelContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Model Container. @@ -4125,8 +6212,8 @@ public final class ModelContainersCreateOrUpdateSamples { public final class ModelContainersDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelContainer/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ModelContainer/delete.json */ /** * Sample code: Delete Workspace Model Container. @@ -4150,8 +6237,8 @@ public final class ModelContainersDeleteSamples { public final class ModelContainersGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelContainer/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ModelContainer/get.json */ /** * Sample code: Get Workspace Model Container. @@ -4176,8 +6263,8 @@ public final class ModelContainersGetSamples { public final class ModelContainersListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelContainer/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ModelContainer/list.json */ /** * Sample code: List Workspace Model Container. @@ -4205,8 +6292,8 @@ import java.util.Map; public final class ModelVersionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelVersion/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ModelVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Model Version. @@ -4219,8 +6306,8 @@ public final class ModelVersionsCreateOrUpdateSamples { .define("string") .withExistingModel("test-rg", "my-aml-workspace", "string") .withProperties(new ModelVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) .withFlavors(mapOf("string", new FlavorData().withData(mapOf("string", "string")))) .withModelType("CustomModel") @@ -4251,8 +6338,8 @@ public final class ModelVersionsCreateOrUpdateSamples { public final class ModelVersionsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelVersion/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ModelVersion/delete.json */ /** * Sample code: Delete Workspace Model Version. @@ -4276,8 +6363,8 @@ public final class ModelVersionsDeleteSamples { public final class ModelVersionsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelVersion/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ModelVersion/get.json */ /** * Sample code: Get Workspace Model Version. @@ -4302,8 +6389,8 @@ public final class ModelVersionsGetSamples { public final class ModelVersionsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelVersion/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ModelVersion/list.json */ /** * Sample code: List Workspace Model Version. @@ -4330,8 +6417,8 @@ import com.azure.resourcemanager.machinelearning.models.DestinationAsset; public final class ModelVersionsPublishSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelVersion/publish.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ModelVersion/publish.json */ /** * Sample code: Publish Workspace Model Version. @@ -4342,9 +6429,9 @@ public final class ModelVersionsPublishSamples { publishWorkspaceModelVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.modelVersions() .publish("test-rg", "my-aml-workspace", "string", "string", - new DestinationAsset().withRegistryName("string") - .withDestinationName("string") - .withDestinationVersion("string"), + new DestinationAsset().withDestinationName("string") + .withDestinationVersion("string") + .withRegistryName("string"), com.azure.core.util.Context.NONE); } } @@ -4376,8 +6463,8 @@ import java.util.Map; public final class OnlineDeploymentsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/KubernetesOnlineDeployment/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/OnlineDeployment/KubernetesOnlineDeployment/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Kubernetes Online Deployment. @@ -4390,34 +6477,35 @@ public final class OnlineDeploymentsCreateOrUpdateSamples { .define("testDeploymentName") .withRegion("string") .withExistingOnlineEndpoint("test-rg", "my-aml-workspace", "testEndpointName") - .withProperties(new KubernetesOnlineDeployment().withDescription("string") - .withProperties(mapOf("string", "string")) + .withProperties(new KubernetesOnlineDeployment() .withCodeConfiguration( new CodeConfiguration().withCodeId("fakeTokenPlaceholder").withScoringScript("string")) + .withDescription("string") .withEnvironmentId("string") .withEnvironmentVariables(mapOf("string", "string")) - .withScaleSettings(new DefaultScaleSettings()) - .withRequestSettings(new OnlineRequestSettings().withMaxQueueWait(Duration.parse("PT5M")) - .withRequestTimeout(Duration.parse("PT5M")) - .withMaxConcurrentRequestsPerInstance(1)) - .withModelMountPath("string") + .withProperties(mapOf("string", "string")) .withAppInsightsEnabled(false) + .withInstanceType("string") .withLivenessProbe(new ProbeSettings().withFailureThreshold(1) - .withSuccessThreshold(1) - .withTimeout(Duration.parse("PT5M")) + .withInitialDelay(Duration.parse("PT5M")) .withPeriod(Duration.parse("PT5M")) - .withInitialDelay(Duration.parse("PT5M"))) - .withInstanceType("string") + .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() - .withContainerResourceRequests( - new ContainerResourceSettings().withCpu("\"1\"").withMemory("\"2Gi\"").withGpu("\"1\"")) .withContainerResourceLimits( - new ContainerResourceSettings().withCpu("\"1\"").withMemory("\"2Gi\"").withGpu("\"1\"")))) + new ContainerResourceSettings().withCpu("\"1\"").withGpu("\"1\"").withMemory("\"2Gi\"")) + .withContainerResourceRequests( + new ContainerResourceSettings().withCpu("\"1\"").withGpu("\"1\"").withMemory("\"2Gi\"")))) .withTags(mapOf()) - .withKind("string") .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") .withSku(new Sku().withName("string") .withTier(SkuTier.FREE) .withSize("string") @@ -4428,8 +6516,8 @@ public final class OnlineDeploymentsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/ManagedOnlineDeployment/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/OnlineDeployment/ManagedOnlineDeployment/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Managed Online Deployment. @@ -4442,34 +6530,35 @@ public final class OnlineDeploymentsCreateOrUpdateSamples { .define("testDeploymentName") .withRegion("string") .withExistingOnlineEndpoint("test-rg", "my-aml-workspace", "testEndpointName") - .withProperties(new ManagedOnlineDeployment().withDescription("string") - .withProperties(mapOf("string", "string")) + .withProperties(new ManagedOnlineDeployment() .withCodeConfiguration( new CodeConfiguration().withCodeId("fakeTokenPlaceholder").withScoringScript("string")) + .withDescription("string") .withEnvironmentId("string") .withEnvironmentVariables(mapOf("string", "string")) - .withScaleSettings(new DefaultScaleSettings()) - .withRequestSettings(new OnlineRequestSettings().withMaxQueueWait(Duration.parse("PT5M")) - .withRequestTimeout(Duration.parse("PT5M")) - .withMaxConcurrentRequestsPerInstance(1)) - .withModelMountPath("string") + .withProperties(mapOf("string", "string")) .withAppInsightsEnabled(false) + .withInstanceType("string") .withLivenessProbe(new ProbeSettings().withFailureThreshold(1) - .withSuccessThreshold(1) - .withTimeout(Duration.parse("PT5M")) + .withInitialDelay(Duration.parse("PT5M")) .withPeriod(Duration.parse("PT5M")) - .withInitialDelay(Duration.parse("PT5M"))) - .withReadinessProbe(new ProbeSettings().withFailureThreshold(30) .withSuccessThreshold(1) - .withTimeout(Duration.parse("PT2S")) + .withTimeout(Duration.parse("PT5M"))) + .withModel("string") + .withModelMountPath("string") + .withReadinessProbe(new ProbeSettings().withFailureThreshold(30) + .withInitialDelay(Duration.parse("PT1S")) .withPeriod(Duration.parse("PT10S")) - .withInitialDelay(Duration.parse("PT1S"))) - .withInstanceType("string") - .withModel("string")) + .withSuccessThreshold(1) + .withTimeout(Duration.parse("PT2S"))) + .withRequestSettings(new OnlineRequestSettings().withMaxConcurrentRequestsPerInstance(1) + .withMaxQueueWait(Duration.parse("PT5M")) + .withRequestTimeout(Duration.parse("PT5M"))) + .withScaleSettings(new DefaultScaleSettings())) .withTags(mapOf()) - .withKind("string") .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") .withSku(new Sku().withName("string") .withTier(SkuTier.FREE) .withSize("string") @@ -4501,8 +6590,8 @@ public final class OnlineDeploymentsCreateOrUpdateSamples { public final class OnlineDeploymentsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineDeployment/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/OnlineDeployment/delete.json */ /** * Sample code: Delete Workspace Online Deployment. @@ -4526,8 +6615,8 @@ public final class OnlineDeploymentsDeleteSamples { public final class OnlineDeploymentsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/KubernetesOnlineDeployment/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/OnlineDeployment/KubernetesOnlineDeployment/get.json */ /** * Sample code: Get Kubernetes Online Deployment. @@ -4543,8 +6632,8 @@ public final class OnlineDeploymentsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/ManagedOnlineDeployment/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/OnlineDeployment/ManagedOnlineDeployment/get.json */ /** * Sample code: Get Managed Online Deployment. @@ -4572,8 +6661,8 @@ import com.azure.resourcemanager.machinelearning.models.DeploymentLogsRequest; public final class OnlineDeploymentsGetLogsSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/getLogs.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/OnlineDeployment/getLogs.json */ /** * Sample code: Get Online Deployment Logs. @@ -4599,8 +6688,8 @@ public final class OnlineDeploymentsGetLogsSamples { public final class OnlineDeploymentsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/OnlineDeployment/list.json */ /** * Sample code: List Online Deployments. @@ -4624,8 +6713,8 @@ public final class OnlineDeploymentsListSamples { public final class OnlineDeploymentsListSkusSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/ManagedOnlineDeployment/listSkus.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/OnlineDeployment/ManagedOnlineDeployment/listSkus.json */ /** * Sample code: List Managed Online Deployment Skus. @@ -4641,8 +6730,8 @@ public final class OnlineDeploymentsListSkusSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/KubernetesOnlineDeployment/listSkus.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/OnlineDeployment/KubernetesOnlineDeployment/listSkus.json */ /** * Sample code: List Kubernetes Online Deployment Skus. @@ -4673,8 +6762,8 @@ import java.util.Map; public final class OnlineDeploymentsUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/ManagedOnlineDeployment/update.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/OnlineDeployment/ManagedOnlineDeployment/update.json */ /** * Sample code: Update Managed Online Deployment. @@ -4689,18 +6778,18 @@ public final class OnlineDeploymentsUpdateSamples { .getValue(); resource.update() .withTags(mapOf()) - .withSku(new PartialSku().withName("string") - .withTier(SkuTier.FREE) - .withSize("string") + .withSku(new PartialSku().withCapacity(1) .withFamily("string") - .withCapacity(1)) + .withName("string") + .withSize("string") + .withTier(SkuTier.FREE)) .apply(); } /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/KubernetesOnlineDeployment/update.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/OnlineDeployment/KubernetesOnlineDeployment/update.json */ /** * Sample code: Update Kubernetes Online Deployment. @@ -4715,11 +6804,11 @@ public final class OnlineDeploymentsUpdateSamples { .getValue(); resource.update() .withTags(mapOf()) - .withSku(new PartialSku().withName("string") - .withTier(SkuTier.FREE) - .withSize("string") + .withSku(new PartialSku().withCapacity(1) .withFamily("string") - .withCapacity(1)) + .withName("string") + .withSize("string") + .withTier(SkuTier.FREE)) .apply(); } @@ -4756,8 +6845,8 @@ import java.util.Map; public final class OnlineEndpointsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/OnlineEndpoint/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Online Endpoint. @@ -4770,15 +6859,15 @@ public final class OnlineEndpointsCreateOrUpdateSamples { .define("testEndpointName") .withRegion("string") .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties(new OnlineEndpointProperties().withDescription("string") + .withProperties(new OnlineEndpointProperties().withAuthMode(EndpointAuthMode.AMLTOKEN) + .withDescription("string") .withProperties(mapOf("string", "string")) - .withAuthMode(EndpointAuthMode.AMLTOKEN) .withCompute("string") .withTraffic(mapOf("string", 1))) .withTags(mapOf()) - .withKind("string") .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") .withSku(new Sku().withName("string") .withTier(SkuTier.FREE) .withSize("string") @@ -4810,8 +6899,8 @@ public final class OnlineEndpointsCreateOrUpdateSamples { public final class OnlineEndpointsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/OnlineEndpoint/delete.json */ /** * Sample code: Delete Workspace Online Endpoint. @@ -4835,8 +6924,8 @@ public final class OnlineEndpointsDeleteSamples { public final class OnlineEndpointsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/OnlineEndpoint/get.json */ /** * Sample code: Get Workspace Online Endpoint. @@ -4860,8 +6949,8 @@ public final class OnlineEndpointsGetSamples { public final class OnlineEndpointsGetTokenSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/getToken.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/OnlineEndpoint/getToken.json */ /** * Sample code: GetToken Workspace Online Endpoint. @@ -4888,8 +6977,8 @@ import com.azure.resourcemanager.machinelearning.models.OrderString; public final class OnlineEndpointsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/OnlineEndpoint/list.json */ /** * Sample code: List Workspace Online Endpoint. @@ -4914,8 +7003,8 @@ public final class OnlineEndpointsListSamples { public final class OnlineEndpointsListKeysSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/listKeys.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/OnlineEndpoint/listKeys.json */ /** * Sample code: ListKeys Workspace Online Endpoint. @@ -4942,8 +7031,8 @@ import com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRe public final class OnlineEndpointsRegenerateKeysSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/regenerateKeys.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/OnlineEndpoint/regenerateKeys.json */ /** * Sample code: RegenerateKeys Workspace Online Endpoint. @@ -4978,8 +7067,8 @@ import java.util.Map; public final class OnlineEndpointsUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/update.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/OnlineEndpoint/update.json */ /** * Sample code: Update Workspace Online Endpoint. @@ -5023,8 +7112,8 @@ public final class OnlineEndpointsUpdateSamples { public final class OperationsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/operationsList.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/operationsList.json */ /** * Sample code: OperationsList. @@ -5040,7 +7129,7 @@ public final class OperationsListSamples { ### PrivateEndpointConnections_CreateOrUpdate ```java -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; +import com.azure.resourcemanager.machinelearning.models.EndpointServiceConnectionStatus; import com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnectionState; /** @@ -5049,8 +7138,8 @@ import com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnec public final class PrivateEndpointConnectionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/PrivateEndpointConnection/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/PrivateEndpointConnection/createOrUpdate.json */ /** * Sample code: WorkspacePutPrivateEndpointConnection. @@ -5063,8 +7152,8 @@ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { .define("{privateEndpointConnectionName}") .withExistingWorkspace("rg-1234", "testworkspace") .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) - .withDescription("Auto-Approved")) + new PrivateLinkServiceConnectionState().withDescription("Auto-Approved") + .withStatus(EndpointServiceConnectionStatus.APPROVED)) .create(); } } @@ -5079,15 +7168,15 @@ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { public final class PrivateEndpointConnectionsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/PrivateEndpointConnection/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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}", @@ -5105,8 +7194,8 @@ public final class PrivateEndpointConnectionsDeleteSamples { public final class PrivateEndpointConnectionsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/PrivateEndpointConnection/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/PrivateEndpointConnection/get.json */ /** * Sample code: WorkspaceGetPrivateEndpointConnection. @@ -5131,8 +7220,8 @@ public final class PrivateEndpointConnectionsGetSamples { public final class PrivateEndpointConnectionsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/PrivateEndpointConnection/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/PrivateEndpointConnection/list.json */ /** * Sample code: StorageAccountListPrivateEndpointConnections. @@ -5155,8 +7244,8 @@ public final class PrivateEndpointConnectionsListSamples { public final class PrivateLinkResourcesListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/PrivateLinkResource/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/PrivateLinkResource/list.json */ /** * Sample code: WorkspaceListPrivateLinkResources. @@ -5165,7 +7254,79 @@ public final class PrivateLinkResourcesListSamples { */ public static void workspaceListPrivateLinkResources(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.privateLinkResources().listWithResponse("rg-1234", "testworkspace", com.azure.core.util.Context.NONE); + manager.privateLinkResources().list("rg-1234", "testworkspace", com.azure.core.util.Context.NONE); + } +} +``` + +### PtuQuota_GetAvailable + +```java +/** + * Samples for PtuQuota GetAvailable. + */ +public final class PtuQuotaGetAvailableSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/PTUQuota/getAvailable.json + */ + /** + * Sample code: Get available MaaS PTU quota. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + getAvailableMaaSPTUQuota(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.ptuQuotas().getAvailableWithResponse("location", com.azure.core.util.Context.NONE); + } +} +``` + +### PtuQuota_List + +```java +/** + * Samples for PtuQuota List. + */ +public final class PtuQuotaListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/PTUQuota/list.json + */ + /** + * Sample code: List MaaS PTU usage and quota. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + listMaaSPTUUsageAndQuota(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.ptuQuotas().list("location", null, com.azure.core.util.Context.NONE); + } +} +``` + +### PtuQuota_ListAvailable + +```java +/** + * Samples for PtuQuota ListAvailable. + */ +public final class PtuQuotaListAvailableSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/PTUQuota/listAvailable.json + */ + /** + * Sample code: List available MaaS PTU quota. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + listAvailableMaaSPTUQuota(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.ptuQuotas().listAvailable("location", null, com.azure.core.util.Context.NONE); } } ``` @@ -5179,8 +7340,8 @@ public final class PrivateLinkResourcesListSamples { public final class QuotasListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Quota/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Quota/list.json */ /** * Sample code: List workspace quotas by VMFamily. @@ -5208,8 +7369,8 @@ import java.util.Arrays; public final class QuotasUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Quota/update.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Quota/update.json */ /** * Sample code: update quotas. @@ -5234,6 +7395,129 @@ public final class QuotasUpdateSamples { } ``` +### RaiPolicies_List + +```java +/** + * Samples for RaiPolicies List. + */ +public final class RaiPoliciesListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Endpoint/RaiPolicy/list.json + */ + /** + * Sample code: List Rai policies. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRaiPolicies(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.raiPolicies() + .list("test-rg", "aml-workspace-name", "Azure.OpenAI", null, com.azure.core.util.Context.NONE); + } +} +``` + +### RaiPolicyOperation_Create + +```java +import com.azure.resourcemanager.machinelearning.fluent.models.RaiPolicyPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.AllowedContentLevel; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistConfig; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyContentFilter; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyContentSource; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyMode; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyProperties; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyType; +import java.util.Arrays; + +/** + * Samples for RaiPolicyOperation Create. + */ +public final class RaiPolicyOperationCreateSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Endpoint/RaiPolicy/create.json + */ + /** + * Sample code: Create Rai policy. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createRaiPolicy(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.raiPolicyOperations() + .create("test-rg", "aml-workspace-name", "Azure.OpenAI", "raiPolicyName", + new RaiPolicyPropertiesBasicResourceInner().withProperties(new RaiPolicyProperties() + .withBasePolicyName("112") + .withCompletionBlocklists( + Arrays.asList(new RaiBlocklistConfig().withBlocking(false).withBlocklistName("blocklistName"))) + .withContentFilters( + Arrays.asList(new RaiPolicyContentFilter().withAllowedContentLevel(AllowedContentLevel.LOW) + .withBlocking(false) + .withEnabled(false) + .withName("policyName") + .withSource(RaiPolicyContentSource.PROMPT))) + .withMode(RaiPolicyMode.BLOCKING) + .withPromptBlocklists( + Arrays.asList(new RaiBlocklistConfig().withBlocking(false).withBlocklistName("blocklistName"))) + .withType(RaiPolicyType.SYSTEM_MANAGED)), + null, com.azure.core.util.Context.NONE); + } +} +``` + +### RaiPolicyOperation_Delete + +```java +/** + * Samples for RaiPolicyOperation Delete. + */ +public final class RaiPolicyOperationDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Endpoint/RaiPolicy/delete.json + */ + /** + * Sample code: Delete Rai policy. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRaiPolicy(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.raiPolicyOperations() + .delete("test-rg", "aml-workspace-name", "Azure.OpenAI", "raiPolicyName", null, + com.azure.core.util.Context.NONE); + } +} +``` + +### RaiPolicyOperation_Get + +```java +/** + * Samples for RaiPolicyOperation Get. + */ +public final class RaiPolicyOperationGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Endpoint/RaiPolicy/get.json + */ + /** + * Sample code: Get Rai policy. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRaiPolicy(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.raiPolicyOperations() + .getWithResponse("test-rg", "aml-workspace-name", "Azure.OpenAI", "raiPolicyName", + com.azure.core.util.Context.NONE); + } +} +``` + ### Registries_CreateOrUpdate ```java @@ -5264,8 +7548,8 @@ import java.util.Map; public final class RegistriesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/createOrUpdate-SystemCreated.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registries/createOrUpdate-SystemCreated.json */ /** * Sample code: CreateOrUpdate Registry with system created accounts. @@ -5319,8 +7603,8 @@ public final class RegistriesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/createOrUpdate-UserCreated.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registries/createOrUpdate-UserCreated.json */ /** * Sample code: CreateOrUpdate Registry with user created accounts. @@ -5389,8 +7673,8 @@ public final class RegistriesCreateOrUpdateSamples { public final class RegistriesDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registries/delete.json */ /** * Sample code: Delete Registry. @@ -5412,8 +7696,8 @@ public final class RegistriesDeleteSamples { public final class RegistriesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/get-UserCreated.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registries/get-UserCreated.json */ /** * Sample code: Get Registry with user created accounts. @@ -5427,8 +7711,8 @@ public final class RegistriesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/get-SystemCreated.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registries/get-SystemCreated.json */ /** * Sample code: Get Registry with system created accounts. @@ -5451,8 +7735,8 @@ public final class RegistriesGetByResourceGroupSamples { public final class RegistriesListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/listBySubscription.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registries/listBySubscription.json */ /** * Sample code: List registries by subscription. @@ -5475,8 +7759,8 @@ public final class RegistriesListSamples { public final class RegistriesListByResourceGroupSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/list-UserCreated.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registries/list-UserCreated.json */ /** * Sample code: List registries with user created accounts. @@ -5490,8 +7774,8 @@ public final class RegistriesListByResourceGroupSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/list-SystemCreated.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registries/list-SystemCreated.json */ /** * Sample code: List registries with system created accounts. @@ -5536,8 +7820,8 @@ import java.util.Map; public final class RegistriesRemoveRegionsSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/removeRegions.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registries/removeRegions.json */ /** * Sample code: Remove regions from registry. @@ -5625,8 +7909,8 @@ import java.util.Map; public final class RegistriesUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/update-UserCreated.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registries/update-UserCreated.json */ /** * Sample code: Update Registry with user created accounts. @@ -5642,18 +7926,18 @@ public final class RegistriesUpdateSamples { .withTags(mapOf()) .withIdentity(new RegistryPartialManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) - .withSku(new PartialSku().withName("string") - .withTier(SkuTier.BASIC) - .withSize("string") + .withSku(new PartialSku().withCapacity(1) .withFamily("string") - .withCapacity(1)) + .withName("string") + .withSize("string") + .withTier(SkuTier.BASIC)) .apply(); } /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/update-SystemCreated.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registries/update-SystemCreated.json */ /** * Sample code: Update Registry with system created accounts. @@ -5670,11 +7954,11 @@ public final class RegistriesUpdateSamples { .withIdentity( new RegistryPartialManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) - .withSku(new PartialSku().withName("string") - .withTier(SkuTier.BASIC) - .withSize("string") + .withSku(new PartialSku().withCapacity(1) .withFamily("string") - .withCapacity(1)) + .withName("string") + .withSize("string") + .withTier(SkuTier.BASIC)) .apply(); } @@ -5706,8 +7990,8 @@ import java.util.Map; public final class RegistryCodeContainersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeContainer/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/CodeContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Code Container. @@ -5746,8 +8030,8 @@ public final class RegistryCodeContainersCreateOrUpdateSamples { public final class RegistryCodeContainersDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeContainer/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/CodeContainer/delete.json */ /** * Sample code: Delete Registry Code Container. @@ -5771,8 +8055,8 @@ public final class RegistryCodeContainersDeleteSamples { public final class RegistryCodeContainersGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeContainer/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/CodeContainer/get.json */ /** * Sample code: Get Registry Code Container. @@ -5796,8 +8080,8 @@ public final class RegistryCodeContainersGetSamples { public final class RegistryCodeContainersListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeContainer/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/CodeContainer/list.json */ /** * Sample code: List Registry Code Container. @@ -5823,8 +8107,8 @@ import com.azure.resourcemanager.machinelearning.models.PendingUploadType; public final class RegistryCodeVersionsCreateOrGetStartPendingUploadSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeVersion/createOrGetStartPendingUpload.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/CodeVersion/createOrGetStartPendingUpload.json */ /** * Sample code: CreateOrGetStartPendingUpload Registry Code Version. @@ -5856,8 +8140,8 @@ import java.util.Map; public final class RegistryCodeVersionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeVersion/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/CodeVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Code Version. @@ -5869,8 +8153,8 @@ public final class RegistryCodeVersionsCreateOrUpdateSamples { manager.registryCodeVersions() .createOrUpdate("test-rg", "my-aml-registry", "string", "string", new CodeVersionInner().withProperties(new CodeVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) .withCodeUri("fakeTokenPlaceholder")), com.azure.core.util.Context.NONE); @@ -5899,8 +8183,8 @@ public final class RegistryCodeVersionsCreateOrUpdateSamples { public final class RegistryCodeVersionsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeVersion/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/CodeVersion/delete.json */ /** * Sample code: Delete Registry Code Version. @@ -5924,8 +8208,8 @@ public final class RegistryCodeVersionsDeleteSamples { public final class RegistryCodeVersionsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeVersion/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/CodeVersion/get.json */ /** * Sample code: Get Registry Code Version. @@ -5949,8 +8233,8 @@ public final class RegistryCodeVersionsGetSamples { public final class RegistryCodeVersionsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeVersion/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/CodeVersion/list.json */ /** * Sample code: List Registry Code Version. @@ -5979,8 +8263,8 @@ import java.util.Map; public final class RegistryComponentContainersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentContainer/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/ComponentContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Component Container. @@ -5993,8 +8277,8 @@ public final class RegistryComponentContainersCreateOrUpdateSamples { .createOrUpdate("test-rg", "my-aml-registry", "string", new ComponentContainerInner() .withProperties(new ComponentContainerProperties().withDescription("string") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string"))), + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string"))), com.azure.core.util.Context.NONE); } @@ -6021,8 +8305,8 @@ public final class RegistryComponentContainersCreateOrUpdateSamples { public final class RegistryComponentContainersDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentContainer/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/ComponentContainer/delete.json */ /** * Sample code: Delete Registry Component Container. @@ -6046,8 +8330,8 @@ public final class RegistryComponentContainersDeleteSamples { public final class RegistryComponentContainersGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentContainer/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/ComponentContainer/get.json */ /** * Sample code: Get Registry Component Container. @@ -6071,8 +8355,8 @@ public final class RegistryComponentContainersGetSamples { public final class RegistryComponentContainersListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentContainer/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/ComponentContainer/list.json */ /** * Sample code: List Registry Component Container. @@ -6104,8 +8388,8 @@ import java.util.Map; public final class RegistryComponentVersionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentVersion/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/ComponentVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Component Version. @@ -6117,8 +8401,8 @@ public final class RegistryComponentVersionsCreateOrUpdateSamples { manager.registryComponentVersions() .createOrUpdate("test-rg", "my-aml-registry", "string", "string", new ComponentVersionInner().withProperties(new ComponentVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) .withComponentSpec(SerializerFactory.createDefaultManagementSerializerAdapter() .deserialize("{\"8ced901b-d826-477d-bfef-329da9672513\":null}", Object.class, @@ -6149,8 +8433,8 @@ public final class RegistryComponentVersionsCreateOrUpdateSamples { public final class RegistryComponentVersionsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentVersion/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/ComponentVersion/delete.json */ /** * Sample code: Delete Registry Component Version. @@ -6174,8 +8458,8 @@ public final class RegistryComponentVersionsDeleteSamples { public final class RegistryComponentVersionsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentVersion/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/ComponentVersion/get.json */ /** * Sample code: Get Registry Component Version. @@ -6199,8 +8483,8 @@ public final class RegistryComponentVersionsGetSamples { public final class RegistryComponentVersionsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentVersion/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/ComponentVersion/list.json */ /** * Sample code: List Registry Component Version. @@ -6230,8 +8514,8 @@ import java.util.Map; public final class RegistryDataContainersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataContainer/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/DataContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Data Container. @@ -6243,8 +8527,8 @@ public final class RegistryDataContainersCreateOrUpdateSamples { manager.registryDataContainers() .createOrUpdate("test-rg", "registryName", "string", new DataContainerInner().withProperties(new DataContainerProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsArchived(false) .withDataType(DataType.URI_FOLDER)), com.azure.core.util.Context.NONE); @@ -6273,8 +8557,8 @@ public final class RegistryDataContainersCreateOrUpdateSamples { public final class RegistryDataContainersDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataContainer/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/DataContainer/delete.json */ /** * Sample code: Delete Registry Data Container. @@ -6297,8 +8581,8 @@ public final class RegistryDataContainersDeleteSamples { public final class RegistryDataContainersGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataContainer/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/DataContainer/get.json */ /** * Sample code: Get Registry Data Container. @@ -6324,8 +8608,8 @@ import com.azure.resourcemanager.machinelearning.models.ListViewType; public final class RegistryDataContainersListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataContainer/registryList.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/DataContainer/registryList.json */ /** * Sample code: RegistryList Registry Data Container. @@ -6351,8 +8635,8 @@ import com.azure.resourcemanager.machinelearning.models.GetBlobReferenceSasReque public final class RegistryDataReferencesGetBlobReferenceSasSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/DataReference/getBlobReferenceSAS.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/DataReference/getBlobReferenceSAS.json */ /** * Sample code: GetBlobReferenceSAS Data Reference. @@ -6382,8 +8666,8 @@ import com.azure.resourcemanager.machinelearning.models.PendingUploadType; public final class RegistryDataVersionsCreateOrGetStartPendingUploadSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataVersionBase/createOrGetStartPendingUpload.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/DataVersionBase/createOrGetStartPendingUpload.json */ /** * Sample code: CreateOrGetStartPendingUpload Registry Data Version Base. @@ -6416,8 +8700,8 @@ import java.util.Map; public final class RegistryDataVersionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataVersionBase/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/DataVersionBase/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Data Version Base. @@ -6429,10 +8713,10 @@ public final class RegistryDataVersionsCreateOrUpdateSamples { manager.registryDataVersions() .createOrUpdate("test-rg", "registryName", "string", "string", new DataVersionBaseInner().withProperties(new MLTableData().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) - .withIsArchived(false) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) + .withIsArchived(false) .withDataUri("string") .withReferencedUris(Arrays.asList("string"))), com.azure.core.util.Context.NONE); @@ -6461,8 +8745,8 @@ public final class RegistryDataVersionsCreateOrUpdateSamples { public final class RegistryDataVersionsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataVersionBase/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/DataVersionBase/delete.json */ /** * Sample code: Delete Registry Data Version Base. @@ -6486,8 +8770,8 @@ public final class RegistryDataVersionsDeleteSamples { public final class RegistryDataVersionsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataVersionBase/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/DataVersionBase/get.json */ /** * Sample code: Get Registry Data Version Base. @@ -6513,8 +8797,8 @@ import com.azure.resourcemanager.machinelearning.models.ListViewType; public final class RegistryDataVersionsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataVersionBase/registryList.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/DataVersionBase/registryList.json */ /** * Sample code: RegistryList Registry Data Version Base. @@ -6544,8 +8828,8 @@ import java.util.Map; public final class RegistryEnvironmentContainersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentContainer/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/EnvironmentContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Environment Container. @@ -6558,9 +8842,9 @@ public final class RegistryEnvironmentContainersCreateOrUpdateSamples { .createOrUpdate("testrg123", "testregistry", "testEnvironment", new EnvironmentContainerInner().withProperties(new EnvironmentContainerProperties() .withDescription("string") - .withTags( - mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) .withProperties( + mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) + .withTags( mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string"))), com.azure.core.util.Context.NONE); } @@ -6588,8 +8872,8 @@ public final class RegistryEnvironmentContainersCreateOrUpdateSamples { public final class RegistryEnvironmentContainersDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentContainer/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/EnvironmentContainer/delete.json */ /** * Sample code: Delete Registry Environment Container. @@ -6613,8 +8897,8 @@ public final class RegistryEnvironmentContainersDeleteSamples { public final class RegistryEnvironmentContainersGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentContainer/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/EnvironmentContainer/get.json */ /** * Sample code: Get Registry Environment Container. @@ -6639,8 +8923,8 @@ public final class RegistryEnvironmentContainersGetSamples { public final class RegistryEnvironmentContainersListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentContainer/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/EnvironmentContainer/list.json */ /** * Sample code: List Registry Environment Container. @@ -6672,8 +8956,8 @@ import java.util.Map; public final class RegistryEnvironmentVersionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentVersion/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/EnvironmentVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Environment Version. @@ -6686,14 +8970,14 @@ public final class RegistryEnvironmentVersionsCreateOrUpdateSamples { .createOrUpdate("test-rg", "my-aml-registry", "string", "string", new EnvironmentVersionInner().withProperties(new EnvironmentVersionProperties() .withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) - .withImage("docker.io/tensorflow/serving:latest") - .withCondaFile("string") .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)) @@ -6724,8 +9008,8 @@ public final class RegistryEnvironmentVersionsCreateOrUpdateSamples { public final class RegistryEnvironmentVersionsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentVersion/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/EnvironmentVersion/delete.json */ /** * Sample code: Delete Registry Environment Version. @@ -6749,8 +9033,8 @@ public final class RegistryEnvironmentVersionsDeleteSamples { public final class RegistryEnvironmentVersionsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentVersion/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/EnvironmentVersion/get.json */ /** * Sample code: Get Registry Environment Version. @@ -6775,8 +9059,8 @@ public final class RegistryEnvironmentVersionsGetSamples { public final class RegistryEnvironmentVersionsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentVersion/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/EnvironmentVersion/list.json */ /** * Sample code: List Registry Environment Version. @@ -6805,8 +9089,8 @@ import java.util.Map; public final class RegistryModelContainersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelContainer/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/ModelContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Model Container. @@ -6846,8 +9130,8 @@ public final class RegistryModelContainersCreateOrUpdateSamples { public final class RegistryModelContainersDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelContainer/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/ModelContainer/delete.json */ /** * Sample code: Delete Registry Model Container. @@ -6871,8 +9155,8 @@ public final class RegistryModelContainersDeleteSamples { public final class RegistryModelContainersGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelContainer/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/ModelContainer/get.json */ /** * Sample code: Get Registry Model Container. @@ -6897,8 +9181,8 @@ public final class RegistryModelContainersGetSamples { public final class RegistryModelContainersListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelContainer/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/ModelContainer/list.json */ /** * Sample code: List Registry Model Container. @@ -6925,8 +9209,8 @@ import com.azure.resourcemanager.machinelearning.models.PendingUploadType; public final class RegistryModelVersionsCreateOrGetStartPendingUploadSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelVersion/createOrGetStartPendingUpload.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/ModelVersion/createOrGetStartPendingUpload.json */ /** * Sample code: CreateOrGetStartPendingUpload Registry Model Version. @@ -6959,8 +9243,8 @@ import java.util.Map; public final class RegistryModelVersionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelVersion/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/ModelVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Model Version. @@ -6972,8 +9256,8 @@ public final class RegistryModelVersionsCreateOrUpdateSamples { manager.registryModelVersions() .createOrUpdate("test-rg", "my-aml-registry", "string", "string", new ModelVersionInner().withProperties(new ModelVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) .withFlavors(mapOf("string", new FlavorData().withData(mapOf("string", "string")))) .withModelType("CustomModel") @@ -7004,8 +9288,8 @@ public final class RegistryModelVersionsCreateOrUpdateSamples { public final class RegistryModelVersionsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelVersion/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/ModelVersion/delete.json */ /** * Sample code: Delete Registry Model Version. @@ -7029,8 +9313,8 @@ public final class RegistryModelVersionsDeleteSamples { public final class RegistryModelVersionsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelVersion/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/ModelVersion/get.json */ /** * Sample code: Get Registry Model Version. @@ -7055,8 +9339,8 @@ public final class RegistryModelVersionsGetSamples { public final class RegistryModelVersionsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelVersion/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/ModelVersion/list.json */ /** * Sample code: List Registry Model Version. @@ -7090,8 +9374,8 @@ import java.util.Map; public final class SchedulesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Schedule/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Schedule/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Schedule. @@ -7104,18 +9388,18 @@ public final class SchedulesCreateOrUpdateSamples { .define("string") .withExistingWorkspace("test-rg", "my-aml-workspace") .withProperties(new ScheduleProperties().withDescription("string") - .withTags(mapOf("string", "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")) - .withAction(new EndpointScheduleAction() - .withEndpointInvocationDefinition(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{\"9965593e-526f-4b89-bb36-761138cf2794\":null}", Object.class, - SerializerEncoding.JSON)))) + .withExpression("string"))) .create(); } @@ -7142,8 +9426,8 @@ public final class SchedulesCreateOrUpdateSamples { public final class SchedulesDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Schedule/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Schedule/delete.json */ /** * Sample code: Delete Schedule. @@ -7165,8 +9449,8 @@ public final class SchedulesDeleteSamples { public final class SchedulesGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Schedule/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Schedule/get.json */ /** * Sample code: Get Schedule. @@ -7189,8 +9473,8 @@ public final class SchedulesGetSamples { public final class SchedulesListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Schedule/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Schedule/list.json */ /** * Sample code: List Schedules. @@ -7207,6 +9491,7 @@ public final class SchedulesListSamples { ```java import com.azure.resourcemanager.machinelearning.models.ContentSafety; +import com.azure.resourcemanager.machinelearning.models.ContentSafetyLevel; import com.azure.resourcemanager.machinelearning.models.ContentSafetyStatus; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; @@ -7225,8 +9510,8 @@ import java.util.Map; public final class ServerlessEndpointsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ServerlessEndpoint/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ServerlessEndpoint/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Serverless Endpoint. @@ -7239,14 +9524,14 @@ public final class ServerlessEndpointsCreateOrUpdateSamples { .define("string") .withRegion("string") .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties( - new ServerlessEndpointProperties().withModelSettings(new ModelSettings().withModelId("string")) - .withAuthMode(ServerlessInferenceEndpointAuthMode.KEY) - .withContentSafety(new ContentSafety().withContentSafetyStatus(ContentSafetyStatus.ENABLED))) + .withProperties(new ServerlessEndpointProperties().withAuthMode(ServerlessInferenceEndpointAuthMode.KEY) + .withContentSafety(new ContentSafety().withContentSafetyLevel(ContentSafetyLevel.BLOCKING) + .withContentSafetyStatus(ContentSafetyStatus.ENABLED)) + .withModelSettings(new ModelSettings().withModelId("string"))) .withTags(mapOf()) - .withKind("string") .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") .withSku(new Sku().withName("string") .withTier(SkuTier.STANDARD) .withSize("string") @@ -7278,8 +9563,8 @@ public final class ServerlessEndpointsCreateOrUpdateSamples { public final class ServerlessEndpointsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ServerlessEndpoint/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ServerlessEndpoint/delete.json */ /** * Sample code: Delete Workspace Serverless Endpoint. @@ -7302,8 +9587,8 @@ public final class ServerlessEndpointsDeleteSamples { public final class ServerlessEndpointsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ServerlessEndpoint/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ServerlessEndpoint/get.json */ /** * Sample code: Get Workspace Serverless Endpoint. @@ -7327,8 +9612,8 @@ public final class ServerlessEndpointsGetSamples { public final class ServerlessEndpointsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ServerlessEndpoint/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ServerlessEndpoint/list.json */ /** * Sample code: List Workspace Serverless Endpoint. @@ -7351,8 +9636,8 @@ public final class ServerlessEndpointsListSamples { public final class ServerlessEndpointsListKeysSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ServerlessEndpoint/listKeys.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ServerlessEndpoint/listKeys.json */ /** * Sample code: ListKeys Workspace Serverless Endpoint. @@ -7379,8 +9664,8 @@ import com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRe public final class ServerlessEndpointsRegenerateKeysSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ServerlessEndpoint/regenerateKeys.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ServerlessEndpoint/regenerateKeys.json */ /** * Sample code: RegenerateKeys Workspace Serverless Endpoint. @@ -7417,8 +9702,8 @@ import java.util.Map; public final class ServerlessEndpointsUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ServerlessEndpoint/update.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ServerlessEndpoint/update.json */ /** * Sample code: Update Workspace Serverless Endpoint. @@ -7432,15 +9717,15 @@ public final class ServerlessEndpointsUpdateSamples { .getValue(); resource.update() .withTags(mapOf()) - .withSku(new PartialSku().withName("string") - .withTier(SkuTier.PREMIUM) - .withSize("string") - .withFamily("string") - .withCapacity(1)) .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.PREMIUM)) .apply(); } @@ -7467,8 +9752,8 @@ public final class ServerlessEndpointsUpdateSamples { public final class UsagesListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Usage/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Usage/list.json */ /** * Sample code: List Usages. @@ -7490,8 +9775,8 @@ public final class UsagesListSamples { public final class VirtualMachineSizesListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/VirtualMachineSize/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/VirtualMachineSize/list.json */ /** * Sample code: List VM Sizes. @@ -7509,6 +9794,7 @@ public final class VirtualMachineSizesListSamples { ```java import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; import com.azure.resourcemanager.machinelearning.models.NoneAuthTypeWorkspaceConnectionProperties; +import java.time.OffsetDateTime; /** * Samples for WorkspaceConnections Create. @@ -7516,8 +9802,8 @@ import com.azure.resourcemanager.machinelearning.models.NoneAuthTypeWorkspaceCon public final class WorkspaceConnectionsCreateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/WorkspaceConnection/create.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/create.json */ /** * Sample code: CreateWorkspaceConnection. @@ -7531,6 +9817,7 @@ public final class WorkspaceConnectionsCreateSamples { .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(); } @@ -7546,8 +9833,8 @@ public final class WorkspaceConnectionsCreateSamples { public final class WorkspaceConnectionsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/WorkspaceConnection/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/delete.json */ /** * Sample code: DeleteWorkspaceConnection. @@ -7571,8 +9858,8 @@ public final class WorkspaceConnectionsDeleteSamples { public final class WorkspaceConnectionsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/WorkspaceConnection/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/get.json */ /** * Sample code: GetWorkspaceConnection. @@ -7596,8 +9883,8 @@ public final class WorkspaceConnectionsGetSamples { public final class WorkspaceConnectionsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/WorkspaceConnection/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/list.json */ /** * Sample code: ListWorkspaceConnections. @@ -7607,7 +9894,7 @@ public final class WorkspaceConnectionsListSamples { public static void listWorkspaceConnections(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.workspaceConnections() - .list("resourceGroup-1", "workspace-1", "www.facebook.com", "ContainerRegistry", + .list("resourceGroup-1", "workspace-1", "www.facebook.com", "ContainerRegistry", null, com.azure.core.util.Context.NONE); } } @@ -7622,8 +9909,8 @@ public final class WorkspaceConnectionsListSamples { public final class WorkspaceConnectionsListSecretsSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/WorkspaceConnection/listSecrets.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/listSecrets.json */ /** * Sample code: GetWorkspaceConnection. @@ -7638,6 +9925,96 @@ public final class WorkspaceConnectionsListSecretsSamples { } ``` +### 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; + +/** + * Samples for WorkspaceConnections TestConnection. + */ +public final class WorkspaceConnectionsTestConnectionSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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.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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for WorkspaceConnections Update. + */ +public final class WorkspaceConnectionsUpdateSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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) { + WorkspaceConnectionPropertiesV2BasicResource resource = manager.workspaceConnections() + .getWithResponse("test-rg", "workspace-1", "connection-1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties( + new AccessKeyAuthTypeWorkspaceConnectionProperties().withCategory(ConnectionCategory.ADLSGEN2) + .withExpiryTime(OffsetDateTime.parse("2020-01-01T00:00:00Z")) + .withMetadata(mapOf()) + .withTarget("some_string") + .withCredentials(new WorkspaceConnectionAccessKey().withAccessKeyId("fakeTokenPlaceholder") + .withSecretAccessKey("fakeTokenPlaceholder"))) + .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; + } +} +``` + ### WorkspaceFeatures_List ```java @@ -7647,8 +10024,8 @@ public final class WorkspaceConnectionsListSecretsSamples { public final class WorkspaceFeaturesListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/WorkspaceFeature/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceFeature/list.json */ /** * Sample code: List Workspace features. @@ -7664,13 +10041,13 @@ 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; @@ -7683,8 +10060,8 @@ import java.util.Map; public final class WorkspacesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/create.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/create.json */ /** * Sample code: Create Workspace. @@ -7701,29 +10078,29 @@ public final class WorkspacesCreateOrUpdateSamples { .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") + .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") - .withIdentityClientId(""))) + .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") - .withGroupId("Sql") .withRequestMessage("Please approve") - .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED))) + .withStatus(EndpointServiceConnectionStatus.APPROVED))) + .withStorageAccount( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccount") .create(); } @@ -7750,8 +10127,8 @@ public final class WorkspacesCreateOrUpdateSamples { public final class WorkspacesDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/delete.json */ /** * Sample code: Delete Workspace. @@ -7778,8 +10155,8 @@ import java.util.Map; public final class WorkspacesDiagnoseSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/diagnose.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/diagnose.json */ /** * Sample code: Diagnose Workspace. @@ -7789,15 +10166,16 @@ public final class WorkspacesDiagnoseSamples { 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())), + 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); } @@ -7824,8 +10202,8 @@ public final class WorkspacesDiagnoseSamples { public final class WorkspacesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/get.json */ /** * Sample code: Get Workspace. @@ -7848,8 +10226,8 @@ public final class WorkspacesGetByResourceGroupSamples { public final class WorkspacesListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/listBySubscription.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/listBySubscription.json */ /** * Sample code: Get Workspaces by subscription. @@ -7858,7 +10236,7 @@ public final class WorkspacesListSamples { */ public static void getWorkspacesBySubscription(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaces().list(null, com.azure.core.util.Context.NONE); + manager.workspaces().list(null, null, null, com.azure.core.util.Context.NONE); } } ``` @@ -7872,8 +10250,8 @@ public final class WorkspacesListSamples { public final class WorkspacesListByResourceGroupSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/listByResourceGroup.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/listByResourceGroup.json */ /** * Sample code: Get Workspaces by Resource Group. @@ -7882,7 +10260,7 @@ public final class WorkspacesListByResourceGroupSamples { */ public static void getWorkspacesByResourceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaces().listByResourceGroup("workspace-1234", null, com.azure.core.util.Context.NONE); + manager.workspaces().listByResourceGroup("workspace-1234", null, null, null, com.azure.core.util.Context.NONE); } } ``` @@ -7896,8 +10274,8 @@ public final class WorkspacesListByResourceGroupSamples { public final class WorkspacesListKeysSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/listKeys.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/listKeys.json */ /** * Sample code: List Workspace Keys. @@ -7919,8 +10297,8 @@ public final class WorkspacesListKeysSamples { public final class WorkspacesListNotebookAccessTokenSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/listNotebookAccessToken.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/listNotebookAccessToken.json */ /** * Sample code: List Workspace Keys. @@ -7943,8 +10321,8 @@ public final class WorkspacesListNotebookAccessTokenSamples { public final class WorkspacesListNotebookKeysSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Notebook/listKeys.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Notebook/listKeys.json */ /** * Sample code: List Workspace Keys. @@ -7967,8 +10345,8 @@ public final class WorkspacesListNotebookKeysSamples { public final class WorkspacesListOutboundNetworkDependenciesEndpointsSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/ExternalFQDN/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/ExternalFQDN/get.json */ /** * Sample code: ListOutboundNetworkDependenciesEndpoints. @@ -7993,8 +10371,8 @@ public final class WorkspacesListOutboundNetworkDependenciesEndpointsSamples { public final class WorkspacesListStorageAccountKeysSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/listStorageAccountKeys.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/listStorageAccountKeys.json */ /** * Sample code: List Workspace Keys. @@ -8017,8 +10395,8 @@ public final class WorkspacesListStorageAccountKeysSamples { public final class WorkspacesPrepareNotebookSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Notebook/prepare.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Notebook/prepare.json */ /** * Sample code: Prepare Notebook. @@ -8040,8 +10418,8 @@ public final class WorkspacesPrepareNotebookSamples { public final class WorkspacesResyncKeysSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/resyncKeys.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/resyncKeys.json */ /** * Sample code: Resync Workspace Keys. @@ -8057,7 +10435,7 @@ 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; /** @@ -8066,8 +10444,8 @@ import com.azure.resourcemanager.machinelearning.models.Workspace; public final class WorkspacesUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/update.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/update.json */ /** * Sample code: Update Workspace. @@ -8081,7 +10459,7 @@ public final class WorkspacesUpdateSamples { resource.update() .withDescription("new description") .withFriendlyName("New friendly name") - .withPublicNetworkAccess(PublicNetworkAccess.DISABLED) + .withPublicNetworkAccess(PublicNetworkAccessType.DISABLED) .apply(); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/pom.xml b/sdk/machinelearning/azure-resourcemanager-machinelearning/pom.xml index 37f3d22af960b..f87951423f5d5 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/pom.xml +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/pom.xml @@ -18,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-2024-04. + 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-2025-01. https://github.com/Azure/azure-sdk-for-java @@ -46,13 +46,9 @@ 0 0 true + false - - com.azure - azure-json - 1.3.0 - com.azure azure-core @@ -63,6 +59,11 @@ azure-core-management 1.15.6 + + com.azure + azure-json + 1.3.0 + com.azure azure-core-test 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 bb31e555c22f5..16f0e98406775 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 @@ -11,15 +11,15 @@ import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.AddHeadersFromContextPolicy; -import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.RequestIdPolicy; import com.azure.core.http.policy.RetryOptions; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; @@ -27,21 +27,34 @@ import com.azure.resourcemanager.machinelearning.implementation.AzureMachineLearningWorkspacesBuilder; import com.azure.resourcemanager.machinelearning.implementation.BatchDeploymentsImpl; import com.azure.resourcemanager.machinelearning.implementation.BatchEndpointsImpl; +import com.azure.resourcemanager.machinelearning.implementation.CapabilityHostsImpl; import com.azure.resourcemanager.machinelearning.implementation.CodeContainersImpl; import com.azure.resourcemanager.machinelearning.implementation.CodeVersionsImpl; import com.azure.resourcemanager.machinelearning.implementation.ComponentContainersImpl; import com.azure.resourcemanager.machinelearning.implementation.ComponentVersionsImpl; import com.azure.resourcemanager.machinelearning.implementation.ComputesImpl; +import com.azure.resourcemanager.machinelearning.implementation.ConnectionRaiBlocklistItemsImpl; +import com.azure.resourcemanager.machinelearning.implementation.ConnectionRaiBlocklistItemsOperationsImpl; +import com.azure.resourcemanager.machinelearning.implementation.ConnectionRaiBlocklistOperationsImpl; +import com.azure.resourcemanager.machinelearning.implementation.ConnectionRaiBlocklistsImpl; +import com.azure.resourcemanager.machinelearning.implementation.ConnectionRaiPoliciesImpl; +import com.azure.resourcemanager.machinelearning.implementation.ConnectionRaiPolicyOperationsImpl; +import com.azure.resourcemanager.machinelearning.implementation.ConnectionsImpl; import com.azure.resourcemanager.machinelearning.implementation.DataContainersImpl; -import com.azure.resourcemanager.machinelearning.implementation.DatastoresImpl; 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.FeaturesImpl; 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.ManagedNetworkProvisionsImpl; import com.azure.resourcemanager.machinelearning.implementation.ManagedNetworkSettingsRulesImpl; @@ -53,7 +66,10 @@ import com.azure.resourcemanager.machinelearning.implementation.OperationsImpl; import com.azure.resourcemanager.machinelearning.implementation.PrivateEndpointConnectionsImpl; import com.azure.resourcemanager.machinelearning.implementation.PrivateLinkResourcesImpl; +import com.azure.resourcemanager.machinelearning.implementation.PtuQuotasImpl; import com.azure.resourcemanager.machinelearning.implementation.QuotasImpl; +import com.azure.resourcemanager.machinelearning.implementation.RaiPoliciesImpl; +import com.azure.resourcemanager.machinelearning.implementation.RaiPolicyOperationsImpl; import com.azure.resourcemanager.machinelearning.implementation.RegistriesImpl; import com.azure.resourcemanager.machinelearning.implementation.RegistryCodeContainersImpl; import com.azure.resourcemanager.machinelearning.implementation.RegistryCodeVersionsImpl; @@ -75,14 +91,24 @@ 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.CapabilityHosts; import com.azure.resourcemanager.machinelearning.models.CodeContainers; import com.azure.resourcemanager.machinelearning.models.CodeVersions; import com.azure.resourcemanager.machinelearning.models.ComponentContainers; import com.azure.resourcemanager.machinelearning.models.ComponentVersions; import com.azure.resourcemanager.machinelearning.models.Computes; +import com.azure.resourcemanager.machinelearning.models.ConnectionRaiBlocklistItems; +import com.azure.resourcemanager.machinelearning.models.ConnectionRaiBlocklistItemsOperations; +import com.azure.resourcemanager.machinelearning.models.ConnectionRaiBlocklistOperations; +import com.azure.resourcemanager.machinelearning.models.ConnectionRaiBlocklists; +import com.azure.resourcemanager.machinelearning.models.ConnectionRaiPolicies; +import com.azure.resourcemanager.machinelearning.models.ConnectionRaiPolicyOperations; +import com.azure.resourcemanager.machinelearning.models.Connections; import com.azure.resourcemanager.machinelearning.models.DataContainers; -import com.azure.resourcemanager.machinelearning.models.Datastores; 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; @@ -90,6 +116,9 @@ 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.ManagedNetworkProvisions; import com.azure.resourcemanager.machinelearning.models.ManagedNetworkSettingsRules; @@ -101,7 +130,10 @@ import com.azure.resourcemanager.machinelearning.models.Operations; import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnections; import com.azure.resourcemanager.machinelearning.models.PrivateLinkResources; +import com.azure.resourcemanager.machinelearning.models.PtuQuotas; import com.azure.resourcemanager.machinelearning.models.Quotas; +import com.azure.resourcemanager.machinelearning.models.RaiPolicies; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyOperations; import com.azure.resourcemanager.machinelearning.models.Registries; import com.azure.resourcemanager.machinelearning.models.RegistryCodeContainers; import com.azure.resourcemanager.machinelearning.models.RegistryCodeVersions; @@ -133,10 +165,6 @@ * 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; @@ -145,15 +173,7 @@ public final class MachineLearningManager { private Computes computes; - private PrivateEndpointConnections privateEndpointConnections; - - private PrivateLinkResources privateLinkResources; - - private WorkspaceConnections workspaceConnections; - - private ManagedNetworkSettingsRules managedNetworkSettingsRules; - - private ManagedNetworkProvisions managedNetworkProvisions; + private PtuQuotas ptuQuotas; private RegistryCodeContainers registryCodeContainers; @@ -181,6 +201,8 @@ public final class MachineLearningManager { private BatchDeployments batchDeployments; + private CapabilityHosts capabilityHosts; + private CodeContainers codeContainers; private CodeVersions codeVersions; @@ -209,6 +231,12 @@ public final class MachineLearningManager { private FeaturestoreEntityVersions featurestoreEntityVersions; + private InferencePools inferencePools; + + private InferenceEndpoints inferenceEndpoints; + + private InferenceGroups inferenceGroups; + private Jobs jobs; private MarketplaceSubscriptions marketplaceSubscriptions; @@ -229,6 +257,42 @@ public final class MachineLearningManager { private WorkspaceFeatures workspaceFeatures; + private Operations operations; + + private Workspaces workspaces; + + private WorkspaceConnections workspaceConnections; + + private Connections connections; + + private ConnectionRaiBlocklists connectionRaiBlocklists; + + private ConnectionRaiBlocklistOperations connectionRaiBlocklistOperations; + + private ConnectionRaiBlocklistItems connectionRaiBlocklistItems; + + private ConnectionRaiBlocklistItemsOperations connectionRaiBlocklistItemsOperations; + + private ConnectionRaiPolicies connectionRaiPolicies; + + private ConnectionRaiPolicyOperations connectionRaiPolicyOperations; + + private EndpointDeployments endpointDeployments; + + private Endpoints endpoints; + + private RaiPolicies raiPolicies; + + private RaiPolicyOperations raiPolicyOperations; + + private ManagedNetworkSettingsRules managedNetworkSettingsRules; + + private PrivateEndpointConnections privateEndpointConnections; + + private PrivateLinkResources privateLinkResources; + + private ManagedNetworkProvisions managedNetworkProvisions; + private final AzureMachineLearningWorkspaces clientObject; private MachineLearningManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -393,7 +457,7 @@ public MachineLearningManager authenticate(TokenCredential credential, AzureProf .append("-") .append("com.azure.resourcemanager.machinelearning") .append("/") - .append("1.1.0"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) @@ -426,7 +490,7 @@ public MachineLearningManager authenticate(TokenCredential credential, AzureProf HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); - policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); + policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0]))); policies.addAll(this.policies.stream() .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) .collect(Collectors.toList())); @@ -439,30 +503,6 @@ public MachineLearningManager authenticate(TokenCredential credential, AzureProf } } - /** - * 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. * @@ -512,67 +552,15 @@ public Computes computes() { } /** - * Gets the resource collection API of PrivateEndpointConnections. It manages PrivateEndpointConnection. + * Gets the resource collection API of PtuQuotas. * - * @return Resource collection API of PrivateEndpointConnections. + * @return Resource collection API of PtuQuotas. */ - 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); + public PtuQuotas ptuQuotas() { + if (this.ptuQuotas == null) { + this.ptuQuotas = new PtuQuotasImpl(clientObject.getPtuQuotas(), this); } - return privateLinkResources; - } - - /** - * 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 ManagedNetworkSettingsRules. It manages OutboundRuleBasicResource. - * - * @return Resource collection API of ManagedNetworkSettingsRules. - */ - public ManagedNetworkSettingsRules managedNetworkSettingsRules() { - if (this.managedNetworkSettingsRules == null) { - this.managedNetworkSettingsRules - = new ManagedNetworkSettingsRulesImpl(clientObject.getManagedNetworkSettingsRules(), this); - } - return managedNetworkSettingsRules; - } - - /** - * Gets the resource collection API of ManagedNetworkProvisions. - * - * @return Resource collection API of ManagedNetworkProvisions. - */ - public ManagedNetworkProvisions managedNetworkProvisions() { - if (this.managedNetworkProvisions == null) { - this.managedNetworkProvisions - = new ManagedNetworkProvisionsImpl(clientObject.getManagedNetworkProvisions(), this); - } - return managedNetworkProvisions; + return ptuQuotas; } /** @@ -739,6 +727,18 @@ public BatchDeployments batchDeployments() { return batchDeployments; } + /** + * Gets the resource collection API of CapabilityHosts. It manages CapabilityHost. + * + * @return Resource collection API of CapabilityHosts. + */ + public CapabilityHosts capabilityHosts() { + if (this.capabilityHosts == null) { + this.capabilityHosts = new CapabilityHostsImpl(clientObject.getCapabilityHosts(), this); + } + return capabilityHosts; + } + /** * Gets the resource collection API of CodeContainers. It manages CodeContainer. * @@ -909,6 +909,42 @@ public FeaturestoreEntityVersions featurestoreEntityVersions() { 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. * @@ -1030,6 +1066,233 @@ public WorkspaceFeatures workspaceFeatures() { return workspaceFeatures; } + /** + * 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 Connections. It manages EndpointDeploymentResourcePropertiesBasicResource. + * + * @return Resource collection API of Connections. + */ + public Connections connections() { + if (this.connections == null) { + this.connections = new ConnectionsImpl(clientObject.getConnections(), this); + } + return connections; + } + + /** + * Gets the resource collection API of ConnectionRaiBlocklists. + * + * @return Resource collection API of ConnectionRaiBlocklists. + */ + public ConnectionRaiBlocklists connectionRaiBlocklists() { + if (this.connectionRaiBlocklists == null) { + this.connectionRaiBlocklists + = new ConnectionRaiBlocklistsImpl(clientObject.getConnectionRaiBlocklists(), this); + } + return connectionRaiBlocklists; + } + + /** + * Gets the resource collection API of ConnectionRaiBlocklistOperations. It manages + * RaiBlocklistPropertiesBasicResource. + * + * @return Resource collection API of ConnectionRaiBlocklistOperations. + */ + public ConnectionRaiBlocklistOperations connectionRaiBlocklistOperations() { + if (this.connectionRaiBlocklistOperations == null) { + this.connectionRaiBlocklistOperations + = new ConnectionRaiBlocklistOperationsImpl(clientObject.getConnectionRaiBlocklistOperations(), this); + } + return connectionRaiBlocklistOperations; + } + + /** + * Gets the resource collection API of ConnectionRaiBlocklistItems. It manages + * RaiBlocklistItemPropertiesBasicResource. + * + * @return Resource collection API of ConnectionRaiBlocklistItems. + */ + public ConnectionRaiBlocklistItems connectionRaiBlocklistItems() { + if (this.connectionRaiBlocklistItems == null) { + this.connectionRaiBlocklistItems + = new ConnectionRaiBlocklistItemsImpl(clientObject.getConnectionRaiBlocklistItems(), this); + } + return connectionRaiBlocklistItems; + } + + /** + * Gets the resource collection API of ConnectionRaiBlocklistItemsOperations. + * + * @return Resource collection API of ConnectionRaiBlocklistItemsOperations. + */ + public ConnectionRaiBlocklistItemsOperations connectionRaiBlocklistItemsOperations() { + if (this.connectionRaiBlocklistItemsOperations == null) { + this.connectionRaiBlocklistItemsOperations = new ConnectionRaiBlocklistItemsOperationsImpl( + clientObject.getConnectionRaiBlocklistItemsOperations(), this); + } + return connectionRaiBlocklistItemsOperations; + } + + /** + * Gets the resource collection API of ConnectionRaiPolicies. + * + * @return Resource collection API of ConnectionRaiPolicies. + */ + public ConnectionRaiPolicies connectionRaiPolicies() { + if (this.connectionRaiPolicies == null) { + this.connectionRaiPolicies = new ConnectionRaiPoliciesImpl(clientObject.getConnectionRaiPolicies(), this); + } + return connectionRaiPolicies; + } + + /** + * Gets the resource collection API of ConnectionRaiPolicyOperations. It manages RaiPolicyPropertiesBasicResource. + * + * @return Resource collection API of ConnectionRaiPolicyOperations. + */ + public ConnectionRaiPolicyOperations connectionRaiPolicyOperations() { + if (this.connectionRaiPolicyOperations == null) { + this.connectionRaiPolicyOperations + = new ConnectionRaiPolicyOperationsImpl(clientObject.getConnectionRaiPolicyOperations(), this); + } + return connectionRaiPolicyOperations; + } + + /** + * Gets the resource collection API of EndpointDeployments. + * + * @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 RaiPolicies. + * + * @return Resource collection API of RaiPolicies. + */ + public RaiPolicies raiPolicies() { + if (this.raiPolicies == null) { + this.raiPolicies = new RaiPoliciesImpl(clientObject.getRaiPolicies(), this); + } + return raiPolicies; + } + + /** + * Gets the resource collection API of RaiPolicyOperations. + * + * @return Resource collection API of RaiPolicyOperations. + */ + public RaiPolicyOperations raiPolicyOperations() { + if (this.raiPolicyOperations == null) { + this.raiPolicyOperations = new RaiPolicyOperationsImpl(clientObject.getRaiPolicyOperations(), this); + } + return raiPolicyOperations; + } + + /** + * 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 AzureMachineLearningWorkspaces providing direct access to the underlying * auto-generated API implementation, based on Azure REST API. 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 index f9ec50f298e52..25b6a63942f94 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/AzureMachineLearningWorkspaces.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/AzureMachineLearningWorkspaces.java @@ -46,20 +46,6 @@ public interface AzureMachineLearningWorkspaces { */ 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. * @@ -89,39 +75,11 @@ public interface AzureMachineLearningWorkspaces { ComputesClient getComputes(); /** - * Gets the PrivateEndpointConnectionsClient object to access its operations. + * Gets the PtuQuotasClient object to access its operations. * - * @return the PrivateEndpointConnectionsClient object. + * @return the PtuQuotasClient 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 ManagedNetworkSettingsRulesClient object to access its operations. - * - * @return the ManagedNetworkSettingsRulesClient object. - */ - ManagedNetworkSettingsRulesClient getManagedNetworkSettingsRules(); - - /** - * Gets the ManagedNetworkProvisionsClient object to access its operations. - * - * @return the ManagedNetworkProvisionsClient object. - */ - ManagedNetworkProvisionsClient getManagedNetworkProvisions(); + PtuQuotasClient getPtuQuotas(); /** * Gets the RegistryCodeContainersClient object to access its operations. @@ -214,6 +172,13 @@ public interface AzureMachineLearningWorkspaces { */ BatchDeploymentsClient getBatchDeployments(); + /** + * Gets the CapabilityHostsClient object to access its operations. + * + * @return the CapabilityHostsClient object. + */ + CapabilityHostsClient getCapabilityHosts(); + /** * Gets the CodeContainersClient object to access its operations. * @@ -312,6 +277,27 @@ public interface AzureMachineLearningWorkspaces { */ 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. * @@ -381,4 +367,130 @@ public interface AzureMachineLearningWorkspaces { * @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 ConnectionsClient object to access its operations. + * + * @return the ConnectionsClient object. + */ + ConnectionsClient getConnections(); + + /** + * Gets the ConnectionRaiBlocklistsClient object to access its operations. + * + * @return the ConnectionRaiBlocklistsClient object. + */ + ConnectionRaiBlocklistsClient getConnectionRaiBlocklists(); + + /** + * Gets the ConnectionRaiBlocklistOperationsClient object to access its operations. + * + * @return the ConnectionRaiBlocklistOperationsClient object. + */ + ConnectionRaiBlocklistOperationsClient getConnectionRaiBlocklistOperations(); + + /** + * Gets the ConnectionRaiBlocklistItemsClient object to access its operations. + * + * @return the ConnectionRaiBlocklistItemsClient object. + */ + ConnectionRaiBlocklistItemsClient getConnectionRaiBlocklistItems(); + + /** + * Gets the ConnectionRaiBlocklistItemsOperationsClient object to access its operations. + * + * @return the ConnectionRaiBlocklistItemsOperationsClient object. + */ + ConnectionRaiBlocklistItemsOperationsClient getConnectionRaiBlocklistItemsOperations(); + + /** + * Gets the ConnectionRaiPoliciesClient object to access its operations. + * + * @return the ConnectionRaiPoliciesClient object. + */ + ConnectionRaiPoliciesClient getConnectionRaiPolicies(); + + /** + * Gets the ConnectionRaiPolicyOperationsClient object to access its operations. + * + * @return the ConnectionRaiPolicyOperationsClient object. + */ + ConnectionRaiPolicyOperationsClient getConnectionRaiPolicyOperations(); + + /** + * 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 RaiPoliciesClient object to access its operations. + * + * @return the RaiPoliciesClient object. + */ + RaiPoliciesClient getRaiPolicies(); + + /** + * Gets the RaiPolicyOperationsClient object to access its operations. + * + * @return the RaiPolicyOperationsClient object. + */ + RaiPolicyOperationsClient getRaiPolicyOperations(); + + /** + * 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/CapabilityHostsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CapabilityHostsClient.java new file mode 100644 index 0000000000000..459ecb5228254 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CapabilityHostsClient.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.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +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.CapabilityHostInner; + +/** + * An instance of this class provides access to all the operations defined in CapabilityHostsClient. + */ +public interface CapabilityHostsClient { + /** + * Delete capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost 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 capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost 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 capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost 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 capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost 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 capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost 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 capabilityHost along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context); + + /** + * Get capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost 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 capabilityHost. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CapabilityHostInner get(String resourceGroupName, String workspaceName, String name); + + /** + * Create or update capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost name. + * @param body CapabilityHost definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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, CapabilityHostInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String name, CapabilityHostInner body); + + /** + * Create or update capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost name. + * @param body CapabilityHost definition. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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, CapabilityHostInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, String name, CapabilityHostInner body, Context context); + + /** + * Create or update capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost name. + * @param body CapabilityHost definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request 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) + CapabilityHostInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + CapabilityHostInner body); + + /** + * Create or update capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost name. + * @param body CapabilityHost definition. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request 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) + CapabilityHostInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + CapabilityHostInner 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 2acd533571d4f..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,9 +13,15 @@ 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. @@ -290,6 +296,38 @@ void delete(String resourceGroupName, String workspaceName, String computeName, 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. * @@ -354,6 +392,38 @@ Response listKeysWithResponse(String resourceGroupName, Str @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. * @@ -524,4 +594,130 @@ SyncPoller, Void> beginRestart(String resourceGroupName, String */ @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/ConnectionRaiBlocklistItemsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistItemsClient.java new file mode 100644 index 0000000000000..1aed95e09c4bc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistItemsClient.java @@ -0,0 +1,349 @@ +// Copyright (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.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistItemPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemBulkRequest; +import java.util.List; + +/** + * An instance of this class provides access to all the operations defined in ConnectionRaiBlocklistItemsClient. + */ +public interface ConnectionRaiBlocklistItemsClient { + /** + * Add multiple blocklist items to the specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body Properties describing the custom blocklist items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of array of RaiBlocklistItemPropertiesBasicResource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller>, List> + beginAddBulk(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + List body); + + /** + * Add multiple blocklist items to the specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body Properties describing the custom blocklist items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of array of RaiBlocklistItemPropertiesBasicResource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller>, List> + beginAddBulk(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + List body, Context context); + + /** + * Add multiple blocklist items to the specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body Properties describing the custom blocklist items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of RaiBlocklistItemPropertiesBasicResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + List addBulk(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, List body); + + /** + * Add multiple blocklist items to the specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body Properties describing the custom blocklist items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of RaiBlocklistItemPropertiesBasicResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + List addBulk(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, List body, Context context); + + /** + * Delete multiple blocklist items from the specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body List of RAI Blocklist Items Names. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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> beginDeleteBulk(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, Object body); + + /** + * Delete multiple blocklist items from the specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body List of RAI Blocklist Items Names. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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> beginDeleteBulk(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, Object body, Context context); + + /** + * Delete multiple blocklist items from the specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body List of RAI Blocklist Items Names. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 deleteBulk(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + Object body); + + /** + * Delete multiple blocklist items from the specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body List of RAI Blocklist Items Names. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 deleteBulk(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + Object body, Context context); + + /** + * Deletes the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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 connectionName, String raiBlocklistName, String raiBlocklistItemName); + + /** + * Deletes the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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 connectionName, String raiBlocklistName, String raiBlocklistItemName, String proxyApiVersion, + Context context); + + /** + * Deletes the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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, String raiBlocklistName, + String raiBlocklistItemName); + + /** + * Deletes the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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, String raiBlocklistName, + String raiBlocklistItemName, String proxyApiVersion, Context context); + + /** + * Gets the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 custom blocklist item associated with the Azure OpenAI connection along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, + String workspaceName, String connectionName, String raiBlocklistName, String raiBlocklistItemName, + Context context); + + /** + * Gets the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 custom blocklist item associated with the Azure OpenAI connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RaiBlocklistItemPropertiesBasicResourceInner get(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, String raiBlocklistItemName); + + /** + * Update the state of specified blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, RaiBlocklistItemPropertiesBasicResourceInner> + beginCreate(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + String raiBlocklistItemName, RaiBlocklistItemPropertiesBasicResourceInner body); + + /** + * Update the state of specified blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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, RaiBlocklistItemPropertiesBasicResourceInner> + beginCreate(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + String raiBlocklistItemName, RaiBlocklistItemPropertiesBasicResourceInner body, String proxyApiVersion, + Context context); + + /** + * Update the state of specified blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @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) + RaiBlocklistItemPropertiesBasicResourceInner create(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, String raiBlocklistItemName, + RaiBlocklistItemPropertiesBasicResourceInner body); + + /** + * Update the state of specified blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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) + RaiBlocklistItemPropertiesBasicResourceInner create(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, String raiBlocklistItemName, + RaiBlocklistItemPropertiesBasicResourceInner body, String proxyApiVersion, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistItemsOperationsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistItemsOperationsClient.java new file mode 100644 index 0000000000000..696b580bba1d3 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistItemsOperationsClient.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.fluent; + +import com.azure.core.annotation.ReturnType; +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.RaiBlocklistItemPropertiesBasicResourceInner; + +/** + * An instance of this class provides access to all the operations defined in + * ConnectionRaiBlocklistItemsOperationsClient. + */ +public interface ConnectionRaiBlocklistItemsOperationsClient { + /** + * Gets the custom blocklist items associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the custom blocklist items associated with the Azure OpenAI connection as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName); + + /** + * Gets the custom blocklist items associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the custom blocklist items associated with the Azure OpenAI connection as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, String proxyApiVersion, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistOperationsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistOperationsClient.java new file mode 100644 index 0000000000000..916b58cb3885a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistOperationsClient.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.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +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.RaiBlocklistPropertiesBasicResourceInner; + +/** + * An instance of this class provides access to all the operations defined in ConnectionRaiBlocklistOperationsClient. + */ +public interface ConnectionRaiBlocklistOperationsClient { + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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 connectionName, String raiBlocklistName); + + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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 connectionName, String raiBlocklistName, String proxyApiVersion, Context context); + + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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, String raiBlocklistName); + + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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, String raiBlocklistName, + String proxyApiVersion, Context context); + + /** + * Gets the specified custom blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 custom blocklist associated with the Azure OpenAI connection along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, Context context); + + /** + * Gets the specified custom blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 custom blocklist associated with the Azure OpenAI connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RaiBlocklistPropertiesBasicResourceInner get(String resourceGroupName, String workspaceName, String connectionName, + String raiBlocklistName); + + /** + * Update the state of specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, RaiBlocklistPropertiesBasicResourceInner> + beginCreate(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + RaiBlocklistPropertiesBasicResourceInner body); + + /** + * Update the state of specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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, RaiBlocklistPropertiesBasicResourceInner> + beginCreate(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + RaiBlocklistPropertiesBasicResourceInner body, String proxyApiVersion, Context context); + + /** + * Update the state of specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @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) + RaiBlocklistPropertiesBasicResourceInner create(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, RaiBlocklistPropertiesBasicResourceInner body); + + /** + * Update the state of specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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) + RaiBlocklistPropertiesBasicResourceInner create(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, RaiBlocklistPropertiesBasicResourceInner body, + String proxyApiVersion, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistsClient.java new file mode 100644 index 0000000000000..38075fc9f81a2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiBlocklistsClient.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.fluent; + +import com.azure.core.annotation.ReturnType; +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.RaiBlocklistPropertiesBasicResourceInner; + +/** + * An instance of this class provides access to all the operations defined in ConnectionRaiBlocklistsClient. + */ +public interface ConnectionRaiBlocklistsClient { + /** + * Gets the custom blocklists associated with the Azure OpenAI connection. + * + * @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 custom blocklists associated with the Azure OpenAI connection as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName); + + /** + * Gets the custom blocklists associated with the Azure OpenAI connection. + * + * @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 proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the custom blocklists associated with the Azure OpenAI connection as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName, String proxyApiVersion, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiPoliciesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiPoliciesClient.java new file mode 100644 index 0000000000000..cc45b85aca813 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiPoliciesClient.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.fluent; + +import com.azure.core.annotation.ReturnType; +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.RaiPolicyPropertiesBasicResourceInner; + +/** + * An instance of this class provides access to all the operations defined in ConnectionRaiPoliciesClient. + */ +public interface ConnectionRaiPoliciesClient { + /** + * List the specified Content Filters associated with the Azure OpenAI connection. + * + * @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 azure OpenAI Content Filters resource list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName); + + /** + * List the specified Content Filters associated with the Azure OpenAI connection. + * + * @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 proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName, String proxyApiVersion, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiPolicyOperationsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiPolicyOperationsClient.java new file mode 100644 index 0000000000000..2cdcd613e7012 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionRaiPolicyOperationsClient.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.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +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.RaiPolicyPropertiesBasicResourceInner; + +/** + * An instance of this class provides access to all the operations defined in ConnectionRaiPolicyOperationsClient. + */ +public interface ConnectionRaiPolicyOperationsClient { + /** + * Deletes the specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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 connectionName, String raiPolicyName); + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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 connectionName, String raiPolicyName, String proxyApiVersion, Context context); + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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, String raiPolicyName); + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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, String raiPolicyName, + String proxyApiVersion, Context context); + + /** + * Gets the specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 Content Filters associated with the Azure OpenAI connection along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, + String connectionName, String raiPolicyName, Context context); + + /** + * Gets the specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 Content Filters associated with the Azure OpenAI connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RaiPolicyPropertiesBasicResourceInner get(String resourceGroupName, String workspaceName, String connectionName, + String raiPolicyName); + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @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 {@link SyncPoller} for polling of azure OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, RaiPolicyPropertiesBasicResourceInner> beginCreate( + String resourceGroupName, String workspaceName, String connectionName, String raiPolicyName, + RaiPolicyPropertiesBasicResourceInner body); + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, RaiPolicyPropertiesBasicResourceInner> beginCreate( + String resourceGroupName, String workspaceName, String connectionName, String raiPolicyName, + RaiPolicyPropertiesBasicResourceInner body, String proxyApiVersion, Context context); + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @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 azure OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RaiPolicyPropertiesBasicResourceInner create(String resourceGroupName, String workspaceName, String connectionName, + String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body); + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RaiPolicyPropertiesBasicResourceInner create(String resourceGroupName, String workspaceName, String connectionName, + String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body, String proxyApiVersion, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionsClient.java new file mode 100644 index 0000000000000..51102684efd05 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ConnectionsClient.java @@ -0,0 +1,289 @@ +// Copyright (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.fluent.models.EndpointModelPropertiesInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelsInner; + +/** + * An instance of this class provides access to all the operations defined in ConnectionsClient. + */ +public interface ConnectionsClient { + /** + * Get all the deployments under the Azure OpenAI connection. + * + * @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 all the deployments under the Azure OpenAI connection as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listDeployments(String resourceGroupName, + String workspaceName, String connectionName); + + /** + * Get all the deployments under the Azure OpenAI connection. + * + * @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 proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 Azure OpenAI connection as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listDeployments(String resourceGroupName, + String workspaceName, String connectionName, String proxyApiVersion, Context context); + + /** + * Delete Azure OpenAI connection 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 connectionName Friendly name of the workspace connection. + * @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> beginDeleteDeployment(String resourceGroupName, String workspaceName, + String connectionName, String deploymentName); + + /** + * Delete Azure OpenAI connection 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 connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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> beginDeleteDeployment(String resourceGroupName, String workspaceName, + String connectionName, String deploymentName, String proxyApiVersion, Context context); + + /** + * Delete Azure OpenAI connection 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 connectionName Friendly name of the workspace connection. + * @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 deleteDeployment(String resourceGroupName, String workspaceName, String connectionName, String deploymentName); + + /** + * Delete Azure OpenAI connection 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 connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 deleteDeployment(String resourceGroupName, String workspaceName, String connectionName, String deploymentName, + String proxyApiVersion, Context context); + + /** + * Get deployments under the Azure OpenAI connection 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 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 the Azure OpenAI connection by name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getDeploymentWithResponse(String resourceGroupName, + String workspaceName, String connectionName, String deploymentName, Context context); + + /** + * Get deployments under the Azure OpenAI connection 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 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 the Azure OpenAI connection by name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EndpointDeploymentResourcePropertiesBasicResourceInner getDeployment(String resourceGroupName, String workspaceName, + String connectionName, String deploymentName); + + /** + * Create or update Azure OpenAI connection 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 connectionName Friendly name of the workspace connection. + * @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> + beginCreateOrUpdateDeployment(String resourceGroupName, String workspaceName, String connectionName, + String deploymentName, EndpointDeploymentResourcePropertiesBasicResourceInner body); + + /** + * Create or update Azure OpenAI connection 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 connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @param body deployment object. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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> + beginCreateOrUpdateDeployment(String resourceGroupName, String workspaceName, String connectionName, + String deploymentName, EndpointDeploymentResourcePropertiesBasicResourceInner body, String proxyApiVersion, + Context context); + + /** + * Create or update Azure OpenAI connection 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 connectionName Friendly name of the workspace connection. + * @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 createOrUpdateDeployment(String resourceGroupName, + String workspaceName, String connectionName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body); + + /** + * Create or update Azure OpenAI connection 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 connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @param body deployment object. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown 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 createOrUpdateDeployment(String resourceGroupName, + String workspaceName, String connectionName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body, String proxyApiVersion, Context context); + + /** + * Get available models under the Azure OpenAI connection. + * + * @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 available models under the Azure OpenAI connection as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getModels(String resourceGroupName, String workspaceName, + String connectionName); + + /** + * Get available models under the Azure OpenAI connection. + * + * @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 proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 Azure OpenAI connection as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getModels(String resourceGroupName, String workspaceName, + String connectionName, String proxyApiVersion, Context context); + + /** + * Get models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + * + * @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 models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getAllModelsWithResponse(String resourceGroupName, String workspaceName, + Context context); + + /** + * Get models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + * + * @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 models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EndpointModelsInner getAllModels(String resourceGroupName, String workspaceName); +} 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 4f1a49380464a..4b27708c65d20 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 @@ -11,6 +11,7 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreInner; import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner; +import com.azure.resourcemanager.machinelearning.models.SecretExpiry; import java.util.List; /** @@ -149,6 +150,7 @@ Response createOrUpdateWithResponse(String resourceGroupName, St * @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. + * @param body Secret expiry information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -157,7 +159,7 @@ Response createOrUpdateWithResponse(String resourceGroupName, St */ @ServiceMethod(returns = ReturnType.SINGLE) Response listSecretsWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); + SecretExpiry body, Context context); /** * Get datastore secrets. 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..4a06dc0967ec9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EndpointDeploymentsClient.java @@ -0,0 +1,254 @@ +// Copyright (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 proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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, String proxyApiVersion, 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 proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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, + String proxyApiVersion, 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..954f8a76f9ceb --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EndpointsClient.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.AccountApiKeysInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointKeysInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelPropertiesInner; +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 includeOnlineEndpoints The includeOnlineEndpoints parameter. + * @param includeServerlessEndpoints The includeServerlessEndpoints parameter. + * @param includeConnections The includeConnections parameter. + * @param skip Continuation token for pagination. + * @param expand Whether the endpoint resource will be expand to include deployment information, e.g. + * $expand=deployments. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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, Boolean includeOnlineEndpoints, Boolean includeServerlessEndpoints, + Boolean includeConnections, String skip, String expand, 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/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..8ef3c24a40f6b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/InferenceGroupsClient.java @@ -0,0 +1,504 @@ +// Copyright (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.DeltaModelStatusResponseInner; +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.DeltaModelListRequest; +import com.azure.resourcemanager.machinelearning.models.DeltaModelModifyRequest; +import com.azure.resourcemanager.machinelearning.models.DeltaModelStatusRequest; +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 status of delta models associated with the InferenceGroup and the target base model. + * + * @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 DeltaModelBaseRequest. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return contract returning to user the delta models along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getDeltaModelsStatusAsyncWithResponse(String resourceGroupName, + String workspaceName, String poolName, String groupName, DeltaModelStatusRequest body, Context context); + + /** + * Retrieve status of delta models associated with the InferenceGroup and the target base model. + * + * @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 DeltaModelBaseRequest. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return contract returning to user the delta models. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeltaModelStatusResponseInner getDeltaModelsStatusAsync(String resourceGroupName, String workspaceName, + String poolName, String groupName, DeltaModelStatusRequest body); + + /** + * List delta models associated with the InferenceGroup and the target base model. + * + * @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 DeltaModelBaseRequest. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of String entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listDeltaModelsAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName, DeltaModelListRequest body); + + /** + * List delta models associated with the InferenceGroup and the target base model. + * + * @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 DeltaModelBaseRequest. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of String entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listDeltaModelsAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName, DeltaModelListRequest body, Context context); + + /** + * Modify delta models associated with the InferenceGroup and the target base model. + * + * @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 DeltaModelModifyRequest. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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> beginModifyDeltaModelsAsync(String resourceGroupName, String workspaceName, + String poolName, String groupName, DeltaModelModifyRequest body); + + /** + * Modify delta models associated with the InferenceGroup and the target base model. + * + * @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 DeltaModelModifyRequest. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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> beginModifyDeltaModelsAsync(String resourceGroupName, String workspaceName, + String poolName, String groupName, DeltaModelModifyRequest body, Context context); + + /** + * Modify delta models associated with the InferenceGroup and the target base model. + * + * @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 DeltaModelModifyRequest. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 modifyDeltaModelsAsync(String resourceGroupName, String workspaceName, String poolName, String groupName, + DeltaModelModifyRequest body); + + /** + * Modify delta models associated with the InferenceGroup and the target base model. + * + * @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 DeltaModelModifyRequest. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 modifyDeltaModelsAsync(String resourceGroupName, String workspaceName, String poolName, String groupName, + DeltaModelModifyRequest 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..4c93202335e28 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/InferencePoolsClient.java @@ -0,0 +1,277 @@ +// Copyright (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.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); +} 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 index 1d352bc171417..d465c7a581e86 100644 --- 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 @@ -20,7 +20,7 @@ public interface ManagedNetworkProvisionsClient { * Provisions the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @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. @@ -35,7 +35,7 @@ public interface ManagedNetworkProvisionsClient { * Provisions the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @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. @@ -53,7 +53,7 @@ public interface ManagedNetworkProvisionsClient { * Provisions the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @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. @@ -66,7 +66,7 @@ public interface ManagedNetworkProvisionsClient { * Provisions the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @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. 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 index e092cd4e3ab95..03336b3bbbb45 100644 --- 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 @@ -21,7 +21,7 @@ public interface ManagedNetworkSettingsRulesClient { * Lists the managed network outbound rules for a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @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. @@ -35,7 +35,7 @@ public interface ManagedNetworkSettingsRulesClient { * Lists the managed network outbound rules for a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @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. @@ -50,7 +50,7 @@ public interface ManagedNetworkSettingsRulesClient { * Deletes an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -64,7 +64,7 @@ public interface ManagedNetworkSettingsRulesClient { * Deletes an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -80,7 +80,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * Deletes an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -93,7 +93,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * Deletes an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -107,7 +107,7 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String * Gets an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -123,7 +123,7 @@ Response getWithResponse(String resourceGroupNam * Gets an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -137,14 +137,13 @@ Response getWithResponse(String resourceGroupNam * Creates or updates an outbound rule in the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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 outbound Rule Basic Resource for the managed network of a machine - * learning workspace. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OutboundRuleBasicResourceInner> beginCreateOrUpdate( @@ -154,15 +153,14 @@ SyncPoller, OutboundRuleBasicResource * Creates or updates an outbound rule in the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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 outbound Rule Basic Resource for the managed network of a machine - * learning workspace. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, OutboundRuleBasicResourceInner> beginCreateOrUpdate( @@ -173,13 +171,13 @@ SyncPoller, OutboundRuleBasicResource * Creates or updates an outbound rule in the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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 outbound Rule Basic Resource for the managed network of a machine learning workspace. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) OutboundRuleBasicResourceInner createOrUpdate(String resourceGroupName, String workspaceName, String ruleName, @@ -189,14 +187,14 @@ OutboundRuleBasicResourceInner createOrUpdate(String resourceGroupName, String w * Creates or updates an outbound rule in the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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 outbound Rule Basic Resource for the managed network of a machine learning workspace. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) OutboundRuleBasicResourceInner createOrUpdate(String resourceGroupName, String workspaceName, String ruleName, 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 b3867155b4b7b..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 @@ -16,10 +16,10 @@ */ 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. @@ -30,10 +30,10 @@ public interface PrivateEndpointConnectionsClient { 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. @@ -45,43 +45,40 @@ public interface PrivateEndpointConnectionsClient { 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, + 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. @@ -89,51 +86,56 @@ PrivateEndpointConnectionInner get(String resourceGroupName, String workspaceNam * @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 c40a3ce213ae6..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,39 +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. */ 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/PtuQuotasClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PtuQuotasClient.java new file mode 100644 index 0000000000000..103bfafe2861a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PtuQuotasClient.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.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.AvailableQuotaInner; +import com.azure.resourcemanager.machinelearning.fluent.models.UsageAndQuotaDetailsInner; + +/** + * An instance of this class provides access to all the operations defined in PtuQuotasClient. + */ +public interface PtuQuotasClient { + /** + * List available MaaS PTU quota. + * + * @param location The name of Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of AvailableQuota entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listAvailable(String location); + + /** + * List available MaaS PTU quota. + * + * @param location The name of Azure region. + * @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 AvailableQuota entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listAvailable(String location, String skip, Context context); + + /** + * Get available MaaS PTU quota. + * + * @param location The name of Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available MaaS PTU quota along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getAvailableWithResponse(String location, Context context); + + /** + * Get available MaaS PTU quota. + * + * @param location The name of Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available MaaS PTU quota. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AvailableQuotaInner getAvailable(String location); + + /** + * List MaaS PTU usage and quota. + * + * @param location The name of Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of UsageAndQuotaDetails entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String location); + + /** + * List MaaS PTU usage and quota. + * + * @param location The name of Azure region. + * @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 UsageAndQuotaDetails entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String location, String skip, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RaiPoliciesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RaiPoliciesClient.java new file mode 100644 index 0000000000000..c0e141b3045b9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RaiPoliciesClient.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.fluent; + +import com.azure.core.annotation.ReturnType; +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.RaiPolicyPropertiesBasicResourceInner; + +/** + * An instance of this class provides access to all the operations defined in RaiPoliciesClient. + */ +public interface RaiPoliciesClient { + /** + * List the specified Content Filters associated with the Azure OpenAI account. + * + * @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 azure OpenAI Content Filters resource list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, + String endpointName); + + /** + * List the specified Content Filters associated with the Azure OpenAI account. + * + * @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 proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String workspaceName, + String endpointName, String proxyApiVersion, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RaiPolicyOperationsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RaiPolicyOperationsClient.java new file mode 100644 index 0000000000000..b6c141554b269 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/RaiPolicyOperationsClient.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.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +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.RaiPolicyPropertiesBasicResourceInner; + +/** + * An instance of this class provides access to all the operations defined in RaiPolicyOperationsClient. + */ +public interface RaiPolicyOperationsClient { + /** + * Deletes the specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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 raiPolicyName); + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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 raiPolicyName, String proxyApiVersion, Context context); + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 raiPolicyName); + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 raiPolicyName, + String proxyApiVersion, Context context); + + /** + * Gets the specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 Content Filters associated with the Azure OpenAI account along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String workspaceName, + String endpointName, String raiPolicyName, Context context); + + /** + * Gets the specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 Content Filters associated with the Azure OpenAI account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RaiPolicyPropertiesBasicResourceInner get(String resourceGroupName, String workspaceName, String endpointName, + String raiPolicyName); + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @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 {@link SyncPoller} for polling of azure OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, RaiPolicyPropertiesBasicResourceInner> beginCreate( + String resourceGroupName, String workspaceName, String endpointName, String raiPolicyName, + RaiPolicyPropertiesBasicResourceInner body); + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, RaiPolicyPropertiesBasicResourceInner> beginCreate( + String resourceGroupName, String workspaceName, String endpointName, String raiPolicyName, + RaiPolicyPropertiesBasicResourceInner body, String proxyApiVersion, Context context); + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @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 azure OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RaiPolicyPropertiesBasicResourceInner create(String resourceGroupName, String workspaceName, String endpointName, + String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body); + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RaiPolicyPropertiesBasicResourceInner create(String resourceGroupName, String workspaceName, String endpointName, + String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body, String proxyApiVersion, Context context); +} 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 eee87969a4a32..1fe59f400c6e9 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,52 +8,83 @@ 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. */ 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. - * @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); + void delete(String resourceGroupName, String workspaceName, String connectionName); /** - * 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. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -66,10 +97,10 @@ Response getWithResponse(Stri String workspaceName, String connectionName, 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. @@ -81,70 +112,75 @@ WorkspaceConnectionPropertiesV2BasicResourceInner get(String resourceGroupName, String connectionName); /** - * The delete 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. * @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 updateWithResponse(String resourceGroupName, + String workspaceName, String connectionName, WorkspaceConnectionUpdateParameter body, Context context); /** - * The delete 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. * @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 update(String resourceGroupName, String workspaceName, + String connectionName); /** - * The list 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 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 createWithResponse(String resourceGroupName, + String workspaceName, String connectionName, WorkspaceConnectionPropertiesV2BasicResourceInner body, + Context context); /** - * The list 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 target Target of the workspace connection. - * @param category Category of the workspace connection. - * @param context The context to associate with this operation. + * @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}. + * @return the response. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, - String workspaceName, String target, String category, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + WorkspaceConnectionPropertiesV2BasicResourceInner create(String resourceGroupName, String workspaceName, + String connectionName); /** * 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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -160,7 +196,7 @@ Response listSecretsWithRespo * 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. @@ -170,4 +206,65 @@ Response listSecretsWithRespo @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 {@link SyncPoller} for polling of long-running operation. + */ + @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/WorkspacesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspacesClient.java index d3a6d397d5b90..601f99f3aa017 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 @@ -27,155 +27,152 @@ */ public interface WorkspacesClient { /** - * Gets the properties of the specified machine learning workspace. + * Lists all the available machine learning workspaces under the specified subscription. * - * @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 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. + * Lists all the available machine learning workspaces under the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure 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 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, + @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, Boolean forceToPurge, - 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 forceToPurge Flag to indicate delete is a purge request. - * @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, Boolean forceToPurge, 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. @@ -183,14 +180,14 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkspaceInner> beginUpdate(String resourceGroupName, String workspaceName, - WorkspaceUpdateParameters parameters); + WorkspaceUpdateParameters 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. @@ -199,28 +196,28 @@ SyncPoller, WorkspaceInner> beginUpdate(String resour */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, WorkspaceInner> beginUpdate(String resourceGroupName, String workspaceName, - WorkspaceUpdateParameters parameters, Context context); + WorkspaceUpdateParameters 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, WorkspaceUpdateParameters 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. @@ -228,42 +225,74 @@ SyncPoller, WorkspaceInner> beginUpdate(String resour * @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, WorkspaceUpdateParameters 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. @@ -277,8 +306,8 @@ WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceU * 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. @@ -287,13 +316,13 @@ WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceU */ @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. @@ -306,8 +335,8 @@ 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. @@ -316,14 +345,14 @@ SyncPoller, DiagnoseResponseResultInner> */ @ServiceMethod(returns = ReturnType.SINGLE) DiagnoseResponseResultInner diagnose(String resourceGroupName, String workspaceName, - DiagnoseWorkspaceParameters parameters, Context context); + 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. @@ -339,7 +368,7 @@ Response listKeysWithResponse(String resourceGroup * 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. @@ -349,91 +378,94 @@ Response listKeysWithResponse(String resourceGroup 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. + * Lists keys of Azure Machine Learning Workspace's storage account. * - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @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. @@ -441,27 +473,27 @@ Response listKeysWithResponse(String resourceGroup * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listNotebookAccessTokenWithResponse(String resourceGroupName, + 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. @@ -472,10 +504,10 @@ Response listNotebookAccessTokenWithResponse(Str 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. @@ -487,10 +519,10 @@ Response listNotebookAccessTokenWithResponse(Str 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. @@ -500,10 +532,10 @@ Response listNotebookAccessTokenWithResponse(Str 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. @@ -514,86 +546,58 @@ Response listNotebookAccessTokenWithResponse(Str 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..4d89aafaf9671 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AccountApiKeysInner.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The AccountApiKeys model. + */ +@Fluent +public final class AccountApiKeysInner implements JsonSerializable { + /* + * The key1 property. + */ + private String key1; + + /* + * The key2 property. + */ + 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() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key1", this.key1); + jsonWriter.writeStringField("key2", this.key2); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AccountApiKeysInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AccountApiKeysInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the AccountApiKeysInner. + */ + public static AccountApiKeysInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AccountApiKeysInner deserializedAccountApiKeysInner = new AccountApiKeysInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key1".equals(fieldName)) { + deserializedAccountApiKeysInner.key1 = reader.getString(); + } else if ("key2".equals(fieldName)) { + deserializedAccountApiKeysInner.key2 = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedAccountApiKeysInner; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AvailableQuotaInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AvailableQuotaInner.java new file mode 100644 index 0000000000000..8ec0ef52dd554 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AvailableQuotaInner.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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.models.AvailableQuotaProperties; +import java.io.IOException; + +/** + * The AvailableQuota model. + */ +@Fluent +public final class AvailableQuotaInner implements JsonSerializable { + /* + * Available quota properties + */ + private AvailableQuotaProperties properties; + + /** + * Creates an instance of AvailableQuotaInner class. + */ + public AvailableQuotaInner() { + } + + /** + * Get the properties property: Available quota properties. + * + * @return the properties value. + */ + public AvailableQuotaProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Available quota properties. + * + * @param properties the properties value to set. + * @return the AvailableQuotaInner object itself. + */ + public AvailableQuotaInner withProperties(AvailableQuotaProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AvailableQuotaInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AvailableQuotaInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the AvailableQuotaInner. + */ + public static AvailableQuotaInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AvailableQuotaInner deserializedAvailableQuotaInner = new AvailableQuotaInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedAvailableQuotaInner.properties = AvailableQuotaProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedAvailableQuotaInner; + }); + } +} 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 d4ddade922d39..8cbcab8e32345 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 @@ -23,9 +23,9 @@ @Fluent public final class BatchDeploymentInner extends Resource { /* - * [Required] Additional attributes of the entity. + * Managed service identity (system assigned and/or user assigned identities) */ - private BatchDeploymentProperties properties; + private ManagedServiceIdentity identity; /* * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. @@ -33,9 +33,9 @@ public final class BatchDeploymentInner extends Resource { private String kind; /* - * Managed service identity (system assigned and/or user assigned identities) + * [Required] Additional attributes of the entity. */ - private ManagedServiceIdentity identity; + private BatchDeploymentProperties properties; /* * Sku details required for ARM contract for Autoscaling. @@ -48,9 +48,9 @@ public final class BatchDeploymentInner extends Resource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -58,9 +58,9 @@ public final class BatchDeploymentInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of BatchDeploymentInner class. @@ -69,22 +69,22 @@ public BatchDeploymentInner() { } /** - * Get the properties property: [Required] Additional attributes of the entity. + * Get the identity property: Managed service identity (system assigned and/or user assigned identities). * - * @return the properties value. + * @return the identity value. */ - public BatchDeploymentProperties properties() { - return this.properties; + public ManagedServiceIdentity identity() { + return this.identity; } /** - * Set the properties property: [Required] Additional attributes of the entity. + * Set the identity property: Managed service identity (system assigned and/or user assigned identities). * - * @param properties the properties value to set. + * @param identity the identity value to set. * @return the BatchDeploymentInner object itself. */ - public BatchDeploymentInner withProperties(BatchDeploymentProperties properties) { - this.properties = properties; + public BatchDeploymentInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; return this; } @@ -111,22 +111,22 @@ public BatchDeploymentInner withKind(String kind) { } /** - * Get the identity property: Managed service identity (system assigned and/or user assigned identities). + * Get the properties property: [Required] Additional attributes of the entity. * - * @return the identity value. + * @return the properties value. */ - public ManagedServiceIdentity identity() { - return this.identity; + public BatchDeploymentProperties properties() { + return this.properties; } /** - * Set the identity property: Managed service identity (system assigned and/or user assigned identities). + * Set the properties property: [Required] Additional attributes of the entity. * - * @param identity the identity value to set. + * @param properties the properties value to set. * @return the BatchDeploymentInner object itself. */ - public BatchDeploymentInner withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; + public BatchDeploymentInner withProperties(BatchDeploymentProperties properties) { + this.properties = properties; return this; } @@ -160,13 +160,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -180,13 +180,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** @@ -213,6 +213,9 @@ public BatchDeploymentInner withTags(Map tags) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (identity() != null) { + identity().validate(); + } if (properties() == null) { throw LOGGER.atError() .log( @@ -220,9 +223,6 @@ public void validate() { } else { properties().validate(); } - if (identity() != null) { - identity().validate(); - } if (sku() != null) { sku().validate(); } @@ -239,8 +239,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("kind", this.kind); jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeStringField("kind", this.kind); jsonWriter.writeJsonField("sku", this.sku); return jsonWriter.writeEndObject(); } @@ -274,10 +274,10 @@ public static BatchDeploymentInner fromJson(JsonReader jsonReader) throws IOExce deserializedBatchDeploymentInner.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedBatchDeploymentInner.properties = BatchDeploymentProperties.fromJson(reader); - } else if ("kind".equals(fieldName)) { - deserializedBatchDeploymentInner.kind = reader.getString(); } else if ("identity".equals(fieldName)) { deserializedBatchDeploymentInner.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("kind".equals(fieldName)) { + deserializedBatchDeploymentInner.kind = reader.getString(); } else if ("sku".equals(fieldName)) { deserializedBatchDeploymentInner.sku = Sku.fromJson(reader); } else if ("systemData".equals(fieldName)) { 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 a4494b6eabf16..0c9302a7bade4 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 @@ -23,9 +23,9 @@ @Fluent public final class BatchEndpointInner extends Resource { /* - * [Required] Additional attributes of the entity. + * Managed service identity (system assigned and/or user assigned identities) */ - private BatchEndpointProperties properties; + private ManagedServiceIdentity identity; /* * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. @@ -33,9 +33,9 @@ public final class BatchEndpointInner extends Resource { private String kind; /* - * Managed service identity (system assigned and/or user assigned identities) + * [Required] Additional attributes of the entity. */ - private ManagedServiceIdentity identity; + private BatchEndpointProperties properties; /* * Sku details required for ARM contract for Autoscaling. @@ -48,9 +48,9 @@ public final class BatchEndpointInner extends Resource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -58,9 +58,9 @@ public final class BatchEndpointInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of BatchEndpointInner class. @@ -69,22 +69,22 @@ public BatchEndpointInner() { } /** - * Get the properties property: [Required] Additional attributes of the entity. + * Get the identity property: Managed service identity (system assigned and/or user assigned identities). * - * @return the properties value. + * @return the identity value. */ - public BatchEndpointProperties properties() { - return this.properties; + public ManagedServiceIdentity identity() { + return this.identity; } /** - * Set the properties property: [Required] Additional attributes of the entity. + * Set the identity property: Managed service identity (system assigned and/or user assigned identities). * - * @param properties the properties value to set. + * @param identity the identity value to set. * @return the BatchEndpointInner object itself. */ - public BatchEndpointInner withProperties(BatchEndpointProperties properties) { - this.properties = properties; + public BatchEndpointInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; return this; } @@ -111,22 +111,22 @@ public BatchEndpointInner withKind(String kind) { } /** - * Get the identity property: Managed service identity (system assigned and/or user assigned identities). + * Get the properties property: [Required] Additional attributes of the entity. * - * @return the identity value. + * @return the properties value. */ - public ManagedServiceIdentity identity() { - return this.identity; + public BatchEndpointProperties properties() { + return this.properties; } /** - * Set the identity property: Managed service identity (system assigned and/or user assigned identities). + * Set the properties property: [Required] Additional attributes of the entity. * - * @param identity the identity value to set. + * @param properties the properties value to set. * @return the BatchEndpointInner object itself. */ - public BatchEndpointInner withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; + public BatchEndpointInner withProperties(BatchEndpointProperties properties) { + this.properties = properties; return this; } @@ -160,13 +160,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -180,13 +180,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** @@ -213,15 +213,15 @@ public BatchEndpointInner withTags(Map tags) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (identity() != null) { + identity().validate(); + } if (properties() == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property properties in model BatchEndpointInner")); } else { properties().validate(); } - if (identity() != null) { - identity().validate(); - } if (sku() != null) { sku().validate(); } @@ -238,8 +238,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("kind", this.kind); jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeStringField("kind", this.kind); jsonWriter.writeJsonField("sku", this.sku); return jsonWriter.writeEndObject(); } @@ -273,10 +273,10 @@ public static BatchEndpointInner fromJson(JsonReader jsonReader) throws IOExcept deserializedBatchEndpointInner.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedBatchEndpointInner.properties = BatchEndpointProperties.fromJson(reader); - } else if ("kind".equals(fieldName)) { - deserializedBatchEndpointInner.kind = reader.getString(); } else if ("identity".equals(fieldName)) { deserializedBatchEndpointInner.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("kind".equals(fieldName)) { + deserializedBatchEndpointInner.kind = reader.getString(); } else if ("sku".equals(fieldName)) { deserializedBatchEndpointInner.sku = Sku.fromJson(reader); } else if ("systemData".equals(fieldName)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CapabilityHostInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CapabilityHostInner.java new file mode 100644 index 0000000000000..d0fe535355f27 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CapabilityHostInner.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.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.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.models.CapabilityHostProperties; +import java.io.IOException; + +/** + * Azure Resource Manager resource envelope. + */ +@Fluent +public final class CapabilityHostInner extends ProxyResource { + /* + * [Required] Additional attributes of the entity. + */ + private CapabilityHostProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of CapabilityHostInner class. + */ + public CapabilityHostInner() { + } + + /** + * Get the properties property: [Required] Additional attributes of the entity. + * + * @return the properties value. + */ + public CapabilityHostProperties properties() { + return this.properties; + } + + /** + * Set the properties property: [Required] Additional attributes of the entity. + * + * @param properties the properties value to set. + * @return the CapabilityHostInner object itself. + */ + public CapabilityHostInner withProperties(CapabilityHostProperties 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; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property properties in model CapabilityHostInner")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CapabilityHostInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CapabilityHostInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CapabilityHostInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the CapabilityHostInner. + */ + public static CapabilityHostInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CapabilityHostInner deserializedCapabilityHostInner = new CapabilityHostInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedCapabilityHostInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedCapabilityHostInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedCapabilityHostInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedCapabilityHostInner.properties = CapabilityHostProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedCapabilityHostInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedCapabilityHostInner; + }); + } +} 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 81ef24936822e..12bbde6bffc05 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 @@ -30,9 +30,9 @@ public final class CodeContainerInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +40,9 @@ public final class CodeContainerInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of CodeContainerInner class. @@ -80,13 +80,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,13 +100,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** 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 5b0d8710edc07..5fa02c3298de1 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 @@ -30,9 +30,9 @@ public final class CodeVersionInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +40,9 @@ public final class CodeVersionInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of CodeVersionInner class. @@ -80,13 +80,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,13 +100,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** 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 0168e82327e59..d0a7dcde8d1b1 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 @@ -30,9 +30,9 @@ public final class ComponentContainerInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +40,9 @@ public final class ComponentContainerInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of ComponentContainerInner class. @@ -80,13 +80,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,13 +100,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** 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 fbe9071c6c41d..722a1fa21252e 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 @@ -30,9 +30,9 @@ public final class ComponentVersionInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +40,9 @@ public final class ComponentVersionInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of ComponentVersionInner class. @@ -80,13 +80,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,13 +100,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** 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 9885a5d752a74..2807faa73e379 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 @@ -52,9 +52,9 @@ public final class ComputeResourceInner extends ProxyResource { private Compute properties; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -62,9 +62,9 @@ public final class ComputeResourceInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of ComputeResourceInner class. @@ -182,13 +182,13 @@ public ComputeResourceInner withProperties(Compute properties) { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -202,13 +202,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** 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 b20e49abe512e..5513a8897d49c 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 @@ -30,9 +30,9 @@ public final class DataContainerInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +40,9 @@ public final class DataContainerInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of DataContainerInner class. @@ -80,13 +80,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,13 +100,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** 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 90443894107ed..4d2e169cd82f3 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 @@ -30,9 +30,9 @@ public final class DataVersionBaseInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +40,9 @@ public final class DataVersionBaseInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of DataVersionBaseInner class. @@ -80,13 +80,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,13 +100,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** 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 90773283eb3a5..d7ffc1dc86a95 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 @@ -30,9 +30,9 @@ public final class DatastoreInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +40,9 @@ public final class DatastoreInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of DatastoreInner class. @@ -80,13 +80,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,13 +100,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DeltaModelStatusResponseInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DeltaModelStatusResponseInner.java new file mode 100644 index 0000000000000..8214f72101e0f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DeltaModelStatusResponseInner.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.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.models.DeltaModelCurrentState; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * Contract returning to user the delta models. + */ +@Fluent +public final class DeltaModelStatusResponseInner implements JsonSerializable { + /* + * Gets or sets actual instance count. + */ + private Integer actualInstanceCount; + + /* + * Gets or sets dictionary representing modelID and its current state. + */ + private Map> deltaModels; + + /* + * Gets or sets expected instance count. + */ + private Integer expectedInstanceCount; + + /* + * Gets or sets revision ID. + */ + private String revisionId; + + /* + * Gets or sets target base model. + */ + private String targetBaseModel; + + /** + * Creates an instance of DeltaModelStatusResponseInner class. + */ + public DeltaModelStatusResponseInner() { + } + + /** + * Get the actualInstanceCount property: Gets or sets actual instance count. + * + * @return the actualInstanceCount value. + */ + public Integer actualInstanceCount() { + return this.actualInstanceCount; + } + + /** + * Set the actualInstanceCount property: Gets or sets actual instance count. + * + * @param actualInstanceCount the actualInstanceCount value to set. + * @return the DeltaModelStatusResponseInner object itself. + */ + public DeltaModelStatusResponseInner withActualInstanceCount(Integer actualInstanceCount) { + this.actualInstanceCount = actualInstanceCount; + return this; + } + + /** + * Get the deltaModels property: Gets or sets dictionary representing modelID and its current state. + * + * @return the deltaModels value. + */ + public Map> deltaModels() { + return this.deltaModels; + } + + /** + * Set the deltaModels property: Gets or sets dictionary representing modelID and its current state. + * + * @param deltaModels the deltaModels value to set. + * @return the DeltaModelStatusResponseInner object itself. + */ + public DeltaModelStatusResponseInner withDeltaModels(Map> deltaModels) { + this.deltaModels = deltaModels; + return this; + } + + /** + * Get the expectedInstanceCount property: Gets or sets expected instance count. + * + * @return the expectedInstanceCount value. + */ + public Integer expectedInstanceCount() { + return this.expectedInstanceCount; + } + + /** + * Set the expectedInstanceCount property: Gets or sets expected instance count. + * + * @param expectedInstanceCount the expectedInstanceCount value to set. + * @return the DeltaModelStatusResponseInner object itself. + */ + public DeltaModelStatusResponseInner withExpectedInstanceCount(Integer expectedInstanceCount) { + this.expectedInstanceCount = expectedInstanceCount; + return this; + } + + /** + * Get the revisionId property: Gets or sets revision ID. + * + * @return the revisionId value. + */ + public String revisionId() { + return this.revisionId; + } + + /** + * Set the revisionId property: Gets or sets revision ID. + * + * @param revisionId the revisionId value to set. + * @return the DeltaModelStatusResponseInner object itself. + */ + public DeltaModelStatusResponseInner withRevisionId(String revisionId) { + this.revisionId = revisionId; + return this; + } + + /** + * Get the targetBaseModel property: Gets or sets target base model. + * + * @return the targetBaseModel value. + */ + public String targetBaseModel() { + return this.targetBaseModel; + } + + /** + * Set the targetBaseModel property: Gets or sets target base model. + * + * @param targetBaseModel the targetBaseModel value to set. + * @return the DeltaModelStatusResponseInner object itself. + */ + public DeltaModelStatusResponseInner withTargetBaseModel(String targetBaseModel) { + this.targetBaseModel = targetBaseModel; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (deltaModels() != null) { + deltaModels().values().forEach(e -> { + if (e != null) { + e.forEach(e1 -> e1.validate()); + } + }); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("actualInstanceCount", this.actualInstanceCount); + jsonWriter.writeMapField("deltaModels", this.deltaModels, + (writer, element) -> writer.writeArray(element, (writer1, element1) -> writer1.writeJson(element1))); + jsonWriter.writeNumberField("expectedInstanceCount", this.expectedInstanceCount); + jsonWriter.writeStringField("revisionId", this.revisionId); + jsonWriter.writeStringField("targetBaseModel", this.targetBaseModel); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeltaModelStatusResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeltaModelStatusResponseInner if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the DeltaModelStatusResponseInner. + */ + public static DeltaModelStatusResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeltaModelStatusResponseInner deserializedDeltaModelStatusResponseInner + = new DeltaModelStatusResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("actualInstanceCount".equals(fieldName)) { + deserializedDeltaModelStatusResponseInner.actualInstanceCount + = reader.getNullable(JsonReader::getInt); + } else if ("deltaModels".equals(fieldName)) { + Map> deltaModels = reader + .readMap(reader1 -> reader1.readArray(reader2 -> DeltaModelCurrentState.fromJson(reader2))); + deserializedDeltaModelStatusResponseInner.deltaModels = deltaModels; + } else if ("expectedInstanceCount".equals(fieldName)) { + deserializedDeltaModelStatusResponseInner.expectedInstanceCount + = reader.getNullable(JsonReader::getInt); + } else if ("revisionId".equals(fieldName)) { + deserializedDeltaModelStatusResponseInner.revisionId = reader.getString(); + } else if ("targetBaseModel".equals(fieldName)) { + deserializedDeltaModelStatusResponseInner.targetBaseModel = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDeltaModelStatusResponseInner; + }); + } +} 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 ae60a3319a7b3..f427b864474cf 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 @@ -21,11 +21,6 @@ public final class EndpointAuthTokenInner implements JsonSerializable { + EndpointDeploymentResourcePropertiesBasicResourceInner deserializedEndpointDeploymentResourcePropertiesBasicResourceInner + = new EndpointDeploymentResourcePropertiesBasicResourceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedEndpointDeploymentResourcePropertiesBasicResourceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedEndpointDeploymentResourcePropertiesBasicResourceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedEndpointDeploymentResourcePropertiesBasicResourceInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedEndpointDeploymentResourcePropertiesBasicResourceInner.properties + = EndpointDeploymentResourceProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedEndpointDeploymentResourcePropertiesBasicResourceInner.systemData + = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointDeploymentResourcePropertiesBasicResourceInner; + }); + } +} 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..339b15e5d4a1d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointKeysInner.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The EndpointKeys model. + */ +@Fluent +public final class EndpointKeysInner implements JsonSerializable { + /* + * Dictionary of Keys for the endpoint. + */ + 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(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("keys", this.keys); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EndpointKeysInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointKeysInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the EndpointKeysInner. + */ + public static EndpointKeysInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EndpointKeysInner deserializedEndpointKeysInner = new EndpointKeysInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keys".equals(fieldName)) { + deserializedEndpointKeysInner.keys = AccountApiKeysInner.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointKeysInner; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointModelPropertiesInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointModelPropertiesInner.java new file mode 100644 index 0000000000000..9803395783369 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointModelPropertiesInner.java @@ -0,0 +1,388 @@ +// Copyright (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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.models.EndpointModelDeprecationProperties; +import com.azure.resourcemanager.machinelearning.models.EndpointModelSkuProperties; +import com.azure.resourcemanager.machinelearning.models.ModelLifecycleStatus; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * Endpoint Model properties. + */ +@Fluent +public final class EndpointModelPropertiesInner implements JsonSerializable { + /* + * The capabilities. + */ + private Map capabilities; + + /* + * The deprecation property. + */ + private EndpointModelDeprecationProperties deprecation; + + /* + * The capabilities for finetune models. + */ + private Map finetuneCapabilities; + + /* + * Deployment model format. + */ + private String format; + + /* + * If the model is default version. + */ + private Boolean isDefaultVersion; + + /* + * Model lifecycle status. + */ + private ModelLifecycleStatus lifecycleStatus; + + /* + * The max capacity. + */ + private Integer maxCapacity; + + /* + * Deployment model name. + */ + private String name; + + /* + * The list of Model Sku. + */ + private List skus; + + /* + * Metadata pertaining to creation and last modification of the resource. + */ + private SystemData systemData; + + /* + * 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. + */ + private String version; + + /** + * Creates an instance of EndpointModelPropertiesInner class. + */ + public EndpointModelPropertiesInner() { + } + + /** + * 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 EndpointModelPropertiesInner object itself. + */ + public EndpointModelPropertiesInner withCapabilities(Map capabilities) { + this.capabilities = capabilities; + return this; + } + + /** + * Get the deprecation property: The deprecation property. + * + * @return the deprecation value. + */ + public EndpointModelDeprecationProperties deprecation() { + return this.deprecation; + } + + /** + * Set the deprecation property: The deprecation property. + * + * @param deprecation the deprecation value to set. + * @return the EndpointModelPropertiesInner object itself. + */ + public EndpointModelPropertiesInner withDeprecation(EndpointModelDeprecationProperties deprecation) { + this.deprecation = deprecation; + 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 EndpointModelPropertiesInner object itself. + */ + public EndpointModelPropertiesInner withFinetuneCapabilities(Map finetuneCapabilities) { + this.finetuneCapabilities = finetuneCapabilities; + return this; + } + + /** + * 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 EndpointModelPropertiesInner object itself. + */ + public EndpointModelPropertiesInner withFormat(String format) { + this.format = format; + 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 EndpointModelPropertiesInner object itself. + */ + public EndpointModelPropertiesInner withIsDefaultVersion(Boolean isDefaultVersion) { + this.isDefaultVersion = isDefaultVersion; + 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 EndpointModelPropertiesInner object itself. + */ + public EndpointModelPropertiesInner withLifecycleStatus(ModelLifecycleStatus lifecycleStatus) { + this.lifecycleStatus = lifecycleStatus; + 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 EndpointModelPropertiesInner object itself. + */ + public EndpointModelPropertiesInner withMaxCapacity(Integer maxCapacity) { + this.maxCapacity = maxCapacity; + 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 EndpointModelPropertiesInner object itself. + */ + public EndpointModelPropertiesInner withName(String name) { + this.name = name; + 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 EndpointModelPropertiesInner object itself. + */ + public EndpointModelPropertiesInner withSkus(List skus) { + this.skus = skus; + 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; + } + + /** + * 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 EndpointModelPropertiesInner object itself. + */ + public EndpointModelPropertiesInner withVersion(String version) { + this.version = version; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (deprecation() != null) { + deprecation().validate(); + } + if (skus() != null) { + skus().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("capabilities", this.capabilities, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("deprecation", this.deprecation); + jsonWriter.writeMapField("finetuneCapabilities", this.finetuneCapabilities, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("format", this.format); + jsonWriter.writeBooleanField("isDefaultVersion", this.isDefaultVersion); + jsonWriter.writeStringField("lifecycleStatus", + this.lifecycleStatus == null ? null : this.lifecycleStatus.toString()); + jsonWriter.writeNumberField("maxCapacity", this.maxCapacity); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeArrayField("skus", this.skus, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("version", this.version); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EndpointModelPropertiesInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointModelPropertiesInner if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the EndpointModelPropertiesInner. + */ + public static EndpointModelPropertiesInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EndpointModelPropertiesInner deserializedEndpointModelPropertiesInner = new EndpointModelPropertiesInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("capabilities".equals(fieldName)) { + Map capabilities = reader.readMap(reader1 -> reader1.getString()); + deserializedEndpointModelPropertiesInner.capabilities = capabilities; + } else if ("deprecation".equals(fieldName)) { + deserializedEndpointModelPropertiesInner.deprecation + = EndpointModelDeprecationProperties.fromJson(reader); + } else if ("finetuneCapabilities".equals(fieldName)) { + Map finetuneCapabilities = reader.readMap(reader1 -> reader1.getString()); + deserializedEndpointModelPropertiesInner.finetuneCapabilities = finetuneCapabilities; + } else if ("format".equals(fieldName)) { + deserializedEndpointModelPropertiesInner.format = reader.getString(); + } else if ("isDefaultVersion".equals(fieldName)) { + deserializedEndpointModelPropertiesInner.isDefaultVersion + = reader.getNullable(JsonReader::getBoolean); + } else if ("lifecycleStatus".equals(fieldName)) { + deserializedEndpointModelPropertiesInner.lifecycleStatus + = ModelLifecycleStatus.fromString(reader.getString()); + } else if ("maxCapacity".equals(fieldName)) { + deserializedEndpointModelPropertiesInner.maxCapacity = reader.getNullable(JsonReader::getInt); + } else if ("name".equals(fieldName)) { + deserializedEndpointModelPropertiesInner.name = reader.getString(); + } else if ("skus".equals(fieldName)) { + List skus + = reader.readArray(reader1 -> EndpointModelSkuProperties.fromJson(reader1)); + deserializedEndpointModelPropertiesInner.skus = skus; + } else if ("systemData".equals(fieldName)) { + deserializedEndpointModelPropertiesInner.systemData = SystemData.fromJson(reader); + } else if ("version".equals(fieldName)) { + deserializedEndpointModelPropertiesInner.version = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointModelPropertiesInner; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointModelsInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointModelsInner.java new file mode 100644 index 0000000000000..fced054d394cf --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointModelsInner.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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The EndpointModels model. + */ +@Fluent +public final class EndpointModelsInner implements JsonSerializable { + /* + * The link to the next page constructed using the continuationToken. If null, there are no additional pages. + */ + private String nextLink; + + /* + * List of models. + */ + private List value; + + /** + * Creates an instance of EndpointModelsInner class. + */ + public EndpointModelsInner() { + } + + /** + * 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 EndpointModelsInner object itself. + */ + public EndpointModelsInner 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 EndpointModelsInner object itself. + */ + public EndpointModelsInner 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()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EndpointModelsInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointModelsInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the EndpointModelsInner. + */ + public static EndpointModelsInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EndpointModelsInner deserializedEndpointModelsInner = new EndpointModelsInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nextLink".equals(fieldName)) { + deserializedEndpointModelsInner.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> EndpointModelPropertiesInner.fromJson(reader1)); + deserializedEndpointModelsInner.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointModelsInner; + }); + } +} 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 3ed8cb7b4073b..2ca44272d60df 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 @@ -19,11 +19,24 @@ */ @Fluent public class EndpointPropertiesBaseInner implements JsonSerializable { + /* + * [Required] The authentication method for invoking the endpoint (data plane operation). Use 'Key' for key-based + * authentication. Use 'AMLToken' for Azure Machine Learning token-based authentication. Use 'AADToken' for + * Microsoft Entra token-based authentication. + */ + private EndpointAuthMode authMode; + /* * Description of the inference endpoint. */ private String description; + /* + * EndpointAuthKeys to set initially on an Endpoint. + * This property will always be returned as null. AuthKey values must be retrieved using the ListKeys API. + */ + private EndpointAuthKeysInner keys; + /* * Property dictionary. Properties can be added, but not removed or altered. */ @@ -39,22 +52,34 @@ public class EndpointPropertiesBaseInner implements JsonSerializable writer.writeString(element)); jsonWriter.writeJsonField("keys", this.keys); + jsonWriter.writeMapField("properties", this.properties, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -232,6 +235,8 @@ public static EndpointPropertiesBaseInner fromJson(JsonReader jsonReader) throws deserializedEndpointPropertiesBaseInner.authMode = EndpointAuthMode.fromString(reader.getString()); } else if ("description".equals(fieldName)) { deserializedEndpointPropertiesBaseInner.description = reader.getString(); + } else if ("keys".equals(fieldName)) { + deserializedEndpointPropertiesBaseInner.keys = EndpointAuthKeysInner.fromJson(reader); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedEndpointPropertiesBaseInner.properties = properties; @@ -239,8 +244,6 @@ public static EndpointPropertiesBaseInner fromJson(JsonReader jsonReader) throws deserializedEndpointPropertiesBaseInner.scoringUri = reader.getString(); } else if ("swaggerUri".equals(fieldName)) { deserializedEndpointPropertiesBaseInner.swaggerUri = reader.getString(); - } else if ("keys".equals(fieldName)) { - deserializedEndpointPropertiesBaseInner.keys = EndpointAuthKeysInner.fromJson(reader); } else { reader.skipChildren(); } 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..f8bf7b620413b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointResourcePropertiesBasicResourceInner.java @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.models.EndpointResourceProperties; +import java.io.IOException; + +/** + * The EndpointResourcePropertiesBasicResource model. + */ +@Fluent +public final class EndpointResourcePropertiesBasicResourceInner extends ProxyResource { + /* + * The properties property. + */ + private EndpointResourceProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of 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; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property properties in model EndpointResourcePropertiesBasicResourceInner")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(EndpointResourcePropertiesBasicResourceInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EndpointResourcePropertiesBasicResourceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointResourcePropertiesBasicResourceInner if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the EndpointResourcePropertiesBasicResourceInner. + */ + public static EndpointResourcePropertiesBasicResourceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EndpointResourcePropertiesBasicResourceInner deserializedEndpointResourcePropertiesBasicResourceInner + = new EndpointResourcePropertiesBasicResourceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedEndpointResourcePropertiesBasicResourceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedEndpointResourcePropertiesBasicResourceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedEndpointResourcePropertiesBasicResourceInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedEndpointResourcePropertiesBasicResourceInner.properties + = EndpointResourceProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedEndpointResourcePropertiesBasicResourceInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointResourcePropertiesBasicResourceInner; + }); + } +} 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 988eef2ab7d49..95f4949b8eb4f 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 @@ -30,9 +30,9 @@ public final class EnvironmentContainerInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +40,9 @@ public final class EnvironmentContainerInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of EnvironmentContainerInner class. @@ -80,13 +80,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,13 +100,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** 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 479e58bf02483..9930261eaf798 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 @@ -30,9 +30,9 @@ public final class EnvironmentVersionInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +40,9 @@ public final class EnvironmentVersionInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of EnvironmentVersionInner class. @@ -80,13 +80,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,13 +100,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** 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 1ddfcb011592a..92fff8292ab3d 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 @@ -9,7 +9,7 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpoints; +import com.azure.resourcemanager.machinelearning.models.FqdnEndpointsPropertyBag; import java.io.IOException; import java.util.List; @@ -21,7 +21,7 @@ public final class ExternalFqdnResponseInner implements JsonSerializable value; + private List value; /** * Creates an instance of ExternalFqdnResponseInner class. @@ -34,7 +34,7 @@ public ExternalFqdnResponseInner() { * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -44,7 +44,7 @@ public List value() { * @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; } @@ -86,7 +86,8 @@ public static ExternalFqdnResponseInner fromJson(JsonReader jsonReader) throws I reader.nextToken(); if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> FqdnEndpoints.fromJson(reader1)); + List value + = reader.readArray(reader1 -> FqdnEndpointsPropertyBag.fromJson(reader1)); deserializedExternalFqdnResponseInner.value = value; } else { reader.skipChildren(); 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 index 5fab82ad54b0b..98288041faf75 100644 --- 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 @@ -30,9 +30,9 @@ public final class FeatureInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +40,9 @@ public final class FeatureInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of FeatureInner class. @@ -80,13 +80,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,13 +100,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** 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 index 75e459199aecd..d14b4b449b493 100644 --- 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 @@ -30,9 +30,9 @@ public final class FeaturesetContainerInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +40,9 @@ public final class FeaturesetContainerInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of FeaturesetContainerInner class. @@ -80,13 +80,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,13 +100,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** 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 index 68b3d08df57cb..07c47ad78a96a 100644 --- 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 @@ -30,9 +30,9 @@ public final class FeaturesetVersionInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +40,9 @@ public final class FeaturesetVersionInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of FeaturesetVersionInner class. @@ -80,13 +80,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,13 +100,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** 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 index 3cff75870f94d..2d15f31c3ec08 100644 --- 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 @@ -30,9 +30,9 @@ public final class FeaturestoreEntityContainerInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +40,9 @@ public final class FeaturestoreEntityContainerInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of FeaturestoreEntityContainerInner class. @@ -80,13 +80,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,13 +100,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** 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 index 1c8eee3d76d3d..c379bbb304210 100644 --- 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 @@ -30,9 +30,9 @@ public final class FeaturestoreEntityVersionInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +40,9 @@ public final class FeaturestoreEntityVersionInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of FeaturestoreEntityVersionInner class. @@ -80,13 +80,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,13 +100,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** 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..13dd2b2e9e448 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/GroupStatusInner.java @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.models.ActualCapacityInfo; +import java.io.IOException; + +/** + * The GroupStatus model. + */ +@Fluent +public final class GroupStatusInner implements JsonSerializable { + /* + * Gets or sets the actual capacity info for the group. + */ + private ActualCapacityInfo actualCapacityInfo; + + /* + * Gets or sets the actual number of endpoints in the group. + */ + private Integer endpointCount; + + /* + * Gets or sets the request number of instances for the group. + */ + 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 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(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("actualCapacityInfo", this.actualCapacityInfo); + jsonWriter.writeNumberField("endpointCount", this.endpointCount); + jsonWriter.writeNumberField("requestedCapacity", this.requestedCapacity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GroupStatusInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GroupStatusInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the GroupStatusInner. + */ + public static GroupStatusInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GroupStatusInner deserializedGroupStatusInner = new GroupStatusInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("actualCapacityInfo".equals(fieldName)) { + deserializedGroupStatusInner.actualCapacityInfo = ActualCapacityInfo.fromJson(reader); + } else if ("endpointCount".equals(fieldName)) { + deserializedGroupStatusInner.endpointCount = reader.getNullable(JsonReader::getInt); + } else if ("requestedCapacity".equals(fieldName)) { + deserializedGroupStatusInner.requestedCapacity = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedGroupStatusInner; + }); + } +} 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..94fdd0870ee70 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/InferenceEndpointInner.java @@ -0,0 +1,293 @@ +// Copyright (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.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.models.InferenceEndpointProperties; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.Sku; +import java.io.IOException; +import java.util.Map; + +/** + * The InferenceEndpoint model. + */ +@Fluent +public final class InferenceEndpointInner extends Resource { + /* + * Managed service identity (system assigned and/or user assigned identities) + */ + private ManagedServiceIdentity identity; + + /* + * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + */ + private String kind; + + /* + * [Required] Additional attributes of the entity. + */ + private InferenceEndpointProperties properties; + + /* + * Sku details required for ARM contract for Autoscaling. + */ + private Sku sku; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of 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; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public 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.atError() + .log(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); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeStringField("kind", this.kind); + jsonWriter.writeJsonField("sku", this.sku); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InferenceEndpointInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InferenceEndpointInner if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the InferenceEndpointInner. + */ + public static InferenceEndpointInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InferenceEndpointInner deserializedInferenceEndpointInner = new InferenceEndpointInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedInferenceEndpointInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedInferenceEndpointInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedInferenceEndpointInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedInferenceEndpointInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedInferenceEndpointInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedInferenceEndpointInner.properties = InferenceEndpointProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedInferenceEndpointInner.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("kind".equals(fieldName)) { + deserializedInferenceEndpointInner.kind = reader.getString(); + } else if ("sku".equals(fieldName)) { + deserializedInferenceEndpointInner.sku = Sku.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedInferenceEndpointInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedInferenceEndpointInner; + }); + } +} 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..8b67fb17c876d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/InferenceGroupInner.java @@ -0,0 +1,292 @@ +// Copyright (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.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.models.InferenceGroupProperties; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.Sku; +import java.io.IOException; +import java.util.Map; + +/** + * The InferenceGroup model. + */ +@Fluent +public final class InferenceGroupInner extends Resource { + /* + * Managed service identity (system assigned and/or user assigned identities) + */ + private ManagedServiceIdentity identity; + + /* + * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + */ + private String kind; + + /* + * [Required] Additional attributes of the entity. + */ + private InferenceGroupProperties properties; + + /* + * Sku details required for ARM contract for Autoscaling. + */ + private Sku sku; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of 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; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public 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.atError() + .log(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); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeStringField("kind", this.kind); + jsonWriter.writeJsonField("sku", this.sku); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InferenceGroupInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InferenceGroupInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the InferenceGroupInner. + */ + public static InferenceGroupInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InferenceGroupInner deserializedInferenceGroupInner = new InferenceGroupInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedInferenceGroupInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedInferenceGroupInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedInferenceGroupInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedInferenceGroupInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedInferenceGroupInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedInferenceGroupInner.properties = InferenceGroupProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedInferenceGroupInner.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("kind".equals(fieldName)) { + deserializedInferenceGroupInner.kind = reader.getString(); + } else if ("sku".equals(fieldName)) { + deserializedInferenceGroupInner.sku = Sku.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedInferenceGroupInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedInferenceGroupInner; + }); + } +} 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..f26fc58dd65b7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/InferencePoolInner.java @@ -0,0 +1,292 @@ +// Copyright (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.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.models.InferencePoolProperties; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.Sku; +import java.io.IOException; +import java.util.Map; + +/** + * The InferencePool model. + */ +@Fluent +public final class InferencePoolInner extends Resource { + /* + * Managed service identity (system assigned and/or user assigned identities) + */ + private ManagedServiceIdentity identity; + + /* + * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + */ + private String kind; + + /* + * [Required] Additional attributes of the entity. + */ + private InferencePoolProperties properties; + + /* + * Sku details required for ARM contract for Autoscaling. + */ + private Sku sku; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of 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; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public 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.atError() + .log(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); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeStringField("kind", this.kind); + jsonWriter.writeJsonField("sku", this.sku); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InferencePoolInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InferencePoolInner if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the InferencePoolInner. + */ + public static InferencePoolInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InferencePoolInner deserializedInferencePoolInner = new InferencePoolInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedInferencePoolInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedInferencePoolInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedInferencePoolInner.type = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedInferencePoolInner.withLocation(reader.getString()); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedInferencePoolInner.withTags(tags); + } else if ("properties".equals(fieldName)) { + deserializedInferencePoolInner.properties = InferencePoolProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedInferencePoolInner.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("kind".equals(fieldName)) { + deserializedInferencePoolInner.kind = reader.getString(); + } else if ("sku".equals(fieldName)) { + deserializedInferencePoolInner.sku = Sku.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedInferencePoolInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedInferencePoolInner; + }); + } +} 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 f9f23857c3dcf..485d192d54baf 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 @@ -30,9 +30,9 @@ public final class JobBaseInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +40,9 @@ public final class JobBaseInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of JobBaseInner class. @@ -80,13 +80,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,13 +100,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** 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 e6f115efc86ae..3201eaf7c5ca1 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 @@ -17,12 +17,12 @@ @Immutable public final class ListNotebookKeysResultInner implements JsonSerializable { /* - * The primaryAccessKey property. + * The primary access key of the Notebook */ private String primaryAccessKey; /* - * The secondaryAccessKey property. + * The secondary access key of the Notebook */ private String secondaryAccessKey; @@ -33,7 +33,7 @@ public ListNotebookKeysResultInner() { } /** - * Get the primaryAccessKey property: The primaryAccessKey property. + * Get the primaryAccessKey property: The primary access key of the Notebook. * * @return the primaryAccessKey value. */ @@ -42,7 +42,7 @@ 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. */ 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 6a4fbb94a968e..449ae182b9b22 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 @@ -17,7 +17,7 @@ @Immutable public final class ListStorageAccountKeysResultInner implements JsonSerializable { /* - * The userStorageKey property. + * The access key of the storage */ private String userStorageKey; @@ -28,7 +28,7 @@ public ListStorageAccountKeysResultInner() { } /** - * Get the userStorageKey property: The userStorageKey property. + * Get the userStorageKey property: The access key of the storage. * * @return the userStorageKey value. */ 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 ce6ca9d857d11..70176670ad4dd 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,7 +4,7 @@ package com.azure.resourcemanager.machinelearning.fluent.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,20 +15,10 @@ /** * The ListWorkspaceKeysResult model. */ -@Immutable +@Fluent public final class ListWorkspaceKeysResultInner implements JsonSerializable { /* - * The userStorageKey property. - */ - private String userStorageKey; - - /* - * The userStorageResourceId property. - */ - private String userStorageResourceId; - - /* - * The appInsightsInstrumentationKey property. + * The access key of the workspace app insights */ private String appInsightsInstrumentationKey; @@ -42,32 +32,24 @@ public final class ListWorkspaceKeysResultInner implements JsonSerializable { + /* + * Firewall Sku used for FQDN Rules + */ + private FirewallSku firewallSku; + /* * Isolation mode for the managed network of a machine learning workspace. */ @@ -39,12 +46,37 @@ public final class ManagedNetworkSettingsInner implements JsonSerializable changeableIsolationModes; + /** * Creates an instance of ManagedNetworkSettingsInner class. */ public ManagedNetworkSettingsInner() { } + /** + * Get the firewallSku property: Firewall Sku used for FQDN Rules. + * + * @return the firewallSku value. + */ + public FirewallSku firewallSku() { + return this.firewallSku; + } + + /** + * Set the firewallSku property: Firewall Sku used for FQDN Rules. + * + * @param firewallSku the firewallSku value to set. + * @return the ManagedNetworkSettingsInner object itself. + */ + public ManagedNetworkSettingsInner withFirewallSku(FirewallSku firewallSku) { + this.firewallSku = firewallSku; + return this; + } + /** * Get the isolationMode property: Isolation mode for the managed network of a machine learning workspace. * @@ -114,6 +146,15 @@ public ManagedNetworkSettingsInner withStatus(ManagedNetworkProvisionStatusInner return this; } + /** + * Get the changeableIsolationModes property: The changeableIsolationModes property. + * + * @return the changeableIsolationModes value. + */ + public List changeableIsolationModes() { + return this.changeableIsolationModes; + } + /** * Validates the instance. * @@ -138,6 +179,7 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("firewallSku", this.firewallSku == null ? null : this.firewallSku.toString()); jsonWriter.writeStringField("isolationMode", this.isolationMode == null ? null : this.isolationMode.toString()); jsonWriter.writeMapField("outboundRules", this.outboundRules, (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("status", this.status); @@ -159,7 +201,9 @@ public static ManagedNetworkSettingsInner fromJson(JsonReader jsonReader) throws String fieldName = reader.getFieldName(); reader.nextToken(); - if ("isolationMode".equals(fieldName)) { + if ("firewallSku".equals(fieldName)) { + deserializedManagedNetworkSettingsInner.firewallSku = FirewallSku.fromString(reader.getString()); + } else if ("isolationMode".equals(fieldName)) { deserializedManagedNetworkSettingsInner.isolationMode = IsolationMode.fromString(reader.getString()); } else if ("networkId".equals(fieldName)) { @@ -170,6 +214,10 @@ public static ManagedNetworkSettingsInner fromJson(JsonReader jsonReader) throws } else if ("status".equals(fieldName)) { deserializedManagedNetworkSettingsInner.status = ManagedNetworkProvisionStatusInner.fromJson(reader); + } else if ("changeableIsolationModes".equals(fieldName)) { + List changeableIsolationModes + = reader.readArray(reader1 -> IsolationMode.fromString(reader1.getString())); + deserializedManagedNetworkSettingsInner.changeableIsolationModes = changeableIsolationModes; } else { reader.skipChildren(); } 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 index 600c30acbe368..937bb9c430917 100644 --- 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 @@ -30,9 +30,9 @@ public final class MarketplaceSubscriptionInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +40,9 @@ public final class MarketplaceSubscriptionInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of MarketplaceSubscriptionInner class. @@ -80,13 +80,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,13 +100,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** 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 1bd535de9b535..640375582d7a4 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 @@ -30,9 +30,9 @@ public final class ModelContainerInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +40,9 @@ public final class ModelContainerInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of ModelContainerInner class. @@ -80,13 +80,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,13 +100,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** 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 7f2f08e98758b..9c354de263cc7 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 @@ -30,9 +30,9 @@ public final class ModelVersionInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +40,9 @@ public final class ModelVersionInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of ModelVersionInner class. @@ -80,13 +80,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,13 +100,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** 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 92e2d3d03636c..28c35e68b8af6 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 @@ -17,34 +17,29 @@ @Immutable public final class NotebookAccessTokenResultInner implements JsonSerializable { /* - * The notebookResourceId property. - */ - private String notebookResourceId; - - /* - * The hostName property. + * The accessToken property. */ - private String hostname; + private String accessToken; /* - * The publicDns property. + * The expiresIn property. */ - private String publicDns; + private Integer expiresIn; /* - * The accessToken property. + * The hostName property. */ - private String accessToken; + private String hostname; /* - * The tokenType property. + * The notebookResourceId property. */ - private String tokenType; + private String notebookResourceId; /* - * The expiresIn property. + * The publicDns property. */ - private Integer expiresIn; + private String publicDns; /* * The refreshToken property. @@ -56,64 +51,60 @@ public final class NotebookAccessTokenResultInner implements JsonSerializable tags) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (identity() != null) { + identity().validate(); + } if (properties() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -220,9 +223,6 @@ public void validate() { } else { properties().validate(); } - if (identity() != null) { - identity().validate(); - } if (sku() != null) { sku().validate(); } @@ -239,8 +239,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("kind", this.kind); jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeStringField("kind", this.kind); jsonWriter.writeJsonField("sku", this.sku); return jsonWriter.writeEndObject(); } @@ -274,10 +274,10 @@ public static OnlineDeploymentInner fromJson(JsonReader jsonReader) throws IOExc deserializedOnlineDeploymentInner.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedOnlineDeploymentInner.properties = OnlineDeploymentProperties.fromJson(reader); - } else if ("kind".equals(fieldName)) { - deserializedOnlineDeploymentInner.kind = reader.getString(); } else if ("identity".equals(fieldName)) { deserializedOnlineDeploymentInner.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("kind".equals(fieldName)) { + deserializedOnlineDeploymentInner.kind = reader.getString(); } else if ("sku".equals(fieldName)) { deserializedOnlineDeploymentInner.sku = Sku.fromJson(reader); } else if ("systemData".equals(fieldName)) { 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 7170897d22354..99fcf54205e21 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 @@ -23,9 +23,9 @@ @Fluent public final class OnlineEndpointInner extends Resource { /* - * [Required] Additional attributes of the entity. + * Managed service identity (system assigned and/or user assigned identities) */ - private OnlineEndpointProperties properties; + private ManagedServiceIdentity identity; /* * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. @@ -33,9 +33,9 @@ public final class OnlineEndpointInner extends Resource { private String kind; /* - * Managed service identity (system assigned and/or user assigned identities) + * [Required] Additional attributes of the entity. */ - private ManagedServiceIdentity identity; + private OnlineEndpointProperties properties; /* * Sku details required for ARM contract for Autoscaling. @@ -48,9 +48,9 @@ public final class OnlineEndpointInner extends Resource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -58,9 +58,9 @@ public final class OnlineEndpointInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of OnlineEndpointInner class. @@ -69,22 +69,22 @@ public OnlineEndpointInner() { } /** - * Get the properties property: [Required] Additional attributes of the entity. + * Get the identity property: Managed service identity (system assigned and/or user assigned identities). * - * @return the properties value. + * @return the identity value. */ - public OnlineEndpointProperties properties() { - return this.properties; + public ManagedServiceIdentity identity() { + return this.identity; } /** - * Set the properties property: [Required] Additional attributes of the entity. + * Set the identity property: Managed service identity (system assigned and/or user assigned identities). * - * @param properties the properties value to set. + * @param identity the identity value to set. * @return the OnlineEndpointInner object itself. */ - public OnlineEndpointInner withProperties(OnlineEndpointProperties properties) { - this.properties = properties; + public OnlineEndpointInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; return this; } @@ -111,22 +111,22 @@ public OnlineEndpointInner withKind(String kind) { } /** - * Get the identity property: Managed service identity (system assigned and/or user assigned identities). + * Get the properties property: [Required] Additional attributes of the entity. * - * @return the identity value. + * @return the properties value. */ - public ManagedServiceIdentity identity() { - return this.identity; + public OnlineEndpointProperties properties() { + return this.properties; } /** - * Set the identity property: Managed service identity (system assigned and/or user assigned identities). + * Set the properties property: [Required] Additional attributes of the entity. * - * @param identity the identity value to set. + * @param properties the properties value to set. * @return the OnlineEndpointInner object itself. */ - public OnlineEndpointInner withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; + public OnlineEndpointInner withProperties(OnlineEndpointProperties properties) { + this.properties = properties; return this; } @@ -160,13 +160,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -180,13 +180,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** @@ -213,15 +213,15 @@ public OnlineEndpointInner withTags(Map tags) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (identity() != null) { + identity().validate(); + } if (properties() == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property properties in model OnlineEndpointInner")); } else { properties().validate(); } - if (identity() != null) { - identity().validate(); - } if (sku() != null) { sku().validate(); } @@ -238,8 +238,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("kind", this.kind); jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeStringField("kind", this.kind); jsonWriter.writeJsonField("sku", this.sku); return jsonWriter.writeEndObject(); } @@ -273,10 +273,10 @@ public static OnlineEndpointInner fromJson(JsonReader jsonReader) throws IOExcep deserializedOnlineEndpointInner.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedOnlineEndpointInner.properties = OnlineEndpointProperties.fromJson(reader); - } else if ("kind".equals(fieldName)) { - deserializedOnlineEndpointInner.kind = reader.getString(); } else if ("identity".equals(fieldName)) { deserializedOnlineEndpointInner.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("kind".equals(fieldName)) { + deserializedOnlineEndpointInner.kind = reader.getString(); } else if ("sku".equals(fieldName)) { deserializedOnlineEndpointInner.sku = Sku.fromJson(reader); } else if ("systemData".equals(fieldName)) { 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 index 6795602d33bbd..86ff740cdb8c8 100644 --- 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 @@ -15,7 +15,7 @@ import java.io.IOException; /** - * Outbound Rule Basic Resource for the managed network of a machine learning workspace. + * The OutboundRuleBasicResource model. */ @Fluent public final class OutboundRuleBasicResourceInner extends ProxyResource { @@ -30,9 +30,9 @@ public final class OutboundRuleBasicResourceInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +40,9 @@ public final class OutboundRuleBasicResourceInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of OutboundRuleBasicResourceInner class. @@ -80,13 +80,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,13 +100,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** 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 a18d97bb627af..ad1537e17916e 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 @@ -11,10 +11,10 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; 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 java.io.IOException; import java.util.Map; @@ -24,39 +24,39 @@ @Fluent public final class PrivateEndpointConnectionInner extends ProxyResource { /* - * Resource properties. - */ - private PrivateEndpointConnectionProperties innerProperties; - - /* - * The identity of the resource. + * Managed service identity (system assigned and/or user assigned identities) */ private ManagedServiceIdentity identity; /* - * Specifies the location of the resource. + * Same as workspace location. */ private String location; /* - * Contains resource tags defined as key/value pairs. + * Private endpoint connection properties. */ - private Map tags; + 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 */ private Sku sku; + /* + * Dictionary of + */ + private Map tags; + /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -64,9 +64,9 @@ public final class PrivateEndpointConnectionInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of PrivateEndpointConnectionInner class. @@ -75,16 +75,7 @@ public PrivateEndpointConnectionInner() { } /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private PrivateEndpointConnectionProperties innerProperties() { - return this.innerProperties; - } - - /** - * 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. */ @@ -93,7 +84,7 @@ 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. @@ -104,7 +95,7 @@ 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. */ @@ -113,7 +104,7 @@ 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. @@ -124,42 +115,53 @@ public PrivateEndpointConnectionInner withLocation(String location) { } /** - * Get the tags property: Contains resource tags defined as key/value pairs. + * Get the innerProperties property: Private endpoint connection properties. * - * @return the tags value. + * @return the innerProperties value. */ - public Map tags() { - return this.tags; + private PrivateEndpointConnectionProperties innerProperties() { + return this.innerProperties; } /** - * Set the tags property: Contains resource tags defined as key/value pairs. + * Get the sku property: Optional. This field is required to be implemented by the RP because AML is supporting more + * than one tier. * - * @param tags the tags value to set. + * @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 PrivateEndpointConnectionInner object itself. */ - public PrivateEndpointConnectionInner withTags(Map tags) { - this.tags = tags; + public PrivateEndpointConnectionInner withSku(Sku sku) { + this.sku = sku; return this; } /** - * Get the sku property: The sku of the workspace. + * Get the tags property: Dictionary of <string>. * - * @return the sku value. + * @return the tags value. */ - public Sku sku() { - return this.sku; + public Map tags() { + return this.tags; } /** - * Set the sku property: The sku of the workspace. + * Set the tags property: Dictionary of <string>. * - * @param sku the sku value to set. + * @param tags the tags value to set. * @return the PrivateEndpointConnectionInner object itself. */ - public PrivateEndpointConnectionInner withSku(Sku sku) { - this.sku = sku; + public PrivateEndpointConnectionInner withTags(Map tags) { + this.tags = tags; return this; } @@ -173,13 +175,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -193,31 +195,31 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** - * 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(); } @@ -226,8 +228,7 @@ 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. */ @@ -236,8 +237,7 @@ 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. @@ -252,7 +252,7 @@ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { } /** - * 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. */ @@ -260,18 +260,33 @@ 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(); } @@ -283,11 +298,11 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); jsonWriter.writeJsonField("identity", this.identity); jsonWriter.writeStringField("location", this.location); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.innerProperties); jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -314,18 +329,18 @@ public static PrivateEndpointConnectionInner fromJson(JsonReader jsonReader) thr deserializedPrivateEndpointConnectionInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedPrivateEndpointConnectionInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedPrivateEndpointConnectionInner.innerProperties - = PrivateEndpointConnectionProperties.fromJson(reader); } else if ("identity".equals(fieldName)) { deserializedPrivateEndpointConnectionInner.identity = ManagedServiceIdentity.fromJson(reader); } else if ("location".equals(fieldName)) { deserializedPrivateEndpointConnectionInner.location = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedPrivateEndpointConnectionInner.innerProperties + = PrivateEndpointConnectionProperties.fromJson(reader); + } else if ("sku".equals(fieldName)) { + deserializedPrivateEndpointConnectionInner.sku = Sku.fromJson(reader); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedPrivateEndpointConnectionInner.tags = tags; - } else if ("sku".equals(fieldName)) { - deserializedPrivateEndpointConnectionInner.sku = Sku.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedPrivateEndpointConnectionInner.systemData = SystemData.fromJson(reader); } else { 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 73c00d781c1ce..c35f5b4e2c90a 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,34 +5,33 @@ package com.azure.resourcemanager.machinelearning.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.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 java.io.IOException; /** - * Properties of the PrivateEndpointConnectProperties. + * Private endpoint connection properties. */ @Fluent public final class PrivateEndpointConnectionProperties implements JsonSerializable { /* - * The resource of private end point. + * The Private Endpoint resource. */ - private PrivateEndpoint privateEndpoint; + private WorkspacePrivateEndpointResource privateEndpoint; /* - * A collection of information about the state of the connection between service consumer and provider. + * The connection state. */ private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; /* - * The provisioning state of the private endpoint connection resource. + * The current provisioning state. */ private PrivateEndpointConnectionProvisioningState provisioningState; @@ -43,28 +42,27 @@ 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. */ @@ -73,8 +71,7 @@ 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. @@ -86,7 +83,7 @@ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { } /** - * 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. */ @@ -94,6 +91,18 @@ 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. * @@ -103,25 +112,21 @@ public void validate() { if (privateEndpoint() != null) { privateEndpoint().validate(); } - if (privateLinkServiceConnectionState() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property privateLinkServiceConnectionState in model PrivateEndpointConnectionProperties")); - } else { + if (privateLinkServiceConnectionState() != null) { privateLinkServiceConnectionState().validate(); } } - private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionProperties.class); - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("privateLinkServiceConnectionState", this.privateLinkServiceConnectionState); jsonWriter.writeJsonField("privateEndpoint", this.privateEndpoint); + jsonWriter.writeJsonField("privateLinkServiceConnectionState", this.privateLinkServiceConnectionState); + jsonWriter.writeStringField("provisioningState", + this.provisioningState == null ? null : this.provisioningState.toString()); return jsonWriter.writeEndObject(); } @@ -131,7 +136,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of PrivateEndpointConnectionProperties if the JsonReader was pointing to an instance of it, * or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the PrivateEndpointConnectionProperties. */ public static PrivateEndpointConnectionProperties fromJson(JsonReader jsonReader) throws IOException { @@ -142,11 +146,12 @@ public static PrivateEndpointConnectionProperties fromJson(JsonReader jsonReader String fieldName = reader.getFieldName(); reader.nextToken(); - if ("privateLinkServiceConnectionState".equals(fieldName)) { + if ("privateEndpoint".equals(fieldName)) { + deserializedPrivateEndpointConnectionProperties.privateEndpoint + = WorkspacePrivateEndpointResource.fromJson(reader); + } else if ("privateLinkServiceConnectionState".equals(fieldName)) { deserializedPrivateEndpointConnectionProperties.privateLinkServiceConnectionState = PrivateLinkServiceConnectionState.fromJson(reader); - } else if ("privateEndpoint".equals(fieldName)) { - deserializedPrivateEndpointConnectionProperties.privateEndpoint = PrivateEndpoint.fromJson(reader); } else if ("provisioningState".equals(fieldName)) { deserializedPrivateEndpointConnectionProperties.provisioningState = PrivateEndpointConnectionProvisioningState.fromString(reader.getString()); 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..bf37fcde771d9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceInner.java @@ -0,0 +1,349 @@ +// Copyright (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.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; +import com.azure.resourcemanager.machinelearning.models.Sku; +import java.io.IOException; +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) + */ + private ManagedServiceIdentity identity; + + /* + * Same as workspace location. + */ + private String location; + + /* + * Properties of a private link resource. + */ + private PrivateLinkResourceProperties innerProperties; + + /* + * Optional. This field is required to be implemented by the RP because AML is supporting more than one tier + */ + private Sku sku; + + /* + * Dictionary of + */ + private Map tags; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of 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 type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the 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(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateLinkResourceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateLinkResourceInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PrivateLinkResourceInner. + */ + public static PrivateLinkResourceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateLinkResourceInner deserializedPrivateLinkResourceInner = new PrivateLinkResourceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPrivateLinkResourceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPrivateLinkResourceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPrivateLinkResourceInner.type = reader.getString(); + } else if ("identity".equals(fieldName)) { + deserializedPrivateLinkResourceInner.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("location".equals(fieldName)) { + deserializedPrivateLinkResourceInner.location = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedPrivateLinkResourceInner.innerProperties + = PrivateLinkResourceProperties.fromJson(reader); + } else if ("sku".equals(fieldName)) { + deserializedPrivateLinkResourceInner.sku = Sku.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedPrivateLinkResourceInner.tags = tags; + } else if ("systemData".equals(fieldName)) { + deserializedPrivateLinkResourceInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateLinkResourceInner; + }); + } +} 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 7c0b27237e550..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceListResultInner.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkResource; -import java.io.IOException; -import java.util.List; - -/** - * A list of private link resources. - */ -@Fluent -public final class PrivateLinkResourceListResultInner implements JsonSerializable { - /* - * Array of private link resources - */ - 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateLinkResourceListResultInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateLinkResourceListResultInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PrivateLinkResourceListResultInner. - */ - public static PrivateLinkResourceListResultInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateLinkResourceListResultInner deserializedPrivateLinkResourceListResultInner - = new PrivateLinkResourceListResultInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> PrivateLinkResource.fromJson(reader1)); - deserializedPrivateLinkResourceListResultInner.value = value; - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateLinkResourceListResultInner; - }); - } -} 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 856715b8d7665..b5f629de578a6 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 @@ -47,6 +47,17 @@ 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. * @@ -56,6 +67,17 @@ 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. * @@ -90,6 +112,9 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("groupId", this.groupId); + jsonWriter.writeArrayField("requiredMembers", this.requiredMembers, + (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("requiredZoneNames", this.requiredZoneNames, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RaiBlocklistItemPropertiesBasicResourceInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RaiBlocklistItemPropertiesBasicResourceInner.java new file mode 100644 index 0000000000000..e9814a47ffe4a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RaiBlocklistItemPropertiesBasicResourceInner.java @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemProperties; +import java.io.IOException; + +/** + * The RaiBlocklistItemPropertiesBasicResource model. + */ +@Fluent +public final class RaiBlocklistItemPropertiesBasicResourceInner extends ProxyResource { + /* + * RAI Custom Blocklist Item properties. + */ + private RaiBlocklistItemProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of RaiBlocklistItemPropertiesBasicResourceInner class. + */ + public RaiBlocklistItemPropertiesBasicResourceInner() { + } + + /** + * Get the properties property: RAI Custom Blocklist Item properties. + * + * @return the properties value. + */ + public RaiBlocklistItemProperties properties() { + return this.properties; + } + + /** + * Set the properties property: RAI Custom Blocklist Item properties. + * + * @param properties the properties value to set. + * @return the RaiBlocklistItemPropertiesBasicResourceInner object itself. + */ + public RaiBlocklistItemPropertiesBasicResourceInner withProperties(RaiBlocklistItemProperties 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; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property properties in model RaiBlocklistItemPropertiesBasicResourceInner")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(RaiBlocklistItemPropertiesBasicResourceInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RaiBlocklistItemPropertiesBasicResourceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RaiBlocklistItemPropertiesBasicResourceInner if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RaiBlocklistItemPropertiesBasicResourceInner. + */ + public static RaiBlocklistItemPropertiesBasicResourceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RaiBlocklistItemPropertiesBasicResourceInner deserializedRaiBlocklistItemPropertiesBasicResourceInner + = new RaiBlocklistItemPropertiesBasicResourceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedRaiBlocklistItemPropertiesBasicResourceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedRaiBlocklistItemPropertiesBasicResourceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedRaiBlocklistItemPropertiesBasicResourceInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedRaiBlocklistItemPropertiesBasicResourceInner.properties + = RaiBlocklistItemProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedRaiBlocklistItemPropertiesBasicResourceInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedRaiBlocklistItemPropertiesBasicResourceInner; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RaiBlocklistPropertiesBasicResourceInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RaiBlocklistPropertiesBasicResourceInner.java new file mode 100644 index 0000000000000..b3014a222c144 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RaiBlocklistPropertiesBasicResourceInner.java @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistProperties; +import java.io.IOException; + +/** + * The RaiBlocklistPropertiesBasicResource model. + */ +@Fluent +public final class RaiBlocklistPropertiesBasicResourceInner extends ProxyResource { + /* + * RAI Custom Blocklist properties. + */ + private RaiBlocklistProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of RaiBlocklistPropertiesBasicResourceInner class. + */ + public RaiBlocklistPropertiesBasicResourceInner() { + } + + /** + * Get the properties property: RAI Custom Blocklist properties. + * + * @return the properties value. + */ + public RaiBlocklistProperties properties() { + return this.properties; + } + + /** + * Set the properties property: RAI Custom Blocklist properties. + * + * @param properties the properties value to set. + * @return the RaiBlocklistPropertiesBasicResourceInner object itself. + */ + public RaiBlocklistPropertiesBasicResourceInner withProperties(RaiBlocklistProperties 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; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property properties in model RaiBlocklistPropertiesBasicResourceInner")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(RaiBlocklistPropertiesBasicResourceInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RaiBlocklistPropertiesBasicResourceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RaiBlocklistPropertiesBasicResourceInner if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RaiBlocklistPropertiesBasicResourceInner. + */ + public static RaiBlocklistPropertiesBasicResourceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RaiBlocklistPropertiesBasicResourceInner deserializedRaiBlocklistPropertiesBasicResourceInner + = new RaiBlocklistPropertiesBasicResourceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedRaiBlocklistPropertiesBasicResourceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedRaiBlocklistPropertiesBasicResourceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedRaiBlocklistPropertiesBasicResourceInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedRaiBlocklistPropertiesBasicResourceInner.properties + = RaiBlocklistProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedRaiBlocklistPropertiesBasicResourceInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedRaiBlocklistPropertiesBasicResourceInner; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RaiPolicyPropertiesBasicResourceInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RaiPolicyPropertiesBasicResourceInner.java new file mode 100644 index 0000000000000..2847107562e0a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/RaiPolicyPropertiesBasicResourceInner.java @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyProperties; +import java.io.IOException; + +/** + * Azure OpenAI Content Filters resource. + */ +@Fluent +public final class RaiPolicyPropertiesBasicResourceInner extends ProxyResource { + /* + * Azure OpenAI Content Filters properties. + */ + private RaiPolicyProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of RaiPolicyPropertiesBasicResourceInner class. + */ + public RaiPolicyPropertiesBasicResourceInner() { + } + + /** + * Get the properties property: Azure OpenAI Content Filters properties. + * + * @return the properties value. + */ + public RaiPolicyProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Azure OpenAI Content Filters properties. + * + * @param properties the properties value to set. + * @return the RaiPolicyPropertiesBasicResourceInner object itself. + */ + public RaiPolicyPropertiesBasicResourceInner withProperties(RaiPolicyProperties 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; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property properties in model RaiPolicyPropertiesBasicResourceInner")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(RaiPolicyPropertiesBasicResourceInner.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RaiPolicyPropertiesBasicResourceInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RaiPolicyPropertiesBasicResourceInner if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the RaiPolicyPropertiesBasicResourceInner. + */ + public static RaiPolicyPropertiesBasicResourceInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RaiPolicyPropertiesBasicResourceInner deserializedRaiPolicyPropertiesBasicResourceInner + = new RaiPolicyPropertiesBasicResourceInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedRaiPolicyPropertiesBasicResourceInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedRaiPolicyPropertiesBasicResourceInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedRaiPolicyPropertiesBasicResourceInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedRaiPolicyPropertiesBasicResourceInner.properties = RaiPolicyProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedRaiPolicyPropertiesBasicResourceInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedRaiPolicyPropertiesBasicResourceInner; + }); + } +} 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 index 446a0a7f6dcfa..aff5f35cf08cf 100644 --- 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 @@ -12,6 +12,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; 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; @@ -51,9 +52,9 @@ public final class RegistryInner extends Resource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -61,9 +62,9 @@ public final class RegistryInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of RegistryInner class. @@ -152,13 +153,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -172,13 +173,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** @@ -268,6 +269,29 @@ public RegistryInner withManagedResourceGroup(ArmResourceId 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. * 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 index 6ddc52a4f0521..715894b989fed 100644 --- 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 @@ -10,6 +10,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; 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 java.io.IOException; @@ -35,6 +36,11 @@ public final class RegistryProperties implements JsonSerializable e.validate()); } @@ -233,6 +263,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("discoveryUrl", this.discoveryUrl); jsonWriter.writeStringField("intellectualPropertyPublisher", this.intellectualPropertyPublisher); jsonWriter.writeJsonField("managedResourceGroup", this.managedResourceGroup); + jsonWriter.writeJsonField("managedResourceGroupSettings", this.managedResourceGroupSettings); jsonWriter.writeStringField("mlFlowRegistryUri", this.mlFlowRegistryUri); jsonWriter.writeArrayField("registryPrivateEndpointConnections", this.registryPrivateEndpointConnections, (writer, element) -> writer.writeJson(element)); @@ -262,6 +293,9 @@ public static RegistryProperties fromJson(JsonReader jsonReader) throws IOExcept deserializedRegistryProperties.intellectualPropertyPublisher = reader.getString(); } else if ("managedResourceGroup".equals(fieldName)) { deserializedRegistryProperties.managedResourceGroup = ArmResourceId.fromJson(reader); + } else if ("managedResourceGroupSettings".equals(fieldName)) { + deserializedRegistryProperties.managedResourceGroupSettings + = ManagedResourceGroupSettings.fromJson(reader); } else if ("mlFlowRegistryUri".equals(fieldName)) { deserializedRegistryProperties.mlFlowRegistryUri = reader.getString(); } else if ("registryPrivateEndpointConnections".equals(fieldName)) { 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 0073aa67f7108..dc7fc065a559a 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 @@ -30,9 +30,9 @@ public final class ScheduleInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +40,9 @@ public final class ScheduleInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of ScheduleInner class. @@ -80,13 +80,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,13 +100,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** 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 index 9c5eba6320854..f3e6844c059c1 100644 --- 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 @@ -23,9 +23,9 @@ @Fluent public final class ServerlessEndpointInner extends Resource { /* - * [Required] Additional attributes of the entity. + * Managed service identity (system assigned and/or user assigned identities) */ - private ServerlessEndpointProperties properties; + private ManagedServiceIdentity identity; /* * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. @@ -33,9 +33,9 @@ public final class ServerlessEndpointInner extends Resource { private String kind; /* - * Managed service identity (system assigned and/or user assigned identities) + * [Required] Additional attributes of the entity. */ - private ManagedServiceIdentity identity; + private ServerlessEndpointProperties properties; /* * Sku details required for ARM contract for Autoscaling. @@ -48,9 +48,9 @@ public final class ServerlessEndpointInner extends Resource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -58,9 +58,9 @@ public final class ServerlessEndpointInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of ServerlessEndpointInner class. @@ -69,22 +69,22 @@ public ServerlessEndpointInner() { } /** - * Get the properties property: [Required] Additional attributes of the entity. + * Get the identity property: Managed service identity (system assigned and/or user assigned identities). * - * @return the properties value. + * @return the identity value. */ - public ServerlessEndpointProperties properties() { - return this.properties; + public ManagedServiceIdentity identity() { + return this.identity; } /** - * Set the properties property: [Required] Additional attributes of the entity. + * Set the identity property: Managed service identity (system assigned and/or user assigned identities). * - * @param properties the properties value to set. + * @param identity the identity value to set. * @return the ServerlessEndpointInner object itself. */ - public ServerlessEndpointInner withProperties(ServerlessEndpointProperties properties) { - this.properties = properties; + public ServerlessEndpointInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; return this; } @@ -111,22 +111,22 @@ public ServerlessEndpointInner withKind(String kind) { } /** - * Get the identity property: Managed service identity (system assigned and/or user assigned identities). + * Get the properties property: [Required] Additional attributes of the entity. * - * @return the identity value. + * @return the properties value. */ - public ManagedServiceIdentity identity() { - return this.identity; + public ServerlessEndpointProperties properties() { + return this.properties; } /** - * Set the identity property: Managed service identity (system assigned and/or user assigned identities). + * Set the properties property: [Required] Additional attributes of the entity. * - * @param identity the identity value to set. + * @param properties the properties value to set. * @return the ServerlessEndpointInner object itself. */ - public ServerlessEndpointInner withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; + public ServerlessEndpointInner withProperties(ServerlessEndpointProperties properties) { + this.properties = properties; return this; } @@ -160,13 +160,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -180,13 +180,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** @@ -213,6 +213,9 @@ public ServerlessEndpointInner withTags(Map tags) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (identity() != null) { + identity().validate(); + } if (properties() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -220,9 +223,6 @@ public void validate() { } else { properties().validate(); } - if (identity() != null) { - identity().validate(); - } if (sku() != null) { sku().validate(); } @@ -239,8 +239,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.properties); - jsonWriter.writeStringField("kind", this.kind); jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeStringField("kind", this.kind); jsonWriter.writeJsonField("sku", this.sku); return jsonWriter.writeEndObject(); } @@ -274,10 +274,10 @@ public static ServerlessEndpointInner fromJson(JsonReader jsonReader) throws IOE deserializedServerlessEndpointInner.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedServerlessEndpointInner.properties = ServerlessEndpointProperties.fromJson(reader); - } else if ("kind".equals(fieldName)) { - deserializedServerlessEndpointInner.kind = reader.getString(); } else if ("identity".equals(fieldName)) { deserializedServerlessEndpointInner.identity = ManagedServiceIdentity.fromJson(reader); + } else if ("kind".equals(fieldName)) { + deserializedServerlessEndpointInner.kind = reader.getString(); } else if ("sku".equals(fieldName)) { deserializedServerlessEndpointInner.sku = Sku.fromJson(reader); } else if ("systemData".equals(fieldName)) { 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 cb38303f4796b..afaa4910510f8 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 @@ -9,7 +9,7 @@ import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; +import com.azure.resourcemanager.machinelearning.models.EndpointServiceConnectionStatus; import java.io.IOException; /** @@ -18,24 +18,24 @@ @Fluent public final class SharedPrivateLinkResourceProperty implements JsonSerializable { /* - * The resource id that private link links to. + * group id of the private link */ - private String privateLinkResourceId; + private String groupId; /* - * The private link resource group id. + * the resource id that private link links to */ - private String groupId; + private String privateLinkResourceId; /* - * Request message. + * Request message */ 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 */ - private PrivateEndpointServiceConnectionStatus status; + private EndpointServiceConnectionStatus status; /** * Creates an instance of SharedPrivateLinkResourceProperty class. @@ -44,42 +44,42 @@ public SharedPrivateLinkResourceProperty() { } /** - * Get the privateLinkResourceId property: The resource id that private link links to. + * Get the groupId property: group id of the private link. * - * @return the privateLinkResourceId value. + * @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. + * Set the groupId property: group id of the private link. * - * @param privateLinkResourceId the privateLinkResourceId value to set. + * @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. + * Get the privateLinkResourceId property: the resource id that private link links to. * - * @return the groupId value. + * @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. + * Set the privateLinkResourceId property: the resource id that private link links to. * - * @param groupId the groupId value to set. + * @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; } @@ -104,23 +104,21 @@ 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; } @@ -139,8 +137,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("privateLinkResourceId", this.privateLinkResourceId); jsonWriter.writeStringField("groupId", this.groupId); + jsonWriter.writeStringField("privateLinkResourceId", this.privateLinkResourceId); jsonWriter.writeStringField("requestMessage", this.requestMessage); jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); return jsonWriter.writeEndObject(); @@ -162,15 +160,15 @@ public static SharedPrivateLinkResourceProperty fromJson(JsonReader jsonReader) String fieldName = reader.getFieldName(); reader.nextToken(); - if ("privateLinkResourceId".equals(fieldName)) { - deserializedSharedPrivateLinkResourceProperty.privateLinkResourceId = reader.getString(); - } else if ("groupId".equals(fieldName)) { + if ("groupId".equals(fieldName)) { deserializedSharedPrivateLinkResourceProperty.groupId = reader.getString(); + } else if ("privateLinkResourceId".equals(fieldName)) { + deserializedSharedPrivateLinkResourceProperty.privateLinkResourceId = reader.getString(); } else if ("requestMessage".equals(fieldName)) { deserializedSharedPrivateLinkResourceProperty.requestMessage = reader.getString(); } else if ("status".equals(fieldName)) { deserializedSharedPrivateLinkResourceProperty.status - = PrivateEndpointServiceConnectionStatus.fromString(reader.getString()); + = EndpointServiceConnectionStatus.fromString(reader.getString()); } else { reader.skipChildren(); } 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 e3de72408417b..39e15b7bc7c70 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 @@ -18,6 +18,11 @@ */ @Fluent public final class SkuResourceInner implements JsonSerializable { + /* + * Gets or sets the Sku Capacity. + */ + private SkuCapacity capacity; + /* * The resource type name. */ @@ -28,17 +33,32 @@ public final class SkuResourceInner implements JsonSerializable { + /* + * Model collection name + */ + private String modelCollection; + + /* + * The total number of quota + */ + private Long quota; + + /* + * Usage details for each deployment + */ + private List usageDetails; + + /** + * Creates an instance of UsageAndQuotaDetailsInner class. + */ + public UsageAndQuotaDetailsInner() { + } + + /** + * Get the modelCollection property: Model collection name. + * + * @return the modelCollection value. + */ + public String modelCollection() { + return this.modelCollection; + } + + /** + * Set the modelCollection property: Model collection name. + * + * @param modelCollection the modelCollection value to set. + * @return the UsageAndQuotaDetailsInner object itself. + */ + public UsageAndQuotaDetailsInner withModelCollection(String modelCollection) { + this.modelCollection = modelCollection; + return this; + } + + /** + * Get the quota property: The total number of quota. + * + * @return the quota value. + */ + public Long quota() { + return this.quota; + } + + /** + * Set the quota property: The total number of quota. + * + * @param quota the quota value to set. + * @return the UsageAndQuotaDetailsInner object itself. + */ + public UsageAndQuotaDetailsInner withQuota(Long quota) { + this.quota = quota; + return this; + } + + /** + * Get the usageDetails property: Usage details for each deployment. + * + * @return the usageDetails value. + */ + public List usageDetails() { + return this.usageDetails; + } + + /** + * Set the usageDetails property: Usage details for each deployment. + * + * @param usageDetails the usageDetails value to set. + * @return the UsageAndQuotaDetailsInner object itself. + */ + public UsageAndQuotaDetailsInner withUsageDetails(List usageDetails) { + this.usageDetails = usageDetails; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (usageDetails() != null) { + usageDetails().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("modelCollection", this.modelCollection); + jsonWriter.writeNumberField("quota", this.quota); + jsonWriter.writeArrayField("usageDetails", this.usageDetails, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UsageAndQuotaDetailsInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UsageAndQuotaDetailsInner if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the UsageAndQuotaDetailsInner. + */ + public static UsageAndQuotaDetailsInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UsageAndQuotaDetailsInner deserializedUsageAndQuotaDetailsInner = new UsageAndQuotaDetailsInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("modelCollection".equals(fieldName)) { + deserializedUsageAndQuotaDetailsInner.modelCollection = reader.getString(); + } else if ("quota".equals(fieldName)) { + deserializedUsageAndQuotaDetailsInner.quota = reader.getNullable(JsonReader::getLong); + } else if ("usageDetails".equals(fieldName)) { + List usageDetails + = reader.readArray(reader1 -> PtuDeploymentUsage.fromJson(reader1)); + deserializedUsageAndQuotaDetailsInner.usageDetails = usageDetails; + } else { + reader.skipChildren(); + } + } + + return deserializedUsageAndQuotaDetailsInner; + }); + } +} 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 372b93698a8cc..cdb1249a983cc 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 @@ -30,9 +30,9 @@ public final class WorkspaceConnectionPropertiesV2BasicResourceInner extends Pro private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +40,9 @@ public final class WorkspaceConnectionPropertiesV2BasicResourceInner extends Pro private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of WorkspaceConnectionPropertiesV2BasicResourceInner class. @@ -81,13 +81,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -101,13 +101,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** 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 b335ff448efc2..7208b07373a1f 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,18 +7,21 @@ 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.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; 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.NetworkAcls; 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.SystemDatastoresAuthMode; import com.azure.resourcemanager.machinelearning.models.WorkspaceHubConfig; import java.io.IOException; import java.util.List; @@ -30,12 +33,7 @@ @Fluent public final class WorkspaceInner extends ProxyResource { /* - * The properties of the machine learning workspace. - */ - private WorkspacePropertiesInner innerProperties; - - /* - * The identity of the resource. + * Managed service identity (system assigned and/or user assigned identities) */ private ManagedServiceIdentity identity; @@ -45,29 +43,34 @@ public final class WorkspaceInner extends ProxyResource { private String kind; /* - * Specifies the location of the resource. + * The location property. */ private String location; /* - * Contains resource tags defined as key/value pairs. + * Additional attributes of the entity. */ - private Map tags; + 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 */ private Sku sku; + /* + * Dictionary of + */ + private Map tags; + /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -75,9 +78,9 @@ public final class WorkspaceInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of WorkspaceInner class. @@ -86,16 +89,7 @@ public WorkspaceInner() { } /** - * Get the innerProperties property: The properties of the machine learning workspace. - * - * @return the innerProperties value. - */ - private WorkspacePropertiesInner innerProperties() { - return this.innerProperties; - } - - /** - * 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. */ @@ -104,7 +98,7 @@ 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. @@ -135,7 +129,7 @@ public WorkspaceInner withKind(String kind) { } /** - * Get the location property: Specifies the location of the resource. + * Get the location property: The location property. * * @return the location value. */ @@ -144,7 +138,7 @@ public String location() { } /** - * Set the location property: Specifies the location of the resource. + * Set the location property: The location property. * * @param location the location value to set. * @return the WorkspaceInner object itself. @@ -155,42 +149,53 @@ public WorkspaceInner withLocation(String location) { } /** - * Get the tags property: Contains resource tags defined as key/value pairs. + * Get the innerProperties property: Additional attributes of the entity. * - * @return the tags value. + * @return the innerProperties value. */ - public Map tags() { - return this.tags; + private WorkspacePropertiesInner innerProperties() { + return this.innerProperties; } /** - * Set the tags property: Contains resource tags defined as key/value pairs. + * Get the sku property: Optional. This field is required to be implemented by the RP because AML is supporting more + * than one tier. * - * @param tags the tags value to set. + * @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 WorkspaceInner object itself. */ - public WorkspaceInner withTags(Map tags) { - this.tags = tags; + public WorkspaceInner withSku(Sku sku) { + this.sku = sku; return this; } /** - * Get the sku property: The sku of the workspace. + * Get the tags property: Dictionary of <string>. * - * @return the sku value. + * @return the tags value. */ - public Sku sku() { - return this.sku; + public Map tags() { + return this.tags; } /** - * Set the sku property: The sku of the workspace. + * Set the tags property: Dictionary of <string>. * - * @param sku the sku value to set. + * @param tags the tags value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withSku(Sku sku) { - this.sku = sku; + public WorkspaceInner withTags(Map tags) { + this.tags = tags; return this; } @@ -204,13 +209,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -224,115 +229,140 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** - * Get the workspaceId property: The immutable id associated with this workspace. + * Get the agentsEndpointUri property: The URI of agents endpoint associated with this workspace. * - * @return the workspaceId value. + * @return the agentsEndpointUri value. */ - public String workspaceId() { - return this.innerProperties() == null ? null : this.innerProperties().workspaceId(); + public String agentsEndpointUri() { + return this.innerProperties() == null ? null : this.innerProperties().agentsEndpointUri(); } /** - * Get the description property: The description of this workspace. + * Get the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when behind + * VNet. * - * @return the description value. + * @return the allowPublicAccessWhenBehindVnet value. */ - public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); + public Boolean allowPublicAccessWhenBehindVnet() { + return this.innerProperties() == null ? null : this.innerProperties().allowPublicAccessWhenBehindVnet(); } /** - * Set the description property: The description of this workspace. + * Set the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when behind + * VNet. * - * @param description the description value to set. + * @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. + * Get the allowRoleAssignmentOnRG property: The flag to indicate whether we will do role assignment for the + * workspace MSI on resource group level. * - * @return the friendlyName value. + * @return the allowRoleAssignmentOnRG value. */ - public String friendlyName() { - return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); + public Boolean allowRoleAssignmentOnRG() { + return this.innerProperties() == null ? null : this.innerProperties().allowRoleAssignmentOnRG(); } /** - * Set the friendlyName property: The friendly name for this workspace. This name in mutable. + * Set the allowRoleAssignmentOnRG property: The flag to indicate whether we will do role assignment for the + * workspace MSI on resource group level. * - * @param friendlyName the friendlyName value to set. + * @param allowRoleAssignmentOnRG the allowRoleAssignmentOnRG value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withFriendlyName(String friendlyName) { + public WorkspaceInner withAllowRoleAssignmentOnRG(Boolean allowRoleAssignmentOnRG) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withFriendlyName(friendlyName); + this.innerProperties().withAllowRoleAssignmentOnRG(allowRoleAssignmentOnRG); 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. + * Get the applicationInsights property: ARM id of the application insights associated with this workspace. * - * @return the keyVault value. + * @return the applicationInsights value. */ - public String keyVault() { - return this.innerProperties() == null ? null : this.innerProperties().keyVault(); + public String applicationInsights() { + return this.innerProperties() == null ? null : this.innerProperties().applicationInsights(); } /** - * Set the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once - * the workspace has been created. + * Set the applicationInsights property: ARM id of the application insights associated with this workspace. * - * @param keyVault the keyVault value to set. + * @param applicationInsights the applicationInsights value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withKeyVault(String keyVault) { + public WorkspaceInner withApplicationInsights(String applicationInsights) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withKeyVault(keyVault); + this.innerProperties().withApplicationInsights(applicationInsights); return this; } /** - * Get the applicationInsights property: ARM id of the application insights associated with this workspace. + * Get the associatedWorkspaces property: The associatedWorkspaces property. * - * @return the applicationInsights value. + * @return the associatedWorkspaces value. */ - public String applicationInsights() { - return this.innerProperties() == null ? null : this.innerProperties().applicationInsights(); + public List associatedWorkspaces() { + return this.innerProperties() == null ? null : this.innerProperties().associatedWorkspaces(); } /** - * Set the applicationInsights property: ARM id of the application insights associated with this workspace. + * Set the associatedWorkspaces property: The associatedWorkspaces property. * - * @param applicationInsights the applicationInsights value to set. + * @param associatedWorkspaces the associatedWorkspaces value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withApplicationInsights(String applicationInsights) { + public WorkspaceInner withAssociatedWorkspaces(List associatedWorkspaces) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withApplicationInsights(applicationInsights); + this.innerProperties().withAssociatedWorkspaces(associatedWorkspaces); + return this; + } + + /** + * Get the containerRegistries property: The containerRegistries property. + * + * @return the containerRegistries value. + */ + public List containerRegistries() { + return this.innerProperties() == null ? null : this.innerProperties().containerRegistries(); + } + + /** + * Set the containerRegistries property: The containerRegistries property. + * + * @param containerRegistries the containerRegistries value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withContainerRegistries(List containerRegistries) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withContainerRegistries(containerRegistries); return this; } @@ -360,27 +390,25 @@ 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. + * Get the description property: The description of this workspace. * - * @return the storageAccount value. + * @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. + * Set the description property: The description of this workspace. * - * @param storageAccount the storageAccount value to set. + * @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; } @@ -410,241 +438,398 @@ 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. - */ - public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the encryption property: The encryption settings of Azure ML workspace. + * Get the enableDataIsolation property: The enableDataIsolation property. * - * @return the encryption value. + * @return the enableDataIsolation value. */ - public EncryptionProperty encryption() { - return this.innerProperties() == null ? null : this.innerProperties().encryption(); + public Boolean enableDataIsolation() { + return this.innerProperties() == null ? null : this.innerProperties().enableDataIsolation(); } /** - * Set the encryption property: The encryption settings of Azure ML workspace. + * Set the enableDataIsolation property: The enableDataIsolation property. * - * @param encryption the encryption value to set. + * @param enableDataIsolation the enableDataIsolation value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withEncryption(EncryptionProperty encryption) { + public WorkspaceInner withEnableDataIsolation(Boolean enableDataIsolation) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withEncryption(encryption); + this.innerProperties().withEnableDataIsolation(enableDataIsolation); return this; } /** - * Get the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected - * by the service. + * Get the enableServiceSideCmkEncryption property: The enableServiceSideCMKEncryption property. * - * @return the hbiWorkspace value. + * @return the enableServiceSideCmkEncryption value. */ - public Boolean hbiWorkspace() { - return this.innerProperties() == null ? null : this.innerProperties().hbiWorkspace(); + public Boolean enableServiceSideCmkEncryption() { + return this.innerProperties() == null ? null : this.innerProperties().enableServiceSideCmkEncryption(); } /** - * Set the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected - * by the service. + * Set the enableServiceSideCmkEncryption property: The enableServiceSideCMKEncryption property. * - * @param hbiWorkspace the hbiWorkspace value to set. + * @param enableServiceSideCmkEncryption the enableServiceSideCmkEncryption value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withHbiWorkspace(Boolean hbiWorkspace) { + public WorkspaceInner withEnableServiceSideCmkEncryption(Boolean enableServiceSideCmkEncryption) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withHbiWorkspace(hbiWorkspace); + this.innerProperties().withEnableServiceSideCmkEncryption(enableServiceSideCmkEncryption); return this; } /** - * Get the serviceProvisionedResourceGroup property: The name of the managed resource group created by workspace RP - * in customer subscription if the workspace is CMK workspace. + * Get the enableSimplifiedCmk property: Flag to tell if simplified CMK should be enabled for this workspace. * - * @return the serviceProvisionedResourceGroup value. + * @return the enableSimplifiedCmk value. */ - public String serviceProvisionedResourceGroup() { - return this.innerProperties() == null ? null : this.innerProperties().serviceProvisionedResourceGroup(); + public Boolean enableSimplifiedCmk() { + return this.innerProperties() == null ? null : this.innerProperties().enableSimplifiedCmk(); } /** - * Get the privateLinkCount property: Count of private connections in the workspace. + * Set the enableSimplifiedCmk property: Flag to tell if simplified CMK should be enabled for this workspace. * - * @return the privateLinkCount value. + * @param enableSimplifiedCmk the enableSimplifiedCmk value to set. + * @return the WorkspaceInner object itself. */ - public Integer privateLinkCount() { - return this.innerProperties() == null ? null : this.innerProperties().privateLinkCount(); + public WorkspaceInner withEnableSimplifiedCmk(Boolean enableSimplifiedCmk) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withEnableSimplifiedCmk(enableSimplifiedCmk); + return this; } /** - * Get the imageBuildCompute property: The compute name for image build. + * Get the enableSoftwareBillOfMaterials property: Flag to tell if SoftwareBillOfMaterials should be enabled for + * this workspace. * - * @return the imageBuildCompute value. + * @return the enableSoftwareBillOfMaterials value. */ - public String imageBuildCompute() { - return this.innerProperties() == null ? null : this.innerProperties().imageBuildCompute(); + public Boolean enableSoftwareBillOfMaterials() { + return this.innerProperties() == null ? null : this.innerProperties().enableSoftwareBillOfMaterials(); } /** - * Set the imageBuildCompute property: The compute name for image build. + * Set the enableSoftwareBillOfMaterials property: Flag to tell if SoftwareBillOfMaterials should be enabled for + * this workspace. * - * @param imageBuildCompute the imageBuildCompute value to set. + * @param enableSoftwareBillOfMaterials the enableSoftwareBillOfMaterials value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withImageBuildCompute(String imageBuildCompute) { + public WorkspaceInner withEnableSoftwareBillOfMaterials(Boolean enableSoftwareBillOfMaterials) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withImageBuildCompute(imageBuildCompute); + this.innerProperties().withEnableSoftwareBillOfMaterials(enableSoftwareBillOfMaterials); return this; } /** - * Get the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when behind - * VNet. + * Get the encryption property: The encryption property. * - * @return the allowPublicAccessWhenBehindVnet value. + * @return the encryption value. */ - public Boolean allowPublicAccessWhenBehindVnet() { - return this.innerProperties() == null ? null : this.innerProperties().allowPublicAccessWhenBehindVnet(); + public EncryptionProperty encryption() { + return this.innerProperties() == null ? null : this.innerProperties().encryption(); } /** - * Set the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when behind - * VNet. + * Set the encryption property: The encryption property. * - * @param allowPublicAccessWhenBehindVnet the allowPublicAccessWhenBehindVnet value to set. + * @param encryption the encryption value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withAllowPublicAccessWhenBehindVnet(Boolean allowPublicAccessWhenBehindVnet) { + public WorkspaceInner withEncryption(EncryptionProperty encryption) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withAllowPublicAccessWhenBehindVnet(allowPublicAccessWhenBehindVnet); + this.innerProperties().withEncryption(encryption); return this; } /** - * Get the publicNetworkAccess property: Whether requests from Public Network are allowed. + * Get the existingWorkspaces property: The existingWorkspaces property. * - * @return the publicNetworkAccess value. + * @return the existingWorkspaces value. */ - public PublicNetworkAccess publicNetworkAccess() { - return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); + public List existingWorkspaces() { + return this.innerProperties() == null ? null : this.innerProperties().existingWorkspaces(); } /** - * Set the publicNetworkAccess property: Whether requests from Public Network are allowed. + * Set the existingWorkspaces property: The existingWorkspaces property. * - * @param publicNetworkAccess the publicNetworkAccess value to set. + * @param existingWorkspaces the existingWorkspaces value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + public WorkspaceInner withExistingWorkspaces(List existingWorkspaces) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); + this.innerProperties().withExistingWorkspaces(existingWorkspaces); return this; } /** - * Get the privateEndpointConnections property: The list of private endpoint connections in the workspace. + * Get the featureStoreSettings property: Settings for feature store type workspace. * - * @return the privateEndpointConnections value. + * @return the featureStoreSettings value. */ - public List privateEndpointConnections() { - return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections(); + public FeatureStoreSettings featureStoreSettings() { + return this.innerProperties() == null ? null : this.innerProperties().featureStoreSettings(); } /** - * Get the serverlessComputeSettings property: Settings for serverless compute created in the workspace. + * Set the featureStoreSettings property: Settings for feature store type workspace. * - * @return the serverlessComputeSettings value. + * @param featureStoreSettings the featureStoreSettings value to set. + * @return the WorkspaceInner object itself. */ - public ServerlessComputeSettings serverlessComputeSettings() { - return this.innerProperties() == null ? null : this.innerProperties().serverlessComputeSettings(); + public WorkspaceInner withFeatureStoreSettings(FeatureStoreSettings featureStoreSettings) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withFeatureStoreSettings(featureStoreSettings); + return this; } /** - * Set the serverlessComputeSettings property: Settings for serverless compute created in the workspace. + * Get the friendlyName property: The friendly name for this workspace. This name in mutable. * - * @param serverlessComputeSettings the serverlessComputeSettings value to set. + * @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 withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings) { + public WorkspaceInner withFriendlyName(String friendlyName) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withServerlessComputeSettings(serverlessComputeSettings); + this.innerProperties().withFriendlyName(friendlyName); return this; } /** - * Get the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. + * Get the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected + * by the service. * - * @return the sharedPrivateLinkResources value. + * @return the hbiWorkspace value. */ - public List sharedPrivateLinkResources() { - return this.innerProperties() == null ? null : this.innerProperties().sharedPrivateLinkResources(); + public Boolean hbiWorkspace() { + return this.innerProperties() == null ? null : this.innerProperties().hbiWorkspace(); } /** - * Set the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. + * Set the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected + * by the service. * - * @param sharedPrivateLinkResources the sharedPrivateLinkResources value to set. + * @param hbiWorkspace the hbiWorkspace value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withSharedPrivateLinkResources(List sharedPrivateLinkResources) { + public WorkspaceInner withHbiWorkspace(Boolean hbiWorkspace) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withSharedPrivateLinkResources(sharedPrivateLinkResources); + this.innerProperties().withHbiWorkspace(hbiWorkspace); return this; } /** - * Get the notebookInfo property: The notebook info of Azure ML workspace. + * Get the hubResourceId property: The hubResourceId property. * - * @return the notebookInfo value. + * @return the hubResourceId value. */ - public NotebookResourceInfoInner notebookInfo() { - return this.innerProperties() == null ? null : this.innerProperties().notebookInfo(); + public String hubResourceId() { + return this.innerProperties() == null ? null : this.innerProperties().hubResourceId(); } /** - * Get the serviceManagedResourcesSettings property: The service managed resource settings. + * Set the hubResourceId property: The hubResourceId property. * - * @return the serviceManagedResourcesSettings value. + * @param hubResourceId the hubResourceId value to set. + * @return the WorkspaceInner object itself. */ - public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { - return this.innerProperties() == null ? null : this.innerProperties().serviceManagedResourcesSettings(); + public WorkspaceInner withHubResourceId(String hubResourceId) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withHubResourceId(hubResourceId); + return this; } /** - * Set the serviceManagedResourcesSettings property: The service managed resource settings. + * Get the imageBuildCompute property: The compute name for image build. * - * @param serviceManagedResourcesSettings the serviceManagedResourcesSettings value to set. + * @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 WorkspaceInner object itself. */ - public WorkspaceInner - withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings) { + public WorkspaceInner withImageBuildCompute(String imageBuildCompute) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withServiceManagedResourcesSettings(serviceManagedResourcesSettings); + 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 WorkspaceInner object itself. + */ + public WorkspaceInner withIpAllowlist(List ipAllowlist) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withIpAllowlist(ipAllowlist); + 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. + */ + public String keyVault() { + return this.innerProperties() == null ? null : this.innerProperties().keyVault(); + } + + /** + * 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 withKeyVault(String keyVault) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withKeyVault(keyVault); + return this; + } + + /** + * Get the keyVaults property: The keyVaults property. + * + * @return the keyVaults value. + */ + public List keyVaults() { + return this.innerProperties() == null ? null : this.innerProperties().keyVaults(); + } + + /** + * Set the keyVaults property: The keyVaults property. + * + * @param keyVaults the keyVaults value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withKeyVaults(List keyVaults) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withKeyVaults(keyVaults); + return this; + } + + /** + * Get the managedNetwork property: Managed Network settings for a machine learning workspace. + * + * @return the managedNetwork value. + */ + public ManagedNetworkSettingsInner managedNetwork() { + return this.innerProperties() == null ? null : this.innerProperties().managedNetwork(); + } + + /** + * Set the managedNetwork property: Managed Network settings for a machine learning workspace. + * + * @param managedNetwork the managedNetwork value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withManagedNetwork(ManagedNetworkSettingsInner managedNetwork) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withManagedNetwork(managedNetwork); return this; } + /** + * 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 networkAcls property: A set of rules governing the network accessibility of the workspace. + * + * @return the networkAcls value. + */ + public NetworkAcls networkAcls() { + return this.innerProperties() == null ? null : this.innerProperties().networkAcls(); + } + + /** + * Set the networkAcls property: A set of rules governing the network accessibility of the workspace. + * + * @param networkAcls the networkAcls value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withNetworkAcls(NetworkAcls networkAcls) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withNetworkAcls(networkAcls); + return this; + } + + /** + * 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. @@ -671,171 +856,298 @@ public WorkspaceInner withPrimaryUserAssignedIdentity(String primaryUserAssigned } /** - * Get the tenantId property: The tenant id associated with this workspace. + * Get the privateEndpointConnections property: The list of private endpoint connections in the workspace. * - * @return the tenantId value. + * @return the privateEndpointConnections value. */ - public String tenantId() { - return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + public List privateEndpointConnections() { + return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections(); } /** - * Get the storageHnsEnabled property: If the storage associated with the workspace has hierarchical namespace(HNS) - * enabled. + * Get the privateLinkCount property: Count of private connections in the workspace. * - * @return the storageHnsEnabled value. + * @return the privateLinkCount value. */ - public Boolean storageHnsEnabled() { - return this.innerProperties() == null ? null : this.innerProperties().storageHnsEnabled(); + public Integer privateLinkCount() { + return this.innerProperties() == null ? null : this.innerProperties().privateLinkCount(); } /** - * Get the mlFlowTrackingUri property: The URI associated with this workspace that machine learning flow must point - * at to set up tracking. + * Get the provisionNetworkNow property: Set to trigger the provisioning of the managed VNet with the default + * Options when creating a Workspace with the managed VNet enabled, or else it does nothing. * - * @return the mlFlowTrackingUri value. + * @return the provisionNetworkNow value. */ - public String mlFlowTrackingUri() { - return this.innerProperties() == null ? null : this.innerProperties().mlFlowTrackingUri(); + public Boolean provisionNetworkNow() { + return this.innerProperties() == null ? null : this.innerProperties().provisionNetworkNow(); } /** - * Get the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 - * API. + * Set the provisionNetworkNow property: Set to trigger the provisioning of the managed VNet with the default + * Options when creating a Workspace with the managed VNet enabled, or else it does nothing. * - * @return the v1LegacyMode value. + * @param provisionNetworkNow the provisionNetworkNow value to set. + * @return the WorkspaceInner object itself. */ - public Boolean v1LegacyMode() { - return this.innerProperties() == null ? null : this.innerProperties().v1LegacyMode(); + public WorkspaceInner withProvisionNetworkNow(Boolean provisionNetworkNow) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withProvisionNetworkNow(provisionNetworkNow); + return this; } /** - * Set the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 - * API. + * Get the provisioningState property: The current deployment state of workspace resource. The provisioningState is + * to indicate states for resource provisioning. * - * @param v1LegacyMode the v1LegacyMode value to set. + * @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 withV1LegacyMode(Boolean v1LegacyMode) { + public WorkspaceInner withPublicNetworkAccess(PublicNetworkAccessType publicNetworkAccess) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withV1LegacyMode(v1LegacyMode); + this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); return this; } /** - * Get the managedNetwork property: Managed Network settings for a machine learning workspace. + * Get the serverlessComputeSettings property: Settings for serverless compute in a workspace. * - * @return the managedNetwork value. + * @return the serverlessComputeSettings value. */ - public ManagedNetworkSettingsInner managedNetwork() { - return this.innerProperties() == null ? null : this.innerProperties().managedNetwork(); + public ServerlessComputeSettings serverlessComputeSettings() { + return this.innerProperties() == null ? null : this.innerProperties().serverlessComputeSettings(); } /** - * Set the managedNetwork property: Managed Network settings for a machine learning workspace. + * Set the serverlessComputeSettings property: Settings for serverless compute in a workspace. * - * @param managedNetwork the managedNetwork value to set. + * @param serverlessComputeSettings the serverlessComputeSettings value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withManagedNetwork(ManagedNetworkSettingsInner managedNetwork) { + public WorkspaceInner withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withManagedNetwork(managedNetwork); + this.innerProperties().withServerlessComputeSettings(serverlessComputeSettings); return this; } /** - * Get the featureStoreSettings property: Settings for feature store type workspace. + * Get the serviceManagedResourcesSettings property: The service managed resource settings. * - * @return the featureStoreSettings value. + * @return the serviceManagedResourcesSettings value. */ - public FeatureStoreSettings featureStoreSettings() { - return this.innerProperties() == null ? null : this.innerProperties().featureStoreSettings(); + public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { + return this.innerProperties() == null ? null : this.innerProperties().serviceManagedResourcesSettings(); } /** - * Set the featureStoreSettings property: Settings for feature store type workspace. + * Set the serviceManagedResourcesSettings property: The service managed resource settings. * - * @param featureStoreSettings the featureStoreSettings value to set. + * @param serviceManagedResourcesSettings the serviceManagedResourcesSettings value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withFeatureStoreSettings(FeatureStoreSettings featureStoreSettings) { + public WorkspaceInner + withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withFeatureStoreSettings(featureStoreSettings); + this.innerProperties().withServiceManagedResourcesSettings(serviceManagedResourcesSettings); return this; } /** - * Get the associatedWorkspaces property: The associatedWorkspaces property. + * 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 associatedWorkspaces value. + * @return the serviceProvisionedResourceGroup value. */ - public List associatedWorkspaces() { - return this.innerProperties() == null ? null : this.innerProperties().associatedWorkspaces(); + public String serviceProvisionedResourceGroup() { + return this.innerProperties() == null ? null : this.innerProperties().serviceProvisionedResourceGroup(); } /** - * Set the associatedWorkspaces property: The associatedWorkspaces property. + * Get the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. * - * @param associatedWorkspaces the associatedWorkspaces value to set. + * @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 withAssociatedWorkspaces(List associatedWorkspaces) { + public WorkspaceInner withSharedPrivateLinkResources(List sharedPrivateLinkResources) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withAssociatedWorkspaces(associatedWorkspaces); + this.innerProperties().withSharedPrivateLinkResources(sharedPrivateLinkResources); return this; } /** - * Get the enableDataIsolation property: The enableDataIsolation property. + * Get the softDeleteRetentionInDays property: Retention time in days after workspace get soft deleted. * - * @return the enableDataIsolation value. + * @return the softDeleteRetentionInDays value. */ - public Boolean enableDataIsolation() { - return this.innerProperties() == null ? null : this.innerProperties().enableDataIsolation(); + public Integer softDeleteRetentionInDays() { + return this.innerProperties() == null ? null : this.innerProperties().softDeleteRetentionInDays(); } /** - * Set the enableDataIsolation property: The enableDataIsolation property. + * Set the softDeleteRetentionInDays property: Retention time in days after workspace get soft deleted. * - * @param enableDataIsolation the enableDataIsolation value to set. + * @param softDeleteRetentionInDays the softDeleteRetentionInDays value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withEnableDataIsolation(Boolean enableDataIsolation) { + public WorkspaceInner withSoftDeleteRetentionInDays(Integer softDeleteRetentionInDays) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withEnableDataIsolation(enableDataIsolation); + this.innerProperties().withSoftDeleteRetentionInDays(softDeleteRetentionInDays); return this; } /** - * Get the hubResourceId property: The hubResourceId property. + * 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 hubResourceId value. + * @return the storageAccount value. */ - public String hubResourceId() { - return this.innerProperties() == null ? null : this.innerProperties().hubResourceId(); + public String storageAccount() { + return this.innerProperties() == null ? null : this.innerProperties().storageAccount(); } /** - * Set the hubResourceId property: The hubResourceId property. + * 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 hubResourceId the hubResourceId value to set. + * @param storageAccount the storageAccount value to set. * @return the WorkspaceInner object itself. */ - public WorkspaceInner withHubResourceId(String hubResourceId) { + public WorkspaceInner withStorageAccount(String storageAccount) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesInner(); } - this.innerProperties().withHubResourceId(hubResourceId); + 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() { + return this.innerProperties() == null ? null : this.innerProperties().storageHnsEnabled(); + } + + /** + * Get the systemDatastoresAuthMode property: The auth mode used for accessing the system datastores of the + * workspace. + * + * @return the systemDatastoresAuthMode value. + */ + public SystemDatastoresAuthMode 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(SystemDatastoresAuthMode 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() { + 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 WorkspaceInner object itself. + */ + public WorkspaceInner withV1LegacyMode(Boolean v1LegacyMode) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesInner(); + } + this.innerProperties().withV1LegacyMode(v1LegacyMode); return this; } @@ -862,23 +1174,37 @@ public WorkspaceInner withWorkspaceHubConfig(WorkspaceHubConfig workspaceHubConf 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.atError() + .log(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); + /** * {@inheritDoc} */ @@ -889,8 +1215,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("identity", this.identity); jsonWriter.writeStringField("kind", this.kind); jsonWriter.writeStringField("location", this.location); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -924,11 +1250,11 @@ public static WorkspaceInner fromJson(JsonReader jsonReader) throws IOException deserializedWorkspaceInner.kind = reader.getString(); } else if ("location".equals(fieldName)) { deserializedWorkspaceInner.location = reader.getString(); + } else if ("sku".equals(fieldName)) { + deserializedWorkspaceInner.sku = Sku.fromJson(reader); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedWorkspaceInner.tags = tags; - } else if ("sku".equals(fieldName)) { - deserializedWorkspaceInner.sku = Sku.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedWorkspaceInner.systemData = SystemData.fromJson(reader); } else { 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 76f9377dcb92d..b5c84fd322919 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 @@ -11,11 +11,13 @@ import com.azure.json.JsonWriter; import com.azure.resourcemanager.machinelearning.models.EncryptionProperty; import com.azure.resourcemanager.machinelearning.models.FeatureStoreSettings; +import com.azure.resourcemanager.machinelearning.models.NetworkAcls; 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.SystemDatastoresAuthMode; import com.azure.resourcemanager.machinelearning.models.WorkspaceHubConfig; import java.io.IOException; import java.util.List; @@ -26,30 +28,34 @@ @Fluent public final class WorkspacePropertiesInner implements JsonSerializable { /* - * The immutable id associated with this workspace. + * The URI of agents endpoint associated with this workspace. */ - private String workspaceId; + private String agentsEndpointUri; /* - * The description of this workspace. + * The flag to indicate whether to allow public access when behind VNet. */ - private String description; + private Boolean allowPublicAccessWhenBehindVnet; /* - * The friendly name for this workspace. This name in mutable + * The flag to indicate whether we will do role assignment for the workspace MSI on resource group level. */ - private String friendlyName; + private Boolean allowRoleAssignmentOnRG; /* - * ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been - * created + * ARM id of the application insights associated with this workspace. */ - private String keyVault; + private String applicationInsights; /* - * ARM id of the application insights associated with this workspace. + * The associatedWorkspaces property. */ - private String applicationInsights; + private List associatedWorkspaces; + + /* + * The containerRegistries property. + */ + private List containerRegistries; /* * ARM id of the container registry associated with this workspace. @@ -57,10 +63,9 @@ public final class WorkspacePropertiesInner implements JsonSerializable 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. */ - private String serviceProvisionedResourceGroup; + private FeatureStoreSettings featureStoreSettings; /* - * Count of private connections in the workspace + * The friendly name for this workspace. This name in mutable */ - private Integer privateLinkCount; + private String friendlyName; + + /* + * The flag to signal HBI data in the workspace and reduce diagnostic data collected by the service + */ + private Boolean hbiWorkspace; + + /* + * The hubResourceId property. + */ + private String hubResourceId; /* * The compute name for image build @@ -100,39 +128,40 @@ public final class WorkspacePropertiesInner implements JsonSerializable 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 */ - private PublicNetworkAccess publicNetworkAccess; + private String keyVault; /* - * The list of private endpoint connections in the workspace. + * The keyVaults property. */ - private List privateEndpointConnections; + private List keyVaults; /* - * Settings for serverless compute created in the workspace + * Managed Network settings for a machine learning workspace. */ - private ServerlessComputeSettings serverlessComputeSettings; + private ManagedNetworkSettingsInner managedNetwork; /* - * The list of shared private link resources in this workspace. + * The URI associated with this workspace that machine learning flow must point at to set up tracking. */ - private List sharedPrivateLinkResources; + private String mlFlowTrackingUri; /* - * The notebook info of Azure ML workspace. + * A set of rules governing the network accessibility of the workspace. */ - private NotebookResourceInfoInner notebookInfo; + private NetworkAcls networkAcls; /* - * The service managed resource settings. + * The notebook info of Azure ML workspace. */ - private ServiceManagedResourcesSettings serviceManagedResourcesSettings; + private NotebookResourceInfoInner notebookInfo; /* * The user assigned identity resource id that represents the workspace identity. @@ -140,55 +169,99 @@ public final class WorkspacePropertiesInner implements JsonSerializable privateEndpointConnections; /* - * If the storage associated with the workspace has hierarchical namespace(HNS) enabled. + * Count of private connections in the workspace */ - private Boolean storageHnsEnabled; + private Integer privateLinkCount; /* - * The URI associated with this workspace that machine learning flow must point at to set up tracking. + * Set to trigger the provisioning of the managed VNet with the default Options when creating a Workspace with the + * managed VNet enabled, or else it does nothing. */ - private String mlFlowTrackingUri; + private Boolean provisionNetworkNow; /* - * Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. + * The current deployment state of workspace resource. The provisioningState is to indicate states for resource + * provisioning. */ - private Boolean v1LegacyMode; + private ProvisioningState provisioningState; /* - * Managed Network settings for a machine learning workspace. + * Whether requests from Public Network are allowed. */ - private ManagedNetworkSettingsInner managedNetwork; + private PublicNetworkAccessType publicNetworkAccess; /* - * Settings for feature store type workspace. + * Settings for serverless compute in a workspace */ - private FeatureStoreSettings featureStoreSettings; + private ServerlessComputeSettings serverlessComputeSettings; /* - * The associatedWorkspaces property. + * The service managed resource settings. */ - private List associatedWorkspaces; + private ServiceManagedResourcesSettings serviceManagedResourcesSettings; /* - * The enableDataIsolation property. + * The name of the managed resource group created by workspace RP in customer subscription if the workspace is CMK + * workspace */ - private Boolean enableDataIsolation; + private String serviceProvisionedResourceGroup; /* - * The hubResourceId property. + * The list of shared private link resources in this workspace. */ - private String hubResourceId; + private List sharedPrivateLinkResources; + + /* + * Retention time in days after workspace get soft deleted. + */ + private Integer softDeleteRetentionInDays; + + /* + * ARM id of the storage account associated with this workspace. This cannot be changed once the workspace has been + * created + */ + private String storageAccount; + + /* + * The storageAccounts property. + */ + private List storageAccounts; + + /* + * If the storage associated with the workspace has hierarchical namespace(HNS) enabled. + */ + private Boolean storageHnsEnabled; + + /* + * The auth mode used for accessing the system datastores of the workspace. + */ + private SystemDatastoresAuthMode systemDatastoresAuthMode; + + /* + * The tenant id associated with this workspace. + */ + private String tenantId; + + /* + * Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. + */ + private Boolean v1LegacyMode; /* * WorkspaceHub's configuration object. */ private WorkspaceHubConfig workspaceHubConfig; + /* + * The immutable id associated with this workspace. + */ + private String workspaceId; + /** * Creates an instance of WorkspacePropertiesInner class. */ @@ -196,93 +269,115 @@ public WorkspacePropertiesInner() { } /** - * Get the workspaceId property: The immutable id associated with this workspace. + * Get the agentsEndpointUri property: The URI of agents endpoint associated with this workspace. * - * @return the workspaceId value. + * @return the agentsEndpointUri value. */ - public String workspaceId() { - return this.workspaceId; + public String agentsEndpointUri() { + return this.agentsEndpointUri; } /** - * Get the description property: The description of this workspace. + * Get the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when behind + * VNet. * - * @return the description value. + * @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. + * Set the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when behind + * VNet. * - * @param description the description value to set. + * @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. + * Get the allowRoleAssignmentOnRG property: The flag to indicate whether we will do role assignment for the + * workspace MSI on resource group level. * - * @return the friendlyName value. + * @return the allowRoleAssignmentOnRG value. */ - public String friendlyName() { - return this.friendlyName; + public Boolean allowRoleAssignmentOnRG() { + return this.allowRoleAssignmentOnRG; } /** - * Set the friendlyName property: The friendly name for this workspace. This name in mutable. + * Set the allowRoleAssignmentOnRG property: The flag to indicate whether we will do role assignment for the + * workspace MSI on resource group level. * - * @param friendlyName the friendlyName value to set. + * @param allowRoleAssignmentOnRG the allowRoleAssignmentOnRG value to set. * @return the WorkspacePropertiesInner object itself. */ - public WorkspacePropertiesInner withFriendlyName(String friendlyName) { - this.friendlyName = friendlyName; + public WorkspacePropertiesInner withAllowRoleAssignmentOnRG(Boolean allowRoleAssignmentOnRG) { + this.allowRoleAssignmentOnRG = allowRoleAssignmentOnRG; 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. + * Get the applicationInsights property: ARM id of the application insights associated with this workspace. * - * @return the keyVault value. + * @return the applicationInsights value. */ - public String keyVault() { - return this.keyVault; + public String applicationInsights() { + return this.applicationInsights; } /** - * Set the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once - * the workspace has been created. + * Set the applicationInsights property: ARM id of the application insights associated with this workspace. * - * @param keyVault the keyVault value to set. + * @param applicationInsights the applicationInsights value to set. * @return the WorkspacePropertiesInner object itself. */ - public WorkspacePropertiesInner withKeyVault(String keyVault) { - this.keyVault = keyVault; + public WorkspacePropertiesInner withApplicationInsights(String applicationInsights) { + this.applicationInsights = applicationInsights; return this; } /** - * Get the applicationInsights property: ARM id of the application insights associated with this workspace. + * Get the associatedWorkspaces property: The associatedWorkspaces property. * - * @return the applicationInsights value. + * @return the associatedWorkspaces value. */ - public String applicationInsights() { - return this.applicationInsights; + public List associatedWorkspaces() { + return this.associatedWorkspaces; } /** - * Set the applicationInsights property: ARM id of the application insights associated with this workspace. + * Set the associatedWorkspaces property: The associatedWorkspaces property. * - * @param applicationInsights the applicationInsights value to set. + * @param associatedWorkspaces the associatedWorkspaces value to set. * @return the WorkspacePropertiesInner object itself. */ - public WorkspacePropertiesInner withApplicationInsights(String applicationInsights) { - this.applicationInsights = applicationInsights; + public WorkspacePropertiesInner withAssociatedWorkspaces(List associatedWorkspaces) { + this.associatedWorkspaces = associatedWorkspaces; + return this; + } + + /** + * Get the containerRegistries property: The containerRegistries property. + * + * @return the containerRegistries value. + */ + public List containerRegistries() { + return this.containerRegistries; + } + + /** + * Set the containerRegistries property: The containerRegistries property. + * + * @param containerRegistries the containerRegistries value to set. + * @return the WorkspacePropertiesInner object itself. + */ + public WorkspacePropertiesInner withContainerRegistries(List containerRegistries) { + this.containerRegistries = containerRegistries; return this; } @@ -307,24 +402,22 @@ 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. + * Get the description property: The description of this workspace. * - * @return the storageAccount value. + * @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. + * Set the description property: The description of this workspace. * - * @param storageAccount the storageAccount value to set. + * @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; } @@ -351,288 +444,288 @@ 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. + * Get the enableDataIsolation property: The enableDataIsolation property. * - * @return the provisioningState value. + * @return the enableDataIsolation value. */ - public ProvisioningState provisioningState() { - return this.provisioningState; + public Boolean enableDataIsolation() { + return this.enableDataIsolation; } /** - * Get the encryption property: The encryption settings of Azure ML workspace. + * Set the enableDataIsolation property: The enableDataIsolation property. * - * @return the encryption value. - */ - public EncryptionProperty encryption() { - return this.encryption; - } - - /** - * Set the encryption property: The encryption settings of Azure ML workspace. - * - * @param encryption the encryption value to set. + * @param enableDataIsolation the enableDataIsolation value to set. * @return the WorkspacePropertiesInner object itself. */ - public WorkspacePropertiesInner withEncryption(EncryptionProperty encryption) { - this.encryption = encryption; + public WorkspacePropertiesInner withEnableDataIsolation(Boolean enableDataIsolation) { + this.enableDataIsolation = enableDataIsolation; return this; } /** - * Get the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected - * by the service. + * Get the enableServiceSideCmkEncryption property: The enableServiceSideCMKEncryption property. * - * @return the hbiWorkspace value. + * @return the enableServiceSideCmkEncryption value. */ - public Boolean hbiWorkspace() { - return this.hbiWorkspace; + public Boolean enableServiceSideCmkEncryption() { + return this.enableServiceSideCmkEncryption; } /** - * Set the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected - * by the service. + * Set the enableServiceSideCmkEncryption property: The enableServiceSideCMKEncryption property. * - * @param hbiWorkspace the hbiWorkspace value to set. + * @param enableServiceSideCmkEncryption the enableServiceSideCmkEncryption value to set. * @return the WorkspacePropertiesInner object itself. */ - public WorkspacePropertiesInner withHbiWorkspace(Boolean hbiWorkspace) { - this.hbiWorkspace = hbiWorkspace; + public WorkspacePropertiesInner withEnableServiceSideCmkEncryption(Boolean enableServiceSideCmkEncryption) { + this.enableServiceSideCmkEncryption = enableServiceSideCmkEncryption; return this; } /** - * Get the serviceProvisionedResourceGroup property: The name of the managed resource group created by workspace RP - * in customer subscription if the workspace is CMK workspace. + * Get the enableSimplifiedCmk property: Flag to tell if simplified CMK should be enabled for this workspace. * - * @return the serviceProvisionedResourceGroup value. + * @return the enableSimplifiedCmk value. */ - public String serviceProvisionedResourceGroup() { - return this.serviceProvisionedResourceGroup; + public Boolean enableSimplifiedCmk() { + return this.enableSimplifiedCmk; } /** - * Get the privateLinkCount property: Count of private connections in the workspace. + * Set the enableSimplifiedCmk property: Flag to tell if simplified CMK should be enabled for this workspace. * - * @return the privateLinkCount value. + * @param enableSimplifiedCmk the enableSimplifiedCmk value to set. + * @return the WorkspacePropertiesInner object itself. */ - public Integer privateLinkCount() { - return this.privateLinkCount; + public WorkspacePropertiesInner withEnableSimplifiedCmk(Boolean enableSimplifiedCmk) { + this.enableSimplifiedCmk = enableSimplifiedCmk; + return this; } /** - * Get the imageBuildCompute property: The compute name for image build. + * Get the enableSoftwareBillOfMaterials property: Flag to tell if SoftwareBillOfMaterials should be enabled for + * this workspace. * - * @return the imageBuildCompute value. + * @return the enableSoftwareBillOfMaterials value. */ - public String imageBuildCompute() { - return this.imageBuildCompute; + public Boolean enableSoftwareBillOfMaterials() { + return this.enableSoftwareBillOfMaterials; } /** - * Set the imageBuildCompute property: The compute name for image build. + * Set the enableSoftwareBillOfMaterials property: Flag to tell if SoftwareBillOfMaterials should be enabled for + * this workspace. * - * @param imageBuildCompute the imageBuildCompute value to set. + * @param enableSoftwareBillOfMaterials the enableSoftwareBillOfMaterials value to set. * @return the WorkspacePropertiesInner object itself. */ - public WorkspacePropertiesInner withImageBuildCompute(String imageBuildCompute) { - this.imageBuildCompute = imageBuildCompute; + public WorkspacePropertiesInner withEnableSoftwareBillOfMaterials(Boolean enableSoftwareBillOfMaterials) { + this.enableSoftwareBillOfMaterials = enableSoftwareBillOfMaterials; return this; } /** - * Get the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when behind - * VNet. + * Get the encryption property: The encryption property. * - * @return the allowPublicAccessWhenBehindVnet value. + * @return the encryption value. */ - public Boolean allowPublicAccessWhenBehindVnet() { - return this.allowPublicAccessWhenBehindVnet; + public EncryptionProperty encryption() { + return this.encryption; } /** - * Set the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when behind - * VNet. + * Set the encryption property: The encryption property. * - * @param allowPublicAccessWhenBehindVnet the allowPublicAccessWhenBehindVnet value to set. + * @param encryption the encryption value to set. * @return the WorkspacePropertiesInner object itself. */ - public WorkspacePropertiesInner withAllowPublicAccessWhenBehindVnet(Boolean allowPublicAccessWhenBehindVnet) { - this.allowPublicAccessWhenBehindVnet = allowPublicAccessWhenBehindVnet; + public WorkspacePropertiesInner withEncryption(EncryptionProperty encryption) { + this.encryption = encryption; return this; } /** - * Get the publicNetworkAccess property: Whether requests from Public Network are allowed. + * Get the existingWorkspaces property: The existingWorkspaces property. * - * @return the publicNetworkAccess value. + * @return the existingWorkspaces value. */ - public PublicNetworkAccess publicNetworkAccess() { - return this.publicNetworkAccess; + public List existingWorkspaces() { + return this.existingWorkspaces; } /** - * Set the publicNetworkAccess property: Whether requests from Public Network are allowed. + * Set the existingWorkspaces property: The existingWorkspaces property. * - * @param publicNetworkAccess the publicNetworkAccess value to set. + * @param existingWorkspaces the existingWorkspaces value to set. * @return the WorkspacePropertiesInner object itself. */ - public WorkspacePropertiesInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; + public WorkspacePropertiesInner withExistingWorkspaces(List existingWorkspaces) { + this.existingWorkspaces = existingWorkspaces; return this; } /** - * Get the privateEndpointConnections property: The list of private endpoint connections in the workspace. + * Get the featureStoreSettings property: Settings for feature store type workspace. * - * @return the privateEndpointConnections value. + * @return the featureStoreSettings value. */ - public List privateEndpointConnections() { - return this.privateEndpointConnections; + public FeatureStoreSettings featureStoreSettings() { + return this.featureStoreSettings; } /** - * Get the serverlessComputeSettings property: Settings for serverless compute created in the workspace. + * Set the featureStoreSettings property: Settings for feature store type workspace. * - * @return the serverlessComputeSettings value. + * @param featureStoreSettings the featureStoreSettings value to set. + * @return the WorkspacePropertiesInner object itself. */ - public ServerlessComputeSettings serverlessComputeSettings() { - return this.serverlessComputeSettings; + public WorkspacePropertiesInner withFeatureStoreSettings(FeatureStoreSettings featureStoreSettings) { + this.featureStoreSettings = featureStoreSettings; + return this; } /** - * Set the serverlessComputeSettings property: Settings for serverless compute created in the workspace. + * Get the friendlyName property: The friendly name for this workspace. This name in mutable. * - * @param serverlessComputeSettings the serverlessComputeSettings value to set. - * @return the WorkspacePropertiesInner object itself. + * @return the friendlyName value. */ - public WorkspacePropertiesInner withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings) { - this.serverlessComputeSettings = serverlessComputeSettings; - return this; + public String friendlyName() { + return this.friendlyName; } /** - * Get the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. + * Set the friendlyName property: The friendly name for this workspace. This name in mutable. * - * @return the sharedPrivateLinkResources value. + * @param friendlyName the friendlyName value to set. + * @return the WorkspacePropertiesInner object itself. */ - public List sharedPrivateLinkResources() { - return this.sharedPrivateLinkResources; + public WorkspacePropertiesInner withFriendlyName(String friendlyName) { + this.friendlyName = friendlyName; + return this; } /** - * Set the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. + * Get the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected + * by the service. * - * @param sharedPrivateLinkResources the sharedPrivateLinkResources value to set. - * @return the WorkspacePropertiesInner object itself. + * @return the hbiWorkspace value. */ - public WorkspacePropertiesInner - withSharedPrivateLinkResources(List sharedPrivateLinkResources) { - this.sharedPrivateLinkResources = sharedPrivateLinkResources; - return this; + public Boolean hbiWorkspace() { + return this.hbiWorkspace; } /** - * Get the notebookInfo property: The notebook info of Azure ML workspace. + * Set the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected + * by the service. * - * @return the notebookInfo value. + * @param hbiWorkspace the hbiWorkspace value to set. + * @return the WorkspacePropertiesInner object itself. */ - public NotebookResourceInfoInner notebookInfo() { - return this.notebookInfo; + public WorkspacePropertiesInner withHbiWorkspace(Boolean hbiWorkspace) { + this.hbiWorkspace = hbiWorkspace; + return this; } /** - * Get the serviceManagedResourcesSettings property: The service managed resource settings. + * Get the hubResourceId property: The hubResourceId property. * - * @return the serviceManagedResourcesSettings value. + * @return the hubResourceId value. */ - public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { - return this.serviceManagedResourcesSettings; + public String hubResourceId() { + return this.hubResourceId; } /** - * Set the serviceManagedResourcesSettings property: The service managed resource settings. + * Set the hubResourceId property: The hubResourceId property. * - * @param serviceManagedResourcesSettings the serviceManagedResourcesSettings value to set. + * @param hubResourceId the hubResourceId value to set. * @return the WorkspacePropertiesInner object itself. */ - public WorkspacePropertiesInner - withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings) { - this.serviceManagedResourcesSettings = serviceManagedResourcesSettings; + public WorkspacePropertiesInner withHubResourceId(String hubResourceId) { + this.hubResourceId = hubResourceId; return this; } /** - * Get the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. + * Get the imageBuildCompute property: The compute name for image build. * - * @return the primaryUserAssignedIdentity value. + * @return the imageBuildCompute value. */ - public String primaryUserAssignedIdentity() { - return this.primaryUserAssignedIdentity; + public String imageBuildCompute() { + return this.imageBuildCompute; } /** - * Set the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. + * Set the imageBuildCompute property: The compute name for image build. * - * @param primaryUserAssignedIdentity the primaryUserAssignedIdentity value to set. + * @param imageBuildCompute the imageBuildCompute value to set. * @return the WorkspacePropertiesInner object itself. */ - public WorkspacePropertiesInner withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity) { - this.primaryUserAssignedIdentity = primaryUserAssignedIdentity; + public WorkspacePropertiesInner withImageBuildCompute(String imageBuildCompute) { + this.imageBuildCompute = imageBuildCompute; return this; } /** - * Get the tenantId property: The tenant id associated with this workspace. + * Get the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace. * - * @return the tenantId value. + * @return the ipAllowlist value. */ - public String tenantId() { - return this.tenantId; + public List ipAllowlist() { + return this.ipAllowlist; } /** - * Get the storageHnsEnabled property: If the storage associated with the workspace has hierarchical namespace(HNS) - * enabled. + * Set the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace. * - * @return the storageHnsEnabled value. + * @param ipAllowlist the ipAllowlist value to set. + * @return the WorkspacePropertiesInner object itself. */ - public Boolean storageHnsEnabled() { - return this.storageHnsEnabled; + public WorkspacePropertiesInner withIpAllowlist(List ipAllowlist) { + this.ipAllowlist = ipAllowlist; + return this; } /** - * Get the mlFlowTrackingUri property: The URI associated with this workspace that machine learning flow must point - * at to set up tracking. + * 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 mlFlowTrackingUri value. + * @return the keyVault value. */ - public String mlFlowTrackingUri() { - return this.mlFlowTrackingUri; + public String keyVault() { + return this.keyVault; } /** - * Get the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 - * API. + * Set 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 v1LegacyMode value. + * @param keyVault the keyVault value to set. + * @return the WorkspacePropertiesInner object itself. */ - public Boolean v1LegacyMode() { - return this.v1LegacyMode; + public WorkspacePropertiesInner withKeyVault(String keyVault) { + this.keyVault = keyVault; + return this; } /** - * Set the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 - * API. + * Get the keyVaults property: The keyVaults property. * - * @param v1LegacyMode the v1LegacyMode value to set. + * @return the keyVaults value. + */ + public List keyVaults() { + return this.keyVaults; + } + + /** + * Set the keyVaults property: The keyVaults property. + * + * @param keyVaults the keyVaults value to set. * @return the WorkspacePropertiesInner object itself. */ - public WorkspacePropertiesInner withV1LegacyMode(Boolean v1LegacyMode) { - this.v1LegacyMode = v1LegacyMode; + public WorkspacePropertiesInner withKeyVaults(List keyVaults) { + this.keyVaults = keyVaults; return this; } @@ -657,82 +750,330 @@ public WorkspacePropertiesInner withManagedNetwork(ManagedNetworkSettingsInner m } /** - * Get the featureStoreSettings property: Settings for feature store type workspace. + * Get the mlFlowTrackingUri property: The URI associated with this workspace that machine learning flow must point + * at to set up tracking. * - * @return the featureStoreSettings value. + * @return the mlFlowTrackingUri value. */ - public FeatureStoreSettings featureStoreSettings() { - return this.featureStoreSettings; + public String mlFlowTrackingUri() { + return this.mlFlowTrackingUri; } /** - * Set the featureStoreSettings property: Settings for feature store type workspace. + * Get the networkAcls property: A set of rules governing the network accessibility of the workspace. * - * @param featureStoreSettings the featureStoreSettings value to set. - * @return the WorkspacePropertiesInner object itself. + * @return the networkAcls value. */ - public WorkspacePropertiesInner withFeatureStoreSettings(FeatureStoreSettings featureStoreSettings) { - this.featureStoreSettings = featureStoreSettings; - return this; + public NetworkAcls networkAcls() { + return this.networkAcls; } /** - * Get the associatedWorkspaces property: The associatedWorkspaces property. + * Set the networkAcls property: A set of rules governing the network accessibility of the workspace. * - * @return the associatedWorkspaces value. + * @param networkAcls the networkAcls value to set. + * @return the WorkspacePropertiesInner object itself. */ - public List associatedWorkspaces() { - return this.associatedWorkspaces; + public WorkspacePropertiesInner withNetworkAcls(NetworkAcls networkAcls) { + this.networkAcls = networkAcls; + return this; } /** - * Set the associatedWorkspaces property: The associatedWorkspaces property. + * Get the notebookInfo property: The notebook info of Azure ML workspace. * - * @param associatedWorkspaces the associatedWorkspaces value to set. - * @return the WorkspacePropertiesInner object itself. + * @return the notebookInfo value. */ - public WorkspacePropertiesInner withAssociatedWorkspaces(List associatedWorkspaces) { - this.associatedWorkspaces = associatedWorkspaces; - return this; + public NotebookResourceInfoInner notebookInfo() { + return this.notebookInfo; } /** - * Get the enableDataIsolation property: The enableDataIsolation property. + * Get the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the + * workspace identity. * - * @return the enableDataIsolation value. + * @return the primaryUserAssignedIdentity value. */ - public Boolean enableDataIsolation() { - return this.enableDataIsolation; + public String primaryUserAssignedIdentity() { + return this.primaryUserAssignedIdentity; } /** - * Set the enableDataIsolation property: The enableDataIsolation property. + * Set the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the + * workspace identity. * - * @param enableDataIsolation the enableDataIsolation value to set. + * @param primaryUserAssignedIdentity the primaryUserAssignedIdentity value to set. * @return the WorkspacePropertiesInner object itself. */ - public WorkspacePropertiesInner withEnableDataIsolation(Boolean enableDataIsolation) { - this.enableDataIsolation = enableDataIsolation; + public WorkspacePropertiesInner withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity) { + this.primaryUserAssignedIdentity = primaryUserAssignedIdentity; return this; } /** - * Get the hubResourceId property: The hubResourceId property. + * Get the privateEndpointConnections property: The list of private endpoint connections in the workspace. * - * @return the hubResourceId value. + * @return the privateEndpointConnections value. */ - public String hubResourceId() { - return this.hubResourceId; - } + public List privateEndpointConnections() { + return this.privateEndpointConnections; + } /** - * Set the hubResourceId property: The hubResourceId property. + * Get the privateLinkCount property: Count of private connections in the workspace. * - * @param hubResourceId the hubResourceId value to set. + * @return the privateLinkCount value. + */ + public Integer privateLinkCount() { + return this.privateLinkCount; + } + + /** + * Get the provisionNetworkNow property: Set to trigger the provisioning of the managed VNet with the default + * Options when creating a Workspace with the managed VNet enabled, or else it does nothing. + * + * @return the provisionNetworkNow value. + */ + public Boolean provisionNetworkNow() { + return this.provisionNetworkNow; + } + + /** + * Set the provisionNetworkNow property: Set to trigger the provisioning of the managed VNet with the default + * Options when creating a Workspace with the managed VNet enabled, or else it does nothing. + * + * @param provisionNetworkNow the provisionNetworkNow value to set. * @return the WorkspacePropertiesInner object itself. */ - public WorkspacePropertiesInner withHubResourceId(String hubResourceId) { - this.hubResourceId = hubResourceId; + public WorkspacePropertiesInner withProvisionNetworkNow(Boolean provisionNetworkNow) { + this.provisionNetworkNow = provisionNetworkNow; + return this; + } + + /** + * 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() { + return this.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) { + this.serviceManagedResourcesSettings = serviceManagedResourcesSettings; + return this; + } + + /** + * 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 serviceProvisionedResourceGroup() { + return this.serviceProvisionedResourceGroup; + } + + /** + * 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 + withSharedPrivateLinkResources(List sharedPrivateLinkResources) { + this.sharedPrivateLinkResources = sharedPrivateLinkResources; + 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 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() { + return this.storageHnsEnabled; + } + + /** + * Get the systemDatastoresAuthMode property: The auth mode used for accessing the system datastores of the + * workspace. + * + * @return the systemDatastoresAuthMode value. + */ + public SystemDatastoresAuthMode 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(SystemDatastoresAuthMode 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() { + 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 WorkspacePropertiesInner object itself. + */ + public WorkspacePropertiesInner withV1LegacyMode(Boolean v1LegacyMode) { + this.v1LegacyMode = v1LegacyMode; return this; } @@ -756,6 +1097,15 @@ public WorkspacePropertiesInner withWorkspaceHubConfig(WorkspaceHubConfig worksp 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. * @@ -765,26 +1115,29 @@ public void validate() { if (encryption() != null) { encryption().validate(); } - if (privateEndpointConnections() != null) { - privateEndpointConnections().forEach(e -> e.validate()); + if (featureStoreSettings() != null) { + featureStoreSettings().validate(); } - if (serverlessComputeSettings() != null) { - serverlessComputeSettings().validate(); + if (managedNetwork() != null) { + managedNetwork().validate(); } - if (sharedPrivateLinkResources() != null) { - sharedPrivateLinkResources().forEach(e -> e.validate()); + if (networkAcls() != null) { + networkAcls().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 (managedNetwork() != null) { - managedNetwork().validate(); - } - if (featureStoreSettings() != null) { - featureStoreSettings().validate(); + if (sharedPrivateLinkResources() != null) { + sharedPrivateLinkResources().forEach(e -> e.validate()); } if (workspaceHubConfig() != null) { workspaceHubConfig().validate(); @@ -797,31 +1150,48 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeStringField("friendlyName", this.friendlyName); - jsonWriter.writeStringField("keyVault", this.keyVault); + jsonWriter.writeBooleanField("allowPublicAccessWhenBehindVnet", this.allowPublicAccessWhenBehindVnet); + jsonWriter.writeBooleanField("allowRoleAssignmentOnRG", this.allowRoleAssignmentOnRG); jsonWriter.writeStringField("applicationInsights", this.applicationInsights); + jsonWriter.writeArrayField("associatedWorkspaces", this.associatedWorkspaces, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("containerRegistries", this.containerRegistries, + (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("containerRegistry", this.containerRegistry); - jsonWriter.writeStringField("storageAccount", this.storageAccount); + jsonWriter.writeStringField("description", this.description); jsonWriter.writeStringField("discoveryUrl", this.discoveryUrl); + jsonWriter.writeBooleanField("enableDataIsolation", this.enableDataIsolation); + jsonWriter.writeBooleanField("enableServiceSideCMKEncryption", this.enableServiceSideCmkEncryption); + jsonWriter.writeBooleanField("enableSimplifiedCmk", this.enableSimplifiedCmk); + jsonWriter.writeBooleanField("enableSoftwareBillOfMaterials", this.enableSoftwareBillOfMaterials); jsonWriter.writeJsonField("encryption", this.encryption); + jsonWriter.writeArrayField("existingWorkspaces", this.existingWorkspaces, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("featureStoreSettings", this.featureStoreSettings); + jsonWriter.writeStringField("friendlyName", this.friendlyName); jsonWriter.writeBooleanField("hbiWorkspace", this.hbiWorkspace); + jsonWriter.writeStringField("hubResourceId", this.hubResourceId); jsonWriter.writeStringField("imageBuildCompute", this.imageBuildCompute); - jsonWriter.writeBooleanField("allowPublicAccessWhenBehindVnet", this.allowPublicAccessWhenBehindVnet); + jsonWriter.writeArrayField("ipAllowlist", this.ipAllowlist, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("keyVault", this.keyVault); + jsonWriter.writeArrayField("keyVaults", this.keyVaults, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("managedNetwork", this.managedNetwork); + jsonWriter.writeJsonField("networkAcls", this.networkAcls); + jsonWriter.writeStringField("primaryUserAssignedIdentity", this.primaryUserAssignedIdentity); + jsonWriter.writeBooleanField("provisionNetworkNow", this.provisionNetworkNow); jsonWriter.writeStringField("publicNetworkAccess", this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString()); jsonWriter.writeJsonField("serverlessComputeSettings", this.serverlessComputeSettings); + jsonWriter.writeJsonField("serviceManagedResourcesSettings", this.serviceManagedResourcesSettings); jsonWriter.writeArrayField("sharedPrivateLinkResources", this.sharedPrivateLinkResources, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("serviceManagedResourcesSettings", this.serviceManagedResourcesSettings); - jsonWriter.writeStringField("primaryUserAssignedIdentity", this.primaryUserAssignedIdentity); - jsonWriter.writeBooleanField("v1LegacyMode", this.v1LegacyMode); - jsonWriter.writeJsonField("managedNetwork", this.managedNetwork); - jsonWriter.writeJsonField("featureStoreSettings", this.featureStoreSettings); - jsonWriter.writeArrayField("associatedWorkspaces", this.associatedWorkspaces, + jsonWriter.writeNumberField("softDeleteRetentionInDays", this.softDeleteRetentionInDays); + jsonWriter.writeStringField("storageAccount", this.storageAccount); + jsonWriter.writeArrayField("storageAccounts", this.storageAccounts, (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("enableDataIsolation", this.enableDataIsolation); - jsonWriter.writeStringField("hubResourceId", this.hubResourceId); + jsonWriter.writeStringField("systemDatastoresAuthMode", + this.systemDatastoresAuthMode == null ? null : this.systemDatastoresAuthMode.toString()); + jsonWriter.writeBooleanField("v1LegacyMode", this.v1LegacyMode); jsonWriter.writeJsonField("workspaceHubConfig", this.workspaceHubConfig); return jsonWriter.writeEndObject(); } @@ -841,81 +1211,121 @@ public static WorkspacePropertiesInner fromJson(JsonReader jsonReader) throws IO String fieldName = reader.getFieldName(); reader.nextToken(); - if ("workspaceId".equals(fieldName)) { - deserializedWorkspacePropertiesInner.workspaceId = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedWorkspacePropertiesInner.description = reader.getString(); - } else if ("friendlyName".equals(fieldName)) { - deserializedWorkspacePropertiesInner.friendlyName = reader.getString(); - } else if ("keyVault".equals(fieldName)) { - deserializedWorkspacePropertiesInner.keyVault = reader.getString(); + if ("agentsEndpointUri".equals(fieldName)) { + deserializedWorkspacePropertiesInner.agentsEndpointUri = reader.getString(); + } else if ("allowPublicAccessWhenBehindVnet".equals(fieldName)) { + deserializedWorkspacePropertiesInner.allowPublicAccessWhenBehindVnet + = reader.getNullable(JsonReader::getBoolean); + } else if ("allowRoleAssignmentOnRG".equals(fieldName)) { + deserializedWorkspacePropertiesInner.allowRoleAssignmentOnRG + = reader.getNullable(JsonReader::getBoolean); } else if ("applicationInsights".equals(fieldName)) { deserializedWorkspacePropertiesInner.applicationInsights = reader.getString(); + } else if ("associatedWorkspaces".equals(fieldName)) { + List associatedWorkspaces = reader.readArray(reader1 -> reader1.getString()); + deserializedWorkspacePropertiesInner.associatedWorkspaces = associatedWorkspaces; + } else if ("containerRegistries".equals(fieldName)) { + List containerRegistries = reader.readArray(reader1 -> reader1.getString()); + deserializedWorkspacePropertiesInner.containerRegistries = containerRegistries; } else if ("containerRegistry".equals(fieldName)) { deserializedWorkspacePropertiesInner.containerRegistry = reader.getString(); - } else if ("storageAccount".equals(fieldName)) { - deserializedWorkspacePropertiesInner.storageAccount = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedWorkspacePropertiesInner.description = reader.getString(); } else if ("discoveryUrl".equals(fieldName)) { deserializedWorkspacePropertiesInner.discoveryUrl = reader.getString(); - } else if ("provisioningState".equals(fieldName)) { - deserializedWorkspacePropertiesInner.provisioningState - = ProvisioningState.fromString(reader.getString()); + } else if ("enableDataIsolation".equals(fieldName)) { + deserializedWorkspacePropertiesInner.enableDataIsolation + = reader.getNullable(JsonReader::getBoolean); + } else if ("enableServiceSideCMKEncryption".equals(fieldName)) { + deserializedWorkspacePropertiesInner.enableServiceSideCmkEncryption + = reader.getNullable(JsonReader::getBoolean); + } else if ("enableSimplifiedCmk".equals(fieldName)) { + deserializedWorkspacePropertiesInner.enableSimplifiedCmk + = reader.getNullable(JsonReader::getBoolean); + } else if ("enableSoftwareBillOfMaterials".equals(fieldName)) { + deserializedWorkspacePropertiesInner.enableSoftwareBillOfMaterials + = reader.getNullable(JsonReader::getBoolean); } else if ("encryption".equals(fieldName)) { deserializedWorkspacePropertiesInner.encryption = EncryptionProperty.fromJson(reader); + } else if ("existingWorkspaces".equals(fieldName)) { + List existingWorkspaces = reader.readArray(reader1 -> reader1.getString()); + deserializedWorkspacePropertiesInner.existingWorkspaces = existingWorkspaces; + } else if ("featureStoreSettings".equals(fieldName)) { + deserializedWorkspacePropertiesInner.featureStoreSettings = FeatureStoreSettings.fromJson(reader); + } else if ("friendlyName".equals(fieldName)) { + deserializedWorkspacePropertiesInner.friendlyName = reader.getString(); } else if ("hbiWorkspace".equals(fieldName)) { deserializedWorkspacePropertiesInner.hbiWorkspace = reader.getNullable(JsonReader::getBoolean); - } else if ("serviceProvisionedResourceGroup".equals(fieldName)) { - deserializedWorkspacePropertiesInner.serviceProvisionedResourceGroup = reader.getString(); - } else if ("privateLinkCount".equals(fieldName)) { - deserializedWorkspacePropertiesInner.privateLinkCount = reader.getNullable(JsonReader::getInt); + } else if ("hubResourceId".equals(fieldName)) { + deserializedWorkspacePropertiesInner.hubResourceId = reader.getString(); } else if ("imageBuildCompute".equals(fieldName)) { deserializedWorkspacePropertiesInner.imageBuildCompute = reader.getString(); - } else if ("allowPublicAccessWhenBehindVnet".equals(fieldName)) { - deserializedWorkspacePropertiesInner.allowPublicAccessWhenBehindVnet - = reader.getNullable(JsonReader::getBoolean); - } else if ("publicNetworkAccess".equals(fieldName)) { - deserializedWorkspacePropertiesInner.publicNetworkAccess - = PublicNetworkAccess.fromString(reader.getString()); + } else if ("ipAllowlist".equals(fieldName)) { + List ipAllowlist = reader.readArray(reader1 -> reader1.getString()); + deserializedWorkspacePropertiesInner.ipAllowlist = ipAllowlist; + } else if ("keyVault".equals(fieldName)) { + deserializedWorkspacePropertiesInner.keyVault = reader.getString(); + } else if ("keyVaults".equals(fieldName)) { + List keyVaults = reader.readArray(reader1 -> reader1.getString()); + deserializedWorkspacePropertiesInner.keyVaults = keyVaults; + } else if ("managedNetwork".equals(fieldName)) { + deserializedWorkspacePropertiesInner.managedNetwork = ManagedNetworkSettingsInner.fromJson(reader); + } else if ("mlFlowTrackingUri".equals(fieldName)) { + deserializedWorkspacePropertiesInner.mlFlowTrackingUri = reader.getString(); + } else if ("networkAcls".equals(fieldName)) { + deserializedWorkspacePropertiesInner.networkAcls = NetworkAcls.fromJson(reader); + } else if ("notebookInfo".equals(fieldName)) { + deserializedWorkspacePropertiesInner.notebookInfo = NotebookResourceInfoInner.fromJson(reader); + } else if ("primaryUserAssignedIdentity".equals(fieldName)) { + deserializedWorkspacePropertiesInner.primaryUserAssignedIdentity = reader.getString(); } else if ("privateEndpointConnections".equals(fieldName)) { List privateEndpointConnections = reader.readArray(reader1 -> PrivateEndpointConnectionInner.fromJson(reader1)); deserializedWorkspacePropertiesInner.privateEndpointConnections = privateEndpointConnections; + } else if ("privateLinkCount".equals(fieldName)) { + deserializedWorkspacePropertiesInner.privateLinkCount = reader.getNullable(JsonReader::getInt); + } else if ("provisionNetworkNow".equals(fieldName)) { + deserializedWorkspacePropertiesInner.provisionNetworkNow + = reader.getNullable(JsonReader::getBoolean); + } else if ("provisioningState".equals(fieldName)) { + deserializedWorkspacePropertiesInner.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("publicNetworkAccess".equals(fieldName)) { + deserializedWorkspacePropertiesInner.publicNetworkAccess + = PublicNetworkAccessType.fromString(reader.getString()); } else if ("serverlessComputeSettings".equals(fieldName)) { deserializedWorkspacePropertiesInner.serverlessComputeSettings = ServerlessComputeSettings.fromJson(reader); + } else if ("serviceManagedResourcesSettings".equals(fieldName)) { + deserializedWorkspacePropertiesInner.serviceManagedResourcesSettings + = ServiceManagedResourcesSettings.fromJson(reader); + } else if ("serviceProvisionedResourceGroup".equals(fieldName)) { + deserializedWorkspacePropertiesInner.serviceProvisionedResourceGroup = reader.getString(); } else if ("sharedPrivateLinkResources".equals(fieldName)) { List sharedPrivateLinkResources = reader.readArray(reader1 -> SharedPrivateLinkResource.fromJson(reader1)); deserializedWorkspacePropertiesInner.sharedPrivateLinkResources = sharedPrivateLinkResources; - } else if ("notebookInfo".equals(fieldName)) { - deserializedWorkspacePropertiesInner.notebookInfo = NotebookResourceInfoInner.fromJson(reader); - } else if ("serviceManagedResourcesSettings".equals(fieldName)) { - deserializedWorkspacePropertiesInner.serviceManagedResourcesSettings - = ServiceManagedResourcesSettings.fromJson(reader); - } else if ("primaryUserAssignedIdentity".equals(fieldName)) { - deserializedWorkspacePropertiesInner.primaryUserAssignedIdentity = reader.getString(); - } else if ("tenantId".equals(fieldName)) { - deserializedWorkspacePropertiesInner.tenantId = reader.getString(); + } else if ("softDeleteRetentionInDays".equals(fieldName)) { + deserializedWorkspacePropertiesInner.softDeleteRetentionInDays + = reader.getNullable(JsonReader::getInt); + } else if ("storageAccount".equals(fieldName)) { + deserializedWorkspacePropertiesInner.storageAccount = reader.getString(); + } else if ("storageAccounts".equals(fieldName)) { + List storageAccounts = reader.readArray(reader1 -> reader1.getString()); + deserializedWorkspacePropertiesInner.storageAccounts = storageAccounts; } else if ("storageHnsEnabled".equals(fieldName)) { deserializedWorkspacePropertiesInner.storageHnsEnabled = reader.getNullable(JsonReader::getBoolean); - } else if ("mlFlowTrackingUri".equals(fieldName)) { - deserializedWorkspacePropertiesInner.mlFlowTrackingUri = reader.getString(); + } else if ("systemDatastoresAuthMode".equals(fieldName)) { + deserializedWorkspacePropertiesInner.systemDatastoresAuthMode + = SystemDatastoresAuthMode.fromString(reader.getString()); + } else if ("tenantId".equals(fieldName)) { + deserializedWorkspacePropertiesInner.tenantId = reader.getString(); } else if ("v1LegacyMode".equals(fieldName)) { deserializedWorkspacePropertiesInner.v1LegacyMode = reader.getNullable(JsonReader::getBoolean); - } else if ("managedNetwork".equals(fieldName)) { - deserializedWorkspacePropertiesInner.managedNetwork = ManagedNetworkSettingsInner.fromJson(reader); - } else if ("featureStoreSettings".equals(fieldName)) { - deserializedWorkspacePropertiesInner.featureStoreSettings = FeatureStoreSettings.fromJson(reader); - } else if ("associatedWorkspaces".equals(fieldName)) { - List associatedWorkspaces = reader.readArray(reader1 -> reader1.getString()); - deserializedWorkspacePropertiesInner.associatedWorkspaces = associatedWorkspaces; - } else if ("enableDataIsolation".equals(fieldName)) { - deserializedWorkspacePropertiesInner.enableDataIsolation - = reader.getNullable(JsonReader::getBoolean); - } else if ("hubResourceId".equals(fieldName)) { - deserializedWorkspacePropertiesInner.hubResourceId = reader.getString(); } else if ("workspaceHubConfig".equals(fieldName)) { deserializedWorkspacePropertiesInner.workspaceHubConfig = WorkspaceHubConfig.fromJson(reader); + } else if ("workspaceId".equals(fieldName)) { + deserializedWorkspacePropertiesInner.workspaceId = reader.getString(); } else { reader.skipChildren(); } 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 index b032dc624ca54..74abe920339f0 100644 --- 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 @@ -11,24 +11,62 @@ import com.azure.json.JsonWriter; import com.azure.resourcemanager.machinelearning.models.EncryptionUpdateProperties; import com.azure.resourcemanager.machinelearning.models.FeatureStoreSettings; -import com.azure.resourcemanager.machinelearning.models.PublicNetworkAccess; +import com.azure.resourcemanager.machinelearning.models.NetworkAcls; +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.SystemDatastoresAuthMode; import java.io.IOException; +import java.util.List; /** - * The parameters for updating the properties of a machine learning workspace. + * The parameters for updating a machine learning workspace. */ @Fluent public final class WorkspacePropertiesUpdateParametersInner implements JsonSerializable { + /* + * The allowRoleAssignmentOnRG property. + */ + private Boolean allowRoleAssignmentOnRG; + + /* + * ARM id of the application insights associated with this workspace. + */ + private String applicationInsights; + + /* + * ARM id of the container registry associated with this workspace. + */ + private String containerRegistry; + /* * The description of this workspace. */ private String description; /* - * The friendly name for this workspace. + * The enableDataIsolation property. + */ + private Boolean enableDataIsolation; + + /* + * Flag to tell if SoftwareBillOfMaterials should be enabled for this workspace + */ + private Boolean enableSoftwareBillOfMaterials; + + /* + * The encryption property. + */ + private EncryptionUpdateProperties encryption; + + /* + * Settings for feature store type workspace. + */ + private FeatureStoreSettings featureStoreSettings; + + /* + * The friendly name for this workspace. This name in mutable */ private String friendlyName; @@ -38,66 +76,121 @@ public final class WorkspacePropertiesUpdateParametersInner private String imageBuildCompute; /* - * The service managed resource settings. + * The list of IPv4 addresses that are allowed to access the workspace. */ - private ServiceManagedResourcesSettings serviceManagedResourcesSettings; + private List ipAllowlist; /* - * The user assigned identity resource id that represents the workspace identity. + * Managed Network settings for a machine learning workspace. */ - private String primaryUserAssignedIdentity; + private ManagedNetworkSettingsInner managedNetwork; /* - * Settings for serverless compute created in the workspace + * A set of rules governing the network accessibility of the workspace. */ - private ServerlessComputeSettings serverlessComputeSettings; + private NetworkAcls networkAcls; /* - * Whether requests from Public Network are allowed. + * The user assigned identity resource id that represents the workspace identity. */ - private PublicNetworkAccess publicNetworkAccess; + private String primaryUserAssignedIdentity; /* - * ARM id of the application insights associated with this workspace. + * Whether requests from Public Network are allowed. */ - private String applicationInsights; + private PublicNetworkAccessType publicNetworkAccess; /* - * ARM id of the container registry associated with this workspace. + * Settings for serverless compute in a workspace */ - private String containerRegistry; + private ServerlessComputeSettings serverlessComputeSettings; /* - * Settings for feature store type workspace. + * The service managed resource settings. */ - private FeatureStoreSettings featureStoreSettings; + private ServiceManagedResourcesSettings serviceManagedResourcesSettings; /* - * Managed Network settings for a machine learning workspace. + * Retention time in days after workspace get soft deleted. */ - private ManagedNetworkSettingsInner managedNetwork; + private Integer softDeleteRetentionInDays; /* - * The enableDataIsolation property. + * The auth mode used for accessing the system datastores of the workspace. */ - private Boolean enableDataIsolation; + private SystemDatastoresAuthMode systemDatastoresAuthMode; /* * Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. */ private Boolean v1LegacyMode; - /* - * The encryption property. - */ - private EncryptionUpdateProperties encryption; - /** * Creates an instance of WorkspacePropertiesUpdateParametersInner class. */ public WorkspacePropertiesUpdateParametersInner() { } + /** + * Get the allowRoleAssignmentOnRG property: The allowRoleAssignmentOnRG property. + * + * @return the allowRoleAssignmentOnRG value. + */ + public Boolean allowRoleAssignmentOnRG() { + return this.allowRoleAssignmentOnRG; + } + + /** + * Set the allowRoleAssignmentOnRG property: The allowRoleAssignmentOnRG property. + * + * @param allowRoleAssignmentOnRG the allowRoleAssignmentOnRG value to set. + * @return the WorkspacePropertiesUpdateParametersInner object itself. + */ + public WorkspacePropertiesUpdateParametersInner withAllowRoleAssignmentOnRG(Boolean allowRoleAssignmentOnRG) { + this.allowRoleAssignmentOnRG = allowRoleAssignmentOnRG; + 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 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. * @@ -119,7 +212,91 @@ public WorkspacePropertiesUpdateParametersInner withDescription(String descripti } /** - * Get the friendlyName property: The friendly name for this workspace. + * 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 SoftwareBillOfMaterials should be enabled for + * this workspace. + * + * @return the enableSoftwareBillOfMaterials value. + */ + public Boolean enableSoftwareBillOfMaterials() { + return this.enableSoftwareBillOfMaterials; + } + + /** + * Set the enableSoftwareBillOfMaterials property: Flag to tell if SoftwareBillOfMaterials 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. */ @@ -128,7 +305,7 @@ public String friendlyName() { } /** - * Set the friendlyName property: The friendly name for this workspace. + * 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. @@ -159,188 +336,191 @@ public WorkspacePropertiesUpdateParametersInner withImageBuildCompute(String ima } /** - * Get the serviceManagedResourcesSettings property: The service managed resource settings. + * Get the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace. * - * @return the serviceManagedResourcesSettings value. + * @return the ipAllowlist value. */ - public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { - return this.serviceManagedResourcesSettings; + public List ipAllowlist() { + return this.ipAllowlist; } /** - * Set the serviceManagedResourcesSettings property: The service managed resource settings. + * Set the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace. * - * @param serviceManagedResourcesSettings the serviceManagedResourcesSettings value to set. + * @param ipAllowlist the ipAllowlist value to set. * @return the WorkspacePropertiesUpdateParametersInner object itself. */ - public WorkspacePropertiesUpdateParametersInner - withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings) { - this.serviceManagedResourcesSettings = serviceManagedResourcesSettings; + public WorkspacePropertiesUpdateParametersInner withIpAllowlist(List ipAllowlist) { + this.ipAllowlist = ipAllowlist; return this; } /** - * Get the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. + * Get the managedNetwork property: Managed Network settings for a machine learning workspace. * - * @return the primaryUserAssignedIdentity value. + * @return the managedNetwork value. */ - public String primaryUserAssignedIdentity() { - return this.primaryUserAssignedIdentity; + public ManagedNetworkSettingsInner managedNetwork() { + return this.managedNetwork; } /** - * Set the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. + * Set the managedNetwork property: Managed Network settings for a machine learning workspace. * - * @param primaryUserAssignedIdentity the primaryUserAssignedIdentity value to set. + * @param managedNetwork the managedNetwork value to set. * @return the WorkspacePropertiesUpdateParametersInner object itself. */ - public WorkspacePropertiesUpdateParametersInner - withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity) { - this.primaryUserAssignedIdentity = primaryUserAssignedIdentity; + public WorkspacePropertiesUpdateParametersInner withManagedNetwork(ManagedNetworkSettingsInner managedNetwork) { + this.managedNetwork = managedNetwork; return this; } /** - * Get the serverlessComputeSettings property: Settings for serverless compute created in the workspace. + * Get the networkAcls property: A set of rules governing the network accessibility of the workspace. * - * @return the serverlessComputeSettings value. + * @return the networkAcls value. */ - public ServerlessComputeSettings serverlessComputeSettings() { - return this.serverlessComputeSettings; + public NetworkAcls networkAcls() { + return this.networkAcls; } /** - * Set the serverlessComputeSettings property: Settings for serverless compute created in the workspace. + * Set the networkAcls property: A set of rules governing the network accessibility of the workspace. * - * @param serverlessComputeSettings the serverlessComputeSettings value to set. + * @param networkAcls the networkAcls value to set. * @return the WorkspacePropertiesUpdateParametersInner object itself. */ - public WorkspacePropertiesUpdateParametersInner - withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings) { - this.serverlessComputeSettings = serverlessComputeSettings; + public WorkspacePropertiesUpdateParametersInner withNetworkAcls(NetworkAcls networkAcls) { + this.networkAcls = networkAcls; return this; } /** - * Get the publicNetworkAccess property: Whether requests from Public Network are allowed. + * Get the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the + * workspace identity. * - * @return the publicNetworkAccess value. + * @return the primaryUserAssignedIdentity value. */ - public PublicNetworkAccess publicNetworkAccess() { - return this.publicNetworkAccess; + public String primaryUserAssignedIdentity() { + return this.primaryUserAssignedIdentity; } /** - * Set the publicNetworkAccess property: Whether requests from Public Network are allowed. + * Set the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the + * workspace identity. * - * @param publicNetworkAccess the publicNetworkAccess value to set. + * @param primaryUserAssignedIdentity the primaryUserAssignedIdentity value to set. * @return the WorkspacePropertiesUpdateParametersInner object itself. */ - public WorkspacePropertiesUpdateParametersInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; + public WorkspacePropertiesUpdateParametersInner + withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity) { + this.primaryUserAssignedIdentity = primaryUserAssignedIdentity; return this; } /** - * Get the applicationInsights property: ARM id of the application insights associated with this workspace. + * Get the publicNetworkAccess property: Whether requests from Public Network are allowed. * - * @return the applicationInsights value. + * @return the publicNetworkAccess value. */ - public String applicationInsights() { - return this.applicationInsights; + public PublicNetworkAccessType publicNetworkAccess() { + return this.publicNetworkAccess; } /** - * Set the applicationInsights property: ARM id of the application insights associated with this workspace. + * Set the publicNetworkAccess property: Whether requests from Public Network are allowed. * - * @param applicationInsights the applicationInsights value to set. + * @param publicNetworkAccess the publicNetworkAccess value to set. * @return the WorkspacePropertiesUpdateParametersInner object itself. */ - public WorkspacePropertiesUpdateParametersInner withApplicationInsights(String applicationInsights) { - this.applicationInsights = applicationInsights; + public WorkspacePropertiesUpdateParametersInner + withPublicNetworkAccess(PublicNetworkAccessType publicNetworkAccess) { + this.publicNetworkAccess = publicNetworkAccess; return this; } /** - * Get the containerRegistry property: ARM id of the container registry associated with this workspace. + * Get the serverlessComputeSettings property: Settings for serverless compute in a workspace. * - * @return the containerRegistry value. + * @return the serverlessComputeSettings value. */ - public String containerRegistry() { - return this.containerRegistry; + public ServerlessComputeSettings serverlessComputeSettings() { + return this.serverlessComputeSettings; } /** - * Set the containerRegistry property: ARM id of the container registry associated with this workspace. + * Set the serverlessComputeSettings property: Settings for serverless compute in a workspace. * - * @param containerRegistry the containerRegistry value to set. + * @param serverlessComputeSettings the serverlessComputeSettings value to set. * @return the WorkspacePropertiesUpdateParametersInner object itself. */ - public WorkspacePropertiesUpdateParametersInner withContainerRegistry(String containerRegistry) { - this.containerRegistry = containerRegistry; + public WorkspacePropertiesUpdateParametersInner + withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings) { + this.serverlessComputeSettings = serverlessComputeSettings; return this; } /** - * Get the featureStoreSettings property: Settings for feature store type workspace. + * Get the serviceManagedResourcesSettings property: The service managed resource settings. * - * @return the featureStoreSettings value. + * @return the serviceManagedResourcesSettings value. */ - public FeatureStoreSettings featureStoreSettings() { - return this.featureStoreSettings; + public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { + return this.serviceManagedResourcesSettings; } /** - * Set the featureStoreSettings property: Settings for feature store type workspace. + * Set the serviceManagedResourcesSettings property: The service managed resource settings. * - * @param featureStoreSettings the featureStoreSettings value to set. + * @param serviceManagedResourcesSettings the serviceManagedResourcesSettings value to set. * @return the WorkspacePropertiesUpdateParametersInner object itself. */ public WorkspacePropertiesUpdateParametersInner - withFeatureStoreSettings(FeatureStoreSettings featureStoreSettings) { - this.featureStoreSettings = featureStoreSettings; + withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings) { + this.serviceManagedResourcesSettings = serviceManagedResourcesSettings; return this; } /** - * Get the managedNetwork property: Managed Network settings for a machine learning workspace. + * Get the softDeleteRetentionInDays property: Retention time in days after workspace get soft deleted. * - * @return the managedNetwork value. + * @return the softDeleteRetentionInDays value. */ - public ManagedNetworkSettingsInner managedNetwork() { - return this.managedNetwork; + public Integer softDeleteRetentionInDays() { + return this.softDeleteRetentionInDays; } /** - * Set the managedNetwork property: Managed Network settings for a machine learning workspace. + * Set the softDeleteRetentionInDays property: Retention time in days after workspace get soft deleted. * - * @param managedNetwork the managedNetwork value to set. + * @param softDeleteRetentionInDays the softDeleteRetentionInDays value to set. * @return the WorkspacePropertiesUpdateParametersInner object itself. */ - public WorkspacePropertiesUpdateParametersInner withManagedNetwork(ManagedNetworkSettingsInner managedNetwork) { - this.managedNetwork = managedNetwork; + public WorkspacePropertiesUpdateParametersInner withSoftDeleteRetentionInDays(Integer softDeleteRetentionInDays) { + this.softDeleteRetentionInDays = softDeleteRetentionInDays; return this; } /** - * Get the enableDataIsolation property: The enableDataIsolation property. + * Get the systemDatastoresAuthMode property: The auth mode used for accessing the system datastores of the + * workspace. * - * @return the enableDataIsolation value. + * @return the systemDatastoresAuthMode value. */ - public Boolean enableDataIsolation() { - return this.enableDataIsolation; + public SystemDatastoresAuthMode systemDatastoresAuthMode() { + return this.systemDatastoresAuthMode; } /** - * Set the enableDataIsolation property: The enableDataIsolation property. + * Set the systemDatastoresAuthMode property: The auth mode used for accessing the system datastores of the + * workspace. * - * @param enableDataIsolation the enableDataIsolation value to set. + * @param systemDatastoresAuthMode the systemDatastoresAuthMode value to set. * @return the WorkspacePropertiesUpdateParametersInner object itself. */ - public WorkspacePropertiesUpdateParametersInner withEnableDataIsolation(Boolean enableDataIsolation) { - this.enableDataIsolation = enableDataIsolation; + public WorkspacePropertiesUpdateParametersInner + withSystemDatastoresAuthMode(SystemDatastoresAuthMode systemDatastoresAuthMode) { + this.systemDatastoresAuthMode = systemDatastoresAuthMode; return this; } @@ -366,37 +546,14 @@ public WorkspacePropertiesUpdateParametersInner withV1LegacyMode(Boolean v1Legac 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; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (serviceManagedResourcesSettings() != null) { - serviceManagedResourcesSettings().validate(); - } - if (serverlessComputeSettings() != null) { - serverlessComputeSettings().validate(); + if (encryption() != null) { + encryption().validate(); } if (featureStoreSettings() != null) { featureStoreSettings().validate(); @@ -404,8 +561,14 @@ public void validate() { if (managedNetwork() != null) { managedNetwork().validate(); } - if (encryption() != null) { - encryption().validate(); + if (networkAcls() != null) { + networkAcls().validate(); + } + if (serverlessComputeSettings() != null) { + serverlessComputeSettings().validate(); + } + if (serviceManagedResourcesSettings() != null) { + serviceManagedResourcesSettings().validate(); } } @@ -415,21 +578,28 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("allowRoleAssignmentOnRG", this.allowRoleAssignmentOnRG); + jsonWriter.writeStringField("applicationInsights", this.applicationInsights); + jsonWriter.writeStringField("containerRegistry", this.containerRegistry); jsonWriter.writeStringField("description", this.description); + jsonWriter.writeBooleanField("enableDataIsolation", this.enableDataIsolation); + jsonWriter.writeBooleanField("enableSoftwareBillOfMaterials", this.enableSoftwareBillOfMaterials); + jsonWriter.writeJsonField("encryption", this.encryption); + jsonWriter.writeJsonField("featureStoreSettings", this.featureStoreSettings); jsonWriter.writeStringField("friendlyName", this.friendlyName); jsonWriter.writeStringField("imageBuildCompute", this.imageBuildCompute); - jsonWriter.writeJsonField("serviceManagedResourcesSettings", this.serviceManagedResourcesSettings); + jsonWriter.writeArrayField("ipAllowlist", this.ipAllowlist, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("managedNetwork", this.managedNetwork); + jsonWriter.writeJsonField("networkAcls", this.networkAcls); jsonWriter.writeStringField("primaryUserAssignedIdentity", this.primaryUserAssignedIdentity); - jsonWriter.writeJsonField("serverlessComputeSettings", this.serverlessComputeSettings); jsonWriter.writeStringField("publicNetworkAccess", this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString()); - jsonWriter.writeStringField("applicationInsights", this.applicationInsights); - jsonWriter.writeStringField("containerRegistry", this.containerRegistry); - jsonWriter.writeJsonField("featureStoreSettings", this.featureStoreSettings); - jsonWriter.writeJsonField("managedNetwork", this.managedNetwork); - jsonWriter.writeBooleanField("enableDataIsolation", this.enableDataIsolation); + jsonWriter.writeJsonField("serverlessComputeSettings", this.serverlessComputeSettings); + jsonWriter.writeJsonField("serviceManagedResourcesSettings", this.serviceManagedResourcesSettings); + jsonWriter.writeNumberField("softDeleteRetentionInDays", this.softDeleteRetentionInDays); + jsonWriter.writeStringField("systemDatastoresAuthMode", + this.systemDatastoresAuthMode == null ? null : this.systemDatastoresAuthMode.toString()); jsonWriter.writeBooleanField("v1LegacyMode", this.v1LegacyMode); - jsonWriter.writeJsonField("encryption", this.encryption); return jsonWriter.writeEndObject(); } @@ -449,43 +619,60 @@ public static WorkspacePropertiesUpdateParametersInner fromJson(JsonReader jsonR String fieldName = reader.getFieldName(); reader.nextToken(); - if ("description".equals(fieldName)) { + if ("allowRoleAssignmentOnRG".equals(fieldName)) { + deserializedWorkspacePropertiesUpdateParametersInner.allowRoleAssignmentOnRG + = reader.getNullable(JsonReader::getBoolean); + } else if ("applicationInsights".equals(fieldName)) { + deserializedWorkspacePropertiesUpdateParametersInner.applicationInsights = reader.getString(); + } else if ("containerRegistry".equals(fieldName)) { + deserializedWorkspacePropertiesUpdateParametersInner.containerRegistry = reader.getString(); + } else if ("description".equals(fieldName)) { deserializedWorkspacePropertiesUpdateParametersInner.description = reader.getString(); + } else if ("enableDataIsolation".equals(fieldName)) { + deserializedWorkspacePropertiesUpdateParametersInner.enableDataIsolation + = reader.getNullable(JsonReader::getBoolean); + } else if ("enableSoftwareBillOfMaterials".equals(fieldName)) { + deserializedWorkspacePropertiesUpdateParametersInner.enableSoftwareBillOfMaterials + = reader.getNullable(JsonReader::getBoolean); + } else if ("encryption".equals(fieldName)) { + deserializedWorkspacePropertiesUpdateParametersInner.encryption + = EncryptionUpdateProperties.fromJson(reader); + } else if ("featureStoreSettings".equals(fieldName)) { + deserializedWorkspacePropertiesUpdateParametersInner.featureStoreSettings + = FeatureStoreSettings.fromJson(reader); } else if ("friendlyName".equals(fieldName)) { deserializedWorkspacePropertiesUpdateParametersInner.friendlyName = reader.getString(); } else if ("imageBuildCompute".equals(fieldName)) { deserializedWorkspacePropertiesUpdateParametersInner.imageBuildCompute = reader.getString(); - } else if ("serviceManagedResourcesSettings".equals(fieldName)) { - deserializedWorkspacePropertiesUpdateParametersInner.serviceManagedResourcesSettings - = ServiceManagedResourcesSettings.fromJson(reader); + } else if ("ipAllowlist".equals(fieldName)) { + List ipAllowlist = reader.readArray(reader1 -> reader1.getString()); + deserializedWorkspacePropertiesUpdateParametersInner.ipAllowlist = ipAllowlist; + } else if ("managedNetwork".equals(fieldName)) { + deserializedWorkspacePropertiesUpdateParametersInner.managedNetwork + = ManagedNetworkSettingsInner.fromJson(reader); + } else if ("networkAcls".equals(fieldName)) { + deserializedWorkspacePropertiesUpdateParametersInner.networkAcls = NetworkAcls.fromJson(reader); } else if ("primaryUserAssignedIdentity".equals(fieldName)) { deserializedWorkspacePropertiesUpdateParametersInner.primaryUserAssignedIdentity = reader.getString(); + } else if ("publicNetworkAccess".equals(fieldName)) { + deserializedWorkspacePropertiesUpdateParametersInner.publicNetworkAccess + = PublicNetworkAccessType.fromString(reader.getString()); } else if ("serverlessComputeSettings".equals(fieldName)) { deserializedWorkspacePropertiesUpdateParametersInner.serverlessComputeSettings = ServerlessComputeSettings.fromJson(reader); - } else if ("publicNetworkAccess".equals(fieldName)) { - deserializedWorkspacePropertiesUpdateParametersInner.publicNetworkAccess - = PublicNetworkAccess.fromString(reader.getString()); - } else if ("applicationInsights".equals(fieldName)) { - deserializedWorkspacePropertiesUpdateParametersInner.applicationInsights = reader.getString(); - } else if ("containerRegistry".equals(fieldName)) { - deserializedWorkspacePropertiesUpdateParametersInner.containerRegistry = reader.getString(); - } else if ("featureStoreSettings".equals(fieldName)) { - deserializedWorkspacePropertiesUpdateParametersInner.featureStoreSettings - = FeatureStoreSettings.fromJson(reader); - } else if ("managedNetwork".equals(fieldName)) { - deserializedWorkspacePropertiesUpdateParametersInner.managedNetwork - = ManagedNetworkSettingsInner.fromJson(reader); - } else if ("enableDataIsolation".equals(fieldName)) { - deserializedWorkspacePropertiesUpdateParametersInner.enableDataIsolation - = reader.getNullable(JsonReader::getBoolean); + } else if ("serviceManagedResourcesSettings".equals(fieldName)) { + deserializedWorkspacePropertiesUpdateParametersInner.serviceManagedResourcesSettings + = ServiceManagedResourcesSettings.fromJson(reader); + } else if ("softDeleteRetentionInDays".equals(fieldName)) { + deserializedWorkspacePropertiesUpdateParametersInner.softDeleteRetentionInDays + = reader.getNullable(JsonReader::getInt); + } else if ("systemDatastoresAuthMode".equals(fieldName)) { + deserializedWorkspacePropertiesUpdateParametersInner.systemDatastoresAuthMode + = SystemDatastoresAuthMode.fromString(reader.getString()); } else if ("v1LegacyMode".equals(fieldName)) { deserializedWorkspacePropertiesUpdateParametersInner.v1LegacyMode = reader.getNullable(JsonReader::getBoolean); - } else if ("encryption".equals(fieldName)) { - deserializedWorkspacePropertiesUpdateParametersInner.encryption - = EncryptionUpdateProperties.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AccountApiKeysImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AccountApiKeysImpl.java new file mode 100644 index 0000000000000..4c120c42f153a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AccountApiKeysImpl.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.resourcemanager.machinelearning.fluent.models.AccountApiKeysInner; +import com.azure.resourcemanager.machinelearning.models.AccountApiKeys; + +public final class AccountApiKeysImpl implements AccountApiKeys { + private AccountApiKeysInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + AccountApiKeysImpl(AccountApiKeysInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String key1() { + return this.innerModel().key1(); + } + + public String key2() { + return this.innerModel().key2(); + } + + public AccountApiKeysInner 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/AvailableQuotaImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AvailableQuotaImpl.java new file mode 100644 index 0000000000000..d546df281eb20 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AvailableQuotaImpl.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.AvailableQuotaInner; +import com.azure.resourcemanager.machinelearning.models.AvailableQuota; +import com.azure.resourcemanager.machinelearning.models.AvailableQuotaProperties; + +public final class AvailableQuotaImpl implements AvailableQuota { + private AvailableQuotaInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + AvailableQuotaImpl(AvailableQuotaInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public AvailableQuotaProperties properties() { + return this.innerModel().properties(); + } + + public AvailableQuotaInner 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/AzureMachineLearningWorkspacesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningWorkspacesImpl.java index 9fb3b79b1f9b1..f22f797c77ccb 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningWorkspacesImpl.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningWorkspacesImpl.java @@ -13,8 +13,8 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.exception.ManagementError; import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollerFactory; 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; @@ -26,14 +26,24 @@ 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.CapabilityHostsClient; 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.ConnectionRaiBlocklistItemsClient; +import com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsOperationsClient; +import com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistOperationsClient; +import com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistsClient; +import com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiPoliciesClient; +import com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiPolicyOperationsClient; +import com.azure.resourcemanager.machinelearning.fluent.ConnectionsClient; import com.azure.resourcemanager.machinelearning.fluent.DataContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.DatastoresClient; 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; @@ -41,6 +51,9 @@ 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.ManagedNetworkProvisionsClient; import com.azure.resourcemanager.machinelearning.fluent.ManagedNetworkSettingsRulesClient; @@ -52,7 +65,10 @@ 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.PtuQuotasClient; import com.azure.resourcemanager.machinelearning.fluent.QuotasClient; +import com.azure.resourcemanager.machinelearning.fluent.RaiPoliciesClient; +import com.azure.resourcemanager.machinelearning.fluent.RaiPolicyOperationsClient; import com.azure.resourcemanager.machinelearning.fluent.RegistriesClient; import com.azure.resourcemanager.machinelearning.fluent.RegistryCodeContainersClient; import com.azure.resourcemanager.machinelearning.fluent.RegistryCodeVersionsClient; @@ -170,34 +186,6 @@ 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. */ @@ -255,73 +243,17 @@ public ComputesClient getComputes() { } /** - * 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. + * The PtuQuotasClient object to access its operations. */ - private final PrivateLinkResourcesClient privateLinkResources; + private final PtuQuotasClient ptuQuotas; /** - * Gets the PrivateLinkResourcesClient object to access its operations. + * Gets the PtuQuotasClient object to access its operations. * - * @return the PrivateLinkResourcesClient object. + * @return the PtuQuotasClient 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 ManagedNetworkSettingsRulesClient object to access its operations. - */ - private final ManagedNetworkSettingsRulesClient managedNetworkSettingsRules; - - /** - * Gets the ManagedNetworkSettingsRulesClient object to access its operations. - * - * @return the ManagedNetworkSettingsRulesClient object. - */ - public ManagedNetworkSettingsRulesClient getManagedNetworkSettingsRules() { - return this.managedNetworkSettingsRules; - } - - /** - * The ManagedNetworkProvisionsClient object to access its operations. - */ - private final ManagedNetworkProvisionsClient managedNetworkProvisions; - - /** - * Gets the ManagedNetworkProvisionsClient object to access its operations. - * - * @return the ManagedNetworkProvisionsClient object. - */ - public ManagedNetworkProvisionsClient getManagedNetworkProvisions() { - return this.managedNetworkProvisions; + public PtuQuotasClient getPtuQuotas() { + return this.ptuQuotas; } /** @@ -506,6 +438,20 @@ public BatchDeploymentsClient getBatchDeployments() { return this.batchDeployments; } + /** + * The CapabilityHostsClient object to access its operations. + */ + private final CapabilityHostsClient capabilityHosts; + + /** + * Gets the CapabilityHostsClient object to access its operations. + * + * @return the CapabilityHostsClient object. + */ + public CapabilityHostsClient getCapabilityHosts() { + return this.capabilityHosts; + } + /** * The CodeContainersClient object to access its operations. */ @@ -702,6 +648,48 @@ 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. */ @@ -842,6 +830,258 @@ 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 ConnectionsClient object to access its operations. + */ + private final ConnectionsClient connections; + + /** + * Gets the ConnectionsClient object to access its operations. + * + * @return the ConnectionsClient object. + */ + public ConnectionsClient getConnections() { + return this.connections; + } + + /** + * The ConnectionRaiBlocklistsClient object to access its operations. + */ + private final ConnectionRaiBlocklistsClient connectionRaiBlocklists; + + /** + * Gets the ConnectionRaiBlocklistsClient object to access its operations. + * + * @return the ConnectionRaiBlocklistsClient object. + */ + public ConnectionRaiBlocklistsClient getConnectionRaiBlocklists() { + return this.connectionRaiBlocklists; + } + + /** + * The ConnectionRaiBlocklistOperationsClient object to access its operations. + */ + private final ConnectionRaiBlocklistOperationsClient connectionRaiBlocklistOperations; + + /** + * Gets the ConnectionRaiBlocklistOperationsClient object to access its operations. + * + * @return the ConnectionRaiBlocklistOperationsClient object. + */ + public ConnectionRaiBlocklistOperationsClient getConnectionRaiBlocklistOperations() { + return this.connectionRaiBlocklistOperations; + } + + /** + * The ConnectionRaiBlocklistItemsClient object to access its operations. + */ + private final ConnectionRaiBlocklistItemsClient connectionRaiBlocklistItems; + + /** + * Gets the ConnectionRaiBlocklistItemsClient object to access its operations. + * + * @return the ConnectionRaiBlocklistItemsClient object. + */ + public ConnectionRaiBlocklistItemsClient getConnectionRaiBlocklistItems() { + return this.connectionRaiBlocklistItems; + } + + /** + * The ConnectionRaiBlocklistItemsOperationsClient object to access its operations. + */ + private final ConnectionRaiBlocklistItemsOperationsClient connectionRaiBlocklistItemsOperations; + + /** + * Gets the ConnectionRaiBlocklistItemsOperationsClient object to access its operations. + * + * @return the ConnectionRaiBlocklistItemsOperationsClient object. + */ + public ConnectionRaiBlocklistItemsOperationsClient getConnectionRaiBlocklistItemsOperations() { + return this.connectionRaiBlocklistItemsOperations; + } + + /** + * The ConnectionRaiPoliciesClient object to access its operations. + */ + private final ConnectionRaiPoliciesClient connectionRaiPolicies; + + /** + * Gets the ConnectionRaiPoliciesClient object to access its operations. + * + * @return the ConnectionRaiPoliciesClient object. + */ + public ConnectionRaiPoliciesClient getConnectionRaiPolicies() { + return this.connectionRaiPolicies; + } + + /** + * The ConnectionRaiPolicyOperationsClient object to access its operations. + */ + private final ConnectionRaiPolicyOperationsClient connectionRaiPolicyOperations; + + /** + * Gets the ConnectionRaiPolicyOperationsClient object to access its operations. + * + * @return the ConnectionRaiPolicyOperationsClient object. + */ + public ConnectionRaiPolicyOperationsClient getConnectionRaiPolicyOperations() { + return this.connectionRaiPolicyOperations; + } + + /** + * 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 RaiPoliciesClient object to access its operations. + */ + private final RaiPoliciesClient raiPolicies; + + /** + * Gets the RaiPoliciesClient object to access its operations. + * + * @return the RaiPoliciesClient object. + */ + public RaiPoliciesClient getRaiPolicies() { + return this.raiPolicies; + } + + /** + * The RaiPolicyOperationsClient object to access its operations. + */ + private final RaiPolicyOperationsClient raiPolicyOperations; + + /** + * Gets the RaiPolicyOperationsClient object to access its operations. + * + * @return the RaiPolicyOperationsClient object. + */ + public RaiPolicyOperationsClient getRaiPolicyOperations() { + return this.raiPolicyOperations; + } + + /** + * 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 AzureMachineLearningWorkspaces client. * @@ -859,18 +1099,12 @@ public WorkspaceFeaturesClient getWorkspaceFeatures() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2024-04-01"; - this.operations = new OperationsClientImpl(this); - this.workspaces = new WorkspacesClientImpl(this); + this.apiVersion = "2025-01-01-preview"; 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.managedNetworkSettingsRules = new ManagedNetworkSettingsRulesClientImpl(this); - this.managedNetworkProvisions = new ManagedNetworkProvisionsClientImpl(this); + this.ptuQuotas = new PtuQuotasClientImpl(this); this.registryCodeContainers = new RegistryCodeContainersClientImpl(this); this.registryCodeVersions = new RegistryCodeVersionsClientImpl(this); this.registryComponentContainers = new RegistryComponentContainersClientImpl(this); @@ -884,6 +1118,7 @@ public WorkspaceFeaturesClient getWorkspaceFeatures() { this.registryModelVersions = new RegistryModelVersionsClientImpl(this); this.batchEndpoints = new BatchEndpointsClientImpl(this); this.batchDeployments = new BatchDeploymentsClientImpl(this); + this.capabilityHosts = new CapabilityHostsClientImpl(this); this.codeContainers = new CodeContainersClientImpl(this); this.codeVersions = new CodeVersionsClientImpl(this); this.componentContainers = new ComponentContainersClientImpl(this); @@ -898,6 +1133,9 @@ public WorkspaceFeaturesClient getWorkspaceFeatures() { 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.marketplaceSubscriptions = new MarketplaceSubscriptionsClientImpl(this); this.modelContainers = new ModelContainersClientImpl(this); @@ -908,6 +1146,24 @@ public WorkspaceFeaturesClient getWorkspaceFeatures() { 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.connections = new ConnectionsClientImpl(this); + this.connectionRaiBlocklists = new ConnectionRaiBlocklistsClientImpl(this); + this.connectionRaiBlocklistOperations = new ConnectionRaiBlocklistOperationsClientImpl(this); + this.connectionRaiBlocklistItems = new ConnectionRaiBlocklistItemsClientImpl(this); + this.connectionRaiBlocklistItemsOperations = new ConnectionRaiBlocklistItemsOperationsClientImpl(this); + this.connectionRaiPolicies = new ConnectionRaiPoliciesClientImpl(this); + this.connectionRaiPolicyOperations = new ConnectionRaiPolicyOperationsClientImpl(this); + this.endpointDeployments = new EndpointDeploymentsClientImpl(this); + this.endpoints = new EndpointsClientImpl(this); + this.raiPolicies = new RaiPoliciesClientImpl(this); + this.raiPolicyOperations = new RaiPolicyOperationsClientImpl(this); + this.managedNetworkSettingsRules = new ManagedNetworkSettingsRulesClientImpl(this); + this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); + this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); + this.managedNetworkProvisions = new ManagedNetworkProvisionsClientImpl(this); } /** 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 438b2bd3c3555..91b616906e5f0 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 @@ -47,16 +47,16 @@ public Map tags() { } } - public BatchDeploymentProperties properties() { - return this.innerModel().properties(); + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); } public String kind() { return this.innerModel().kind(); } - public ManagedServiceIdentity identity() { - return this.innerModel().identity(); + public BatchDeploymentProperties properties() { + return this.innerModel().properties(); } public Sku sku() { @@ -196,13 +196,13 @@ public BatchDeploymentImpl withTags(Map tags) { } } - public BatchDeploymentImpl withKind(String kind) { - this.innerModel().withKind(kind); + public BatchDeploymentImpl withIdentity(ManagedServiceIdentity identity) { + this.innerModel().withIdentity(identity); return this; } - public BatchDeploymentImpl withIdentity(ManagedServiceIdentity identity) { - this.innerModel().withIdentity(identity); + public BatchDeploymentImpl withKind(String kind) { + this.innerModel().withKind(kind); return this; } 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 f9067b4de92ca..5f0f014d02c3a 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 @@ -49,16 +49,16 @@ public Map tags() { } } - public BatchEndpointProperties properties() { - return this.innerModel().properties(); + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); } public String kind() { return this.innerModel().kind(); } - public ManagedServiceIdentity identity() { - return this.innerModel().identity(); + public BatchEndpointProperties properties() { + return this.innerModel().properties(); } public Sku sku() { @@ -201,13 +201,13 @@ public BatchEndpointImpl withTags(Map tags) { } } - public BatchEndpointImpl withKind(String kind) { - this.innerModel().withKind(kind); + public BatchEndpointImpl withIdentity(ManagedServiceIdentity identity) { + this.innerModel().withIdentity(identity); return this; } - public BatchEndpointImpl withIdentity(ManagedServiceIdentity identity) { - this.innerModel().withIdentity(identity); + public BatchEndpointImpl withKind(String kind) { + this.innerModel().withKind(kind); return this; } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapabilityHostImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapabilityHostImpl.java new file mode 100644 index 0000000000000..3f6c53b73beec --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapabilityHostImpl.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.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.CapabilityHostInner; +import com.azure.resourcemanager.machinelearning.models.CapabilityHost; +import com.azure.resourcemanager.machinelearning.models.CapabilityHostProperties; + +public final class CapabilityHostImpl implements CapabilityHost, CapabilityHost.Definition, CapabilityHost.Update { + private CapabilityHostInner 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 CapabilityHostProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public CapabilityHostInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private String name; + + public CapabilityHostImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + return this; + } + + public CapabilityHost create() { + this.innerObject = serviceManager.serviceClient() + .getCapabilityHosts() + .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE); + return this; + } + + public CapabilityHost create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getCapabilityHosts() + .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), context); + return this; + } + + CapabilityHostImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new CapabilityHostInner(); + this.serviceManager = serviceManager; + this.name = name; + } + + public CapabilityHostImpl update() { + return this; + } + + public CapabilityHost apply() { + this.innerObject = serviceManager.serviceClient() + .getCapabilityHosts() + .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE); + return this; + } + + public CapabilityHost apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getCapabilityHosts() + .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), context); + return this; + } + + CapabilityHostImpl(CapabilityHostInner 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(), "capabilityHosts"); + } + + public CapabilityHost refresh() { + this.innerObject = serviceManager.serviceClient() + .getCapabilityHosts() + .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) + .getValue(); + return this; + } + + public CapabilityHost refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getCapabilityHosts() + .getWithResponse(resourceGroupName, workspaceName, name, context) + .getValue(); + return this; + } + + public CapabilityHostImpl withProperties(CapabilityHostProperties properties) { + this.innerModel().withProperties(properties); + return this; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapabilityHostsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapabilityHostsClientImpl.java new file mode 100644 index 0000000000000..0d3c4c8eccbc5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapabilityHostsClientImpl.java @@ -0,0 +1,696 @@ +// Copyright (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.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.CapabilityHostsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.CapabilityHostInner; +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 CapabilityHostsClient. + */ +public final class CapabilityHostsClientImpl implements CapabilityHostsClient { + /** + * The proxy service used to perform REST calls. + */ + private final CapabilityHostsService service; + + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningWorkspacesImpl client; + + /** + * Initializes an instance of CapabilityHostsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + CapabilityHostsClientImpl(AzureMachineLearningWorkspacesImpl client) { + this.service + = RestProxy.create(CapabilityHostsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningWorkspacesCapabilityHosts to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface CapabilityHostsService { + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/capabilityHosts/{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}/capabilityHosts/{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}/capabilityHosts/{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") CapabilityHostInner body, @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Delete capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost 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 capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost 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 capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost 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 capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost 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 capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost 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 capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost 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 capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost 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 capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost 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 capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost 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 capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost 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 capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost 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 capabilityHost 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 capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost 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 capabilityHost 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 capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost 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 capabilityHost 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 capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost 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 capabilityHost 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 capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost 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 capabilityHost. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CapabilityHostInner get(String resourceGroupName, String workspaceName, String name) { + return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); + } + + /** + * Create or update capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost name. + * @param body CapabilityHost definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request 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, CapabilityHostInner 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 capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost name. + * @param body CapabilityHost definition. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request 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, CapabilityHostInner 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 capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost name. + * @param body CapabilityHost definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, CapabilityHostInner> beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String name, CapabilityHostInner body) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + CapabilityHostInner.class, CapabilityHostInner.class, this.client.getContext()); + } + + /** + * Create or update capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost name. + * @param body CapabilityHost definition. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, CapabilityHostInner> beginCreateOrUpdateAsync( + String resourceGroupName, String workspaceName, String name, CapabilityHostInner body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + CapabilityHostInner.class, CapabilityHostInner.class, context); + } + + /** + * Create or update capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost name. + * @param body CapabilityHost definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, CapabilityHostInner> + beginCreateOrUpdate(String resourceGroupName, String workspaceName, String name, CapabilityHostInner body) { + return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body).getSyncPoller(); + } + + /** + * Create or update capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost name. + * @param body CapabilityHost definition. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, CapabilityHostInner> beginCreateOrUpdate( + String resourceGroupName, String workspaceName, String name, CapabilityHostInner body, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).getSyncPoller(); + } + + /** + * Create or update capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost name. + * @param body CapabilityHost definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request 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, + CapabilityHostInner body) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost name. + * @param body CapabilityHost definition. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request 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, + CapabilityHostInner body, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost name. + * @param body CapabilityHost definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request 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 CapabilityHostInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + CapabilityHostInner body) { + return createOrUpdateAsync(resourceGroupName, workspaceName, name, body).block(); + } + + /** + * Create or update capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost name. + * @param body CapabilityHost definition. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request 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 CapabilityHostInner createOrUpdate(String resourceGroupName, String workspaceName, String name, + CapabilityHostInner body, Context context) { + return createOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).block(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapabilityHostsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapabilityHostsImpl.java new file mode 100644 index 0000000000000..e52b9886e0bba --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CapabilityHostsImpl.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.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.CapabilityHostsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.CapabilityHostInner; +import com.azure.resourcemanager.machinelearning.models.CapabilityHost; +import com.azure.resourcemanager.machinelearning.models.CapabilityHosts; + +public final class CapabilityHostsImpl implements CapabilityHosts { + private static final ClientLogger LOGGER = new ClientLogger(CapabilityHostsImpl.class); + + private final CapabilityHostsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public CapabilityHostsImpl(CapabilityHostsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + 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 CapabilityHostImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CapabilityHost get(String resourceGroupName, String workspaceName, String name) { + CapabilityHostInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); + if (inner != null) { + return new CapabilityHostImpl(inner, this.manager()); + } else { + return null; + } + } + + public CapabilityHost 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, "capabilityHosts"); + if (name == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'capabilityHosts'.", 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, "capabilityHosts"); + if (name == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'capabilityHosts'.", 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, "capabilityHosts"); + if (name == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'capabilityHosts'.", 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, "capabilityHosts"); + if (name == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'capabilityHosts'.", id))); + } + this.delete(resourceGroupName, workspaceName, name, context); + } + + private CapabilityHostsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public CapabilityHostImpl define(String name) { + return new CapabilityHostImpl(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 89ef140519cf4..5df2bf06b0879 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 { @@ -165,6 +171,15 @@ public ComputeResource refresh(Context context) { 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); } @@ -181,6 +196,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); } @@ -205,6 +229,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/ComputesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputesClientImpl.java index b08cb2b83e5c5..8d73fe05a7783 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,12 +36,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.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; @@ -129,6 +135,17 @@ Mono>> delete(@HostParam("$host") String endpoint, @QueryParam("underlyingResourceAction") UnderlyingResourceAction underlyingResourceAction, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/customServices") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + 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, + @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}/listNodes") @ExpectedResponses({ 200 }) @@ -149,6 +166,17 @@ Mono> listKeys(@HostParam("$host") String endpoint @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 }) @@ -179,6 +207,38 @@ Mono>> restart(@HostParam("$host") String endpoint, @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}/updateIdleShutdownSetting") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + 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, + @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}/getAllowedVmSizesForResize") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + 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, 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" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @@ -1281,6 +1341,154 @@ public void delete(String resourceGroupName, String workspaceName, String comput deleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction, 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. + * @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) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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 (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 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. * @@ -1577,19 +1785,20 @@ 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.")); @@ -1608,19 +1817,26 @@ private Mono>> startWithResponseAsync(String resourceG 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. @@ -1628,8 +1844,8 @@ private Mono>> startWithResponseAsync(String resourceG * @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.")); @@ -1648,86 +1864,71 @@ private Mono>> startWithResponseAsync(String resourceG 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. - */ - @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. + * @return the {@link Response}. */ - @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 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 context The context to associate with this operation. + * @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, Context context) { - return this.beginStartAsync(resourceGroupName, workspaceName, computeName, context).getSyncPoller(); + @ServiceMethod(returns = ReturnType.SINGLE) + public void updateDataMounts(String resourceGroupName, String workspaceName, String computeName, + List dataMounts) { + updateDataMountsWithResponse(resourceGroupName, workspaceName, computeName, dataMounts, Context.NONE); } /** @@ -1739,12 +1940,34 @@ public SyncPoller, Void> beginStart(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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); + 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())); } /** @@ -1757,21 +1980,153 @@ private Mono startAsync(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 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, Context context) { - 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. + 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. + * @throws ManagementException 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, Context context) { + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @@ -2237,6 +2592,534 @@ 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. * 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 ceab9a7511a87..2ed8f69c7a206 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.Computes; 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); @@ -74,6 +81,17 @@ public void delete(String resourceGroupName, String workspaceName, String comput this.serviceClient().delete(resourceGroupName, workspaceName, computeName, underlyingResourceAction, context); } + 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); @@ -105,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); } @@ -129,6 +158,49 @@ 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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsClientImpl.java new file mode 100644 index 0000000000000..bc6894d61e995 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsClientImpl.java @@ -0,0 +1,1551 @@ +// Copyright (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.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.core.util.serializer.TypeReference; +import com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistItemPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemBulkRequest; +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 ConnectionRaiBlocklistItemsClient. + */ +public final class ConnectionRaiBlocklistItemsClientImpl implements ConnectionRaiBlocklistItemsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ConnectionRaiBlocklistItemsService service; + + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningWorkspacesImpl client; + + /** + * Initializes an instance of ConnectionRaiBlocklistItemsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ConnectionRaiBlocklistItemsClientImpl(AzureMachineLearningWorkspacesImpl client) { + this.service = RestProxy.create(ConnectionRaiBlocklistItemsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningWorkspacesConnectionRaiBlocklistItems to be used + * by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface ConnectionRaiBlocklistItemsService { + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/addRaiBlocklistItems") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> addBulk(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("raiBlocklistName") String raiBlocklistName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") List body, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/deleteRaiBlocklistItems") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> deleteBulk(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("raiBlocklistName") String raiBlocklistName, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") Object body, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems/{raiBlocklistItemName}") + @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("connectionName") String connectionName, @PathParam("raiBlocklistName") String raiBlocklistName, + @PathParam("raiBlocklistItemName") String raiBlocklistItemName, + @QueryParam("api-version") String apiVersion, @QueryParam("proxy-api-version") String proxyApiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems/{raiBlocklistItemName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("raiBlocklistName") String raiBlocklistName, + @PathParam("raiBlocklistItemName") String raiBlocklistItemName, + @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}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems/{raiBlocklistItemName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("raiBlocklistName") String raiBlocklistName, + @PathParam("raiBlocklistItemName") String raiBlocklistItemName, + @QueryParam("api-version") String apiVersion, @QueryParam("proxy-api-version") String proxyApiVersion, + @BodyParam("application/json") RaiBlocklistItemPropertiesBasicResourceInner body, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Add multiple blocklist items to the specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body Properties describing the custom blocklist items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of RaiBlocklistItemPropertiesBasicResource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> addBulkWithResponseAsync(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, List 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 (connectionName == null) { + return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); + } + if (raiBlocklistName == null) { + return Mono + .error(new IllegalArgumentException("Parameter raiBlocklistName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.forEach(e -> e.validate()); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.addBulk(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, connectionName, raiBlocklistName, this.client.getApiVersion(), body, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Add multiple blocklist items to the specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body Properties describing the custom blocklist items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of RaiBlocklistItemPropertiesBasicResource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> addBulkWithResponseAsync(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, List 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 (connectionName == null) { + return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); + } + if (raiBlocklistName == null) { + return Mono + .error(new IllegalArgumentException("Parameter raiBlocklistName is required and cannot be null.")); + } + if (body == null) { + return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); + } else { + body.forEach(e -> e.validate()); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.addBulk(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, connectionName, raiBlocklistName, this.client.getApiVersion(), body, accept, context); + } + + /** + * Add multiple blocklist items to the specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body Properties describing the custom blocklist items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of array of RaiBlocklistItemPropertiesBasicResource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private + PollerFlux>, List> + beginAddBulkAsync(String resourceGroupName, String workspaceName, String connectionName, + String raiBlocklistName, List body) { + Mono>> mono + = addBulkWithResponseAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body); + return this.client + ., List>getLroResult( + mono, this.client.getHttpPipeline(), + new TypeReference>() { + }.getJavaType(), new TypeReference>() { + }.getJavaType(), this.client.getContext()); + } + + /** + * Add multiple blocklist items to the specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body Properties describing the custom blocklist items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of array of RaiBlocklistItemPropertiesBasicResource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private + PollerFlux>, List> + beginAddBulkAsync(String resourceGroupName, String workspaceName, String connectionName, + String raiBlocklistName, List body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = addBulkWithResponseAsync(resourceGroupName, workspaceName, + connectionName, raiBlocklistName, body, context); + return this.client + ., List>getLroResult( + mono, this.client.getHttpPipeline(), + new TypeReference>() { + }.getJavaType(), new TypeReference>() { + }.getJavaType(), context); + } + + /** + * Add multiple blocklist items to the specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body Properties describing the custom blocklist items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of array of RaiBlocklistItemPropertiesBasicResource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller>, List> + beginAddBulk(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + List body) { + return this.beginAddBulkAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body) + .getSyncPoller(); + } + + /** + * Add multiple blocklist items to the specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body Properties describing the custom blocklist items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of array of RaiBlocklistItemPropertiesBasicResource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller>, List> + beginAddBulk(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + List body, Context context) { + return this.beginAddBulkAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body, context) + .getSyncPoller(); + } + + /** + * Add multiple blocklist items to the specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body Properties describing the custom blocklist items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of RaiBlocklistItemPropertiesBasicResource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> addBulkAsync(String resourceGroupName, + String workspaceName, String connectionName, String raiBlocklistName, List body) { + return beginAddBulkAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Add multiple blocklist items to the specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body Properties describing the custom blocklist items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of RaiBlocklistItemPropertiesBasicResource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> addBulkAsync(String resourceGroupName, + String workspaceName, String connectionName, String raiBlocklistName, List body, + Context context) { + return beginAddBulkAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Add multiple blocklist items to the specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body Properties describing the custom blocklist items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of RaiBlocklistItemPropertiesBasicResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public List addBulk(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, List body) { + return addBulkAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body).block(); + } + + /** + * Add multiple blocklist items to the specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body Properties describing the custom blocklist items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of RaiBlocklistItemPropertiesBasicResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public List addBulk(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, List body, Context context) { + return addBulkAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body, context).block(); + } + + /** + * Delete multiple blocklist items from the specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body List of RAI Blocklist Items Names. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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>> deleteBulkWithResponseAsync(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, 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 (connectionName == null) { + return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); + } + if (raiBlocklistName == null) { + return Mono + .error(new IllegalArgumentException("Parameter raiBlocklistName 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.deleteBulk(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, connectionName, raiBlocklistName, this.client.getApiVersion(), body, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete multiple blocklist items from the specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body List of RAI Blocklist Items Names. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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>> deleteBulkWithResponseAsync(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, 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 (connectionName == null) { + return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); + } + if (raiBlocklistName == null) { + return Mono + .error(new IllegalArgumentException("Parameter raiBlocklistName 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.deleteBulk(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, connectionName, raiBlocklistName, this.client.getApiVersion(), body, accept, context); + } + + /** + * Delete multiple blocklist items from the specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body List of RAI Blocklist Items Names. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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> beginDeleteBulkAsync(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, Object body) { + Mono>> mono + = deleteBulkWithResponseAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete multiple blocklist items from the specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body List of RAI Blocklist Items Names. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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> beginDeleteBulkAsync(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, Object body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteBulkWithResponseAsync(resourceGroupName, workspaceName, + connectionName, raiBlocklistName, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete multiple blocklist items from the specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body List of RAI Blocklist Items Names. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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> beginDeleteBulk(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, Object body) { + return this.beginDeleteBulkAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body) + .getSyncPoller(); + } + + /** + * Delete multiple blocklist items from the specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body List of RAI Blocklist Items Names. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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> beginDeleteBulk(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, Object body, Context context) { + return this + .beginDeleteBulkAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body, context) + .getSyncPoller(); + } + + /** + * Delete multiple blocklist items from the specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body List of RAI Blocklist Items Names. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 deleteBulkAsync(String resourceGroupName, String workspaceName, String connectionName, + String raiBlocklistName, Object body) { + return beginDeleteBulkAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete multiple blocklist items from the specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body List of RAI Blocklist Items Names. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 deleteBulkAsync(String resourceGroupName, String workspaceName, String connectionName, + String raiBlocklistName, Object body, Context context) { + return beginDeleteBulkAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete multiple blocklist items from the specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body List of RAI Blocklist Items Names. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 deleteBulk(String resourceGroupName, String workspaceName, String connectionName, + String raiBlocklistName, Object body) { + deleteBulkAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body).block(); + } + + /** + * Delete multiple blocklist items from the specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body List of RAI Blocklist Items Names. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 deleteBulk(String resourceGroupName, String workspaceName, String connectionName, + String raiBlocklistName, Object body, Context context) { + deleteBulkAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body, context).block(); + } + + /** + * Deletes the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, String raiBlocklistName, String raiBlocklistItemName, String proxyApiVersion) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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.")); + } + if (raiBlocklistName == null) { + return Mono + .error(new IllegalArgumentException("Parameter raiBlocklistName is required and cannot be null.")); + } + if (raiBlocklistItemName == null) { + return Mono + .error(new IllegalArgumentException("Parameter raiBlocklistItemName 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, raiBlocklistName, raiBlocklistItemName, + this.client.getApiVersion(), proxyApiVersion, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, String raiBlocklistName, String raiBlocklistItemName, String proxyApiVersion, + 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 (connectionName == null) { + return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); + } + if (raiBlocklistName == null) { + return Mono + .error(new IllegalArgumentException("Parameter raiBlocklistName is required and cannot be null.")); + } + if (raiBlocklistItemName == null) { + return Mono + .error(new IllegalArgumentException("Parameter raiBlocklistItemName 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, connectionName, raiBlocklistName, raiBlocklistItemName, this.client.getApiVersion(), + proxyApiVersion, accept, context); + } + + /** + * Deletes the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 connectionName, String raiBlocklistName, String raiBlocklistItemName, String proxyApiVersion) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, + connectionName, raiBlocklistName, raiBlocklistItemName, proxyApiVersion); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 connectionName, String raiBlocklistName, String raiBlocklistItemName) { + final String proxyApiVersion = null; + Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, + connectionName, raiBlocklistName, raiBlocklistItemName, proxyApiVersion); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 connectionName, String raiBlocklistName, String raiBlocklistItemName, String proxyApiVersion, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, + connectionName, raiBlocklistName, raiBlocklistItemName, proxyApiVersion, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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 connectionName, String raiBlocklistName, String raiBlocklistItemName) { + final String proxyApiVersion = null; + return this + .beginDeleteAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName, + proxyApiVersion) + .getSyncPoller(); + } + + /** + * Deletes the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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 connectionName, String raiBlocklistName, String raiBlocklistItemName, String proxyApiVersion, + Context context) { + return this + .beginDeleteAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName, + proxyApiVersion, context) + .getSyncPoller(); + } + + /** + * Deletes the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, + String raiBlocklistName, String raiBlocklistItemName, String proxyApiVersion) { + return beginDeleteAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, + raiBlocklistItemName, proxyApiVersion).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, + String raiBlocklistName, String raiBlocklistItemName) { + final String proxyApiVersion = null; + return beginDeleteAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, + raiBlocklistItemName, proxyApiVersion).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, + String raiBlocklistName, String raiBlocklistItemName, String proxyApiVersion, Context context) { + return beginDeleteAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, + raiBlocklistItemName, proxyApiVersion, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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, String raiBlocklistName, + String raiBlocklistItemName) { + final String proxyApiVersion = null; + deleteAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName, + proxyApiVersion).block(); + } + + /** + * Deletes the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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, String raiBlocklistName, + String raiBlocklistItemName, String proxyApiVersion, Context context) { + deleteAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName, + proxyApiVersion, context).block(); + } + + /** + * Gets the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 custom blocklist item associated with the Azure OpenAI connection along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String workspaceName, String connectionName, String raiBlocklistName, String raiBlocklistItemName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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.")); + } + if (raiBlocklistName == null) { + return Mono + .error(new IllegalArgumentException("Parameter raiBlocklistName is required and cannot be null.")); + } + if (raiBlocklistItemName == null) { + return Mono + .error(new IllegalArgumentException("Parameter raiBlocklistItemName 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, connectionName, raiBlocklistName, raiBlocklistItemName, + this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 custom blocklist item associated with the Azure OpenAI connection along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String workspaceName, String connectionName, String raiBlocklistName, String raiBlocklistItemName, + 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 (connectionName == null) { + return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); + } + if (raiBlocklistName == null) { + return Mono + .error(new IllegalArgumentException("Parameter raiBlocklistName is required and cannot be null.")); + } + if (raiBlocklistItemName == null) { + return Mono + .error(new IllegalArgumentException("Parameter raiBlocklistItemName 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, + connectionName, raiBlocklistName, raiBlocklistItemName, this.client.getApiVersion(), accept, context); + } + + /** + * Gets the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 custom blocklist item associated with the Azure OpenAI connection on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, String raiBlocklistItemName) { + return getWithResponseAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, + raiBlocklistItemName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 custom blocklist item associated with the Azure OpenAI connection along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, + String workspaceName, String connectionName, String raiBlocklistName, String raiBlocklistItemName, + Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, + raiBlocklistItemName, context).block(); + } + + /** + * Gets the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 custom blocklist item associated with the Azure OpenAI connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RaiBlocklistItemPropertiesBasicResourceInner get(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, String raiBlocklistItemName) { + return getWithResponse(resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName, + Context.NONE).getValue(); + } + + /** + * Update the state of specified blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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>> createWithResponseAsync(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, String raiBlocklistItemName, + RaiBlocklistItemPropertiesBasicResourceInner body, String proxyApiVersion) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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.")); + } + if (raiBlocklistName == null) { + return Mono + .error(new IllegalArgumentException("Parameter raiBlocklistName is required and cannot be null.")); + } + if (raiBlocklistItemName == null) { + return Mono + .error(new IllegalArgumentException("Parameter raiBlocklistItemName 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.create(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName, + this.client.getApiVersion(), proxyApiVersion, body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update the state of specified blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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>> createWithResponseAsync(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, String raiBlocklistItemName, + RaiBlocklistItemPropertiesBasicResourceInner body, String proxyApiVersion, 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 (connectionName == null) { + return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); + } + if (raiBlocklistName == null) { + return Mono + .error(new IllegalArgumentException("Parameter raiBlocklistName is required and cannot be null.")); + } + if (raiBlocklistItemName == null) { + return Mono + .error(new IllegalArgumentException("Parameter raiBlocklistItemName 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.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName, this.client.getApiVersion(), + proxyApiVersion, body, accept, context); + } + + /** + * Update the state of specified blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, RaiBlocklistItemPropertiesBasicResourceInner> + beginCreateAsync(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + String raiBlocklistItemName, RaiBlocklistItemPropertiesBasicResourceInner body, String proxyApiVersion) { + Mono>> mono = createWithResponseAsync(resourceGroupName, workspaceName, + connectionName, raiBlocklistName, raiBlocklistItemName, body, proxyApiVersion); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), RaiBlocklistItemPropertiesBasicResourceInner.class, + RaiBlocklistItemPropertiesBasicResourceInner.class, this.client.getContext()); + } + + /** + * Update the state of specified blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private + PollerFlux, RaiBlocklistItemPropertiesBasicResourceInner> + beginCreateAsync(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + String raiBlocklistItemName, RaiBlocklistItemPropertiesBasicResourceInner body) { + final String proxyApiVersion = null; + Mono>> mono = createWithResponseAsync(resourceGroupName, workspaceName, + connectionName, raiBlocklistName, raiBlocklistItemName, body, proxyApiVersion); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), RaiBlocklistItemPropertiesBasicResourceInner.class, + RaiBlocklistItemPropertiesBasicResourceInner.class, this.client.getContext()); + } + + /** + * Update the state of specified blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, RaiBlocklistItemPropertiesBasicResourceInner> + beginCreateAsync(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + String raiBlocklistItemName, RaiBlocklistItemPropertiesBasicResourceInner body, String proxyApiVersion, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createWithResponseAsync(resourceGroupName, workspaceName, + connectionName, raiBlocklistName, raiBlocklistItemName, body, proxyApiVersion, context); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), RaiBlocklistItemPropertiesBasicResourceInner.class, + RaiBlocklistItemPropertiesBasicResourceInner.class, context); + } + + /** + * Update the state of specified blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, RaiBlocklistItemPropertiesBasicResourceInner> + beginCreate(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + String raiBlocklistItemName, RaiBlocklistItemPropertiesBasicResourceInner body) { + final String proxyApiVersion = null; + return this + .beginCreateAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName, + body, proxyApiVersion) + .getSyncPoller(); + } + + /** + * Update the state of specified blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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, RaiBlocklistItemPropertiesBasicResourceInner> + beginCreate(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + String raiBlocklistItemName, RaiBlocklistItemPropertiesBasicResourceInner body, String proxyApiVersion, + Context context) { + return this + .beginCreateAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName, + body, proxyApiVersion, context) + .getSyncPoller(); + } + + /** + * Update the state of specified blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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, String raiBlocklistName, String raiBlocklistItemName, + RaiBlocklistItemPropertiesBasicResourceInner body, String proxyApiVersion) { + return beginCreateAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, + raiBlocklistItemName, body, proxyApiVersion).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update the state of specified blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @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 createAsync(String resourceGroupName, + String workspaceName, String connectionName, String raiBlocklistName, String raiBlocklistItemName, + RaiBlocklistItemPropertiesBasicResourceInner body) { + final String proxyApiVersion = null; + return beginCreateAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, + raiBlocklistItemName, body, proxyApiVersion).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update the state of specified blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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, String raiBlocklistName, String raiBlocklistItemName, + RaiBlocklistItemPropertiesBasicResourceInner body, String proxyApiVersion, Context context) { + return beginCreateAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, + raiBlocklistItemName, body, proxyApiVersion, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update the state of specified blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @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 RaiBlocklistItemPropertiesBasicResourceInner create(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, String raiBlocklistItemName, + RaiBlocklistItemPropertiesBasicResourceInner body) { + final String proxyApiVersion = null; + return createAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName, + body, proxyApiVersion).block(); + } + + /** + * Update the state of specified blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 RaiBlocklistItemPropertiesBasicResourceInner create(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, String raiBlocklistItemName, + RaiBlocklistItemPropertiesBasicResourceInner body, String proxyApiVersion, Context context) { + return createAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName, + body, proxyApiVersion, context).block(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsImpl.java new file mode 100644 index 0000000000000..d785995898f96 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsImpl.java @@ -0,0 +1,242 @@ +// Copyright (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.ConnectionRaiBlocklistItemsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistItemPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.ConnectionRaiBlocklistItems; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemBulkRequest; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemPropertiesBasicResource; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class ConnectionRaiBlocklistItemsImpl implements ConnectionRaiBlocklistItems { + private static final ClientLogger LOGGER = new ClientLogger(ConnectionRaiBlocklistItemsImpl.class); + + private final ConnectionRaiBlocklistItemsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public ConnectionRaiBlocklistItemsImpl(ConnectionRaiBlocklistItemsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public List addBulk(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, List body) { + List inner + = this.serviceClient().addBulk(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new RaiBlocklistItemPropertiesBasicResourceImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public List addBulk(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, List body, Context context) { + List inner = this.serviceClient() + .addBulk(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body, context); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new RaiBlocklistItemPropertiesBasicResourceImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public void deleteBulk(String resourceGroupName, String workspaceName, String connectionName, + String raiBlocklistName, Object body) { + this.serviceClient().deleteBulk(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body); + } + + public void deleteBulk(String resourceGroupName, String workspaceName, String connectionName, + String raiBlocklistName, Object body, Context context) { + this.serviceClient() + .deleteBulk(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body, context); + } + + public void delete(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + String raiBlocklistItemName) { + this.serviceClient() + .delete(resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName); + } + + public void delete(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + String raiBlocklistItemName, String proxyApiVersion, Context context) { + this.serviceClient() + .delete(resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName, + proxyApiVersion, context); + } + + public Response getWithResponse(String resourceGroupName, + String workspaceName, String connectionName, String raiBlocklistName, String raiBlocklistItemName, + Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName, + context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new RaiBlocklistItemPropertiesBasicResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public RaiBlocklistItemPropertiesBasicResource get(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, String raiBlocklistItemName) { + RaiBlocklistItemPropertiesBasicResourceInner inner = this.serviceClient() + .get(resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName); + if (inner != null) { + return new RaiBlocklistItemPropertiesBasicResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public RaiBlocklistItemPropertiesBasicResource 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 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))); + } + String raiBlocklistName = ResourceManagerUtils.getValueFromIdByName(id, "raiBlocklists"); + if (raiBlocklistName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'raiBlocklists'.", id))); + } + String raiBlocklistItemName = ResourceManagerUtils.getValueFromIdByName(id, "raiBlocklistItems"); + if (raiBlocklistItemName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'raiBlocklistItems'.", id))); + } + return this + .getWithResponse(resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName, + 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 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))); + } + String raiBlocklistName = ResourceManagerUtils.getValueFromIdByName(id, "raiBlocklists"); + if (raiBlocklistName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'raiBlocklists'.", id))); + } + String raiBlocklistItemName = ResourceManagerUtils.getValueFromIdByName(id, "raiBlocklistItems"); + if (raiBlocklistItemName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'raiBlocklistItems'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, connectionName, raiBlocklistName, + raiBlocklistItemName, 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 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))); + } + String raiBlocklistName = ResourceManagerUtils.getValueFromIdByName(id, "raiBlocklists"); + if (raiBlocklistName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'raiBlocklists'.", id))); + } + String raiBlocklistItemName = ResourceManagerUtils.getValueFromIdByName(id, "raiBlocklistItems"); + if (raiBlocklistItemName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'raiBlocklistItems'.", id))); + } + String localProxyApiVersion = null; + this.delete(resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName, + localProxyApiVersion, Context.NONE); + } + + public void deleteByIdWithResponse(String id, String proxyApiVersion, 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 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))); + } + String raiBlocklistName = ResourceManagerUtils.getValueFromIdByName(id, "raiBlocklists"); + if (raiBlocklistName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'raiBlocklists'.", id))); + } + String raiBlocklistItemName = ResourceManagerUtils.getValueFromIdByName(id, "raiBlocklistItems"); + if (raiBlocklistItemName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'raiBlocklistItems'.", id))); + } + this.delete(resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName, + proxyApiVersion, context); + } + + private ConnectionRaiBlocklistItemsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public RaiBlocklistItemPropertiesBasicResourceImpl define(String name) { + return new RaiBlocklistItemPropertiesBasicResourceImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsOperationsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsOperationsClientImpl.java new file mode 100644 index 0000000000000..c33dda41f1355 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsOperationsClientImpl.java @@ -0,0 +1,347 @@ +// Copyright (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.ConnectionRaiBlocklistItemsOperationsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistItemPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in + * ConnectionRaiBlocklistItemsOperationsClient. + */ +public final class ConnectionRaiBlocklistItemsOperationsClientImpl + implements ConnectionRaiBlocklistItemsOperationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ConnectionRaiBlocklistItemsOperationsService service; + + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningWorkspacesImpl client; + + /** + * Initializes an instance of ConnectionRaiBlocklistItemsOperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ConnectionRaiBlocklistItemsOperationsClientImpl(AzureMachineLearningWorkspacesImpl client) { + this.service = RestProxy.create(ConnectionRaiBlocklistItemsOperationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningWorkspacesConnectionRaiBlocklistItemsOperations + * to be used by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface ConnectionRaiBlocklistItemsOperationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}/raiBlocklistItems") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("raiBlocklistName") String raiBlocklistName, + @QueryParam("api-version") String apiVersion, @QueryParam("proxy-api-version") String proxyApiVersion, + @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); + } + + /** + * Gets the custom blocklist items associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the custom blocklist items associated with the Azure OpenAI connection along with {@link PagedResponse} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + String proxyApiVersion) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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.")); + } + if (raiBlocklistName == null) { + return Mono + .error(new IllegalArgumentException("Parameter raiBlocklistName 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, connectionName, raiBlocklistName, this.client.getApiVersion(), + proxyApiVersion, 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 custom blocklist items associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the custom blocklist items associated with the Azure OpenAI connection along with {@link PagedResponse} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + String proxyApiVersion, 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 (connectionName == null) { + return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); + } + if (raiBlocklistName == null) { + return Mono + .error(new IllegalArgumentException("Parameter raiBlocklistName 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, + connectionName, raiBlocklistName, this.client.getApiVersion(), proxyApiVersion, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets the custom blocklist items associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the custom blocklist items associated with the Azure OpenAI connection as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, + String workspaceName, String connectionName, String raiBlocklistName, String proxyApiVersion) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, connectionName, + raiBlocklistName, proxyApiVersion), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets the custom blocklist items associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the custom blocklist items associated with the Azure OpenAI connection as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, + String workspaceName, String connectionName, String raiBlocklistName) { + final String proxyApiVersion = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, connectionName, + raiBlocklistName, proxyApiVersion), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets the custom blocklist items associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the custom blocklist items associated with the Azure OpenAI connection as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, + String workspaceName, String connectionName, String raiBlocklistName, String proxyApiVersion, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, connectionName, + raiBlocklistName, proxyApiVersion, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets the custom blocklist items associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the custom blocklist items associated with the Azure OpenAI connection as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, + String workspaceName, String connectionName, String raiBlocklistName) { + final String proxyApiVersion = null; + return new PagedIterable<>( + listAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, proxyApiVersion)); + } + + /** + * Gets the custom blocklist items associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the custom blocklist items associated with the Azure OpenAI connection as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, + String workspaceName, String connectionName, String raiBlocklistName, String proxyApiVersion, Context context) { + return new PagedIterable<>( + listAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, proxyApiVersion, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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/ConnectionRaiBlocklistItemsOperationsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsOperationsImpl.java new file mode 100644 index 0000000000000..d701599834305 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistItemsOperationsImpl.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.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistItemsOperationsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistItemPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.ConnectionRaiBlocklistItemsOperations; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemPropertiesBasicResource; + +public final class ConnectionRaiBlocklistItemsOperationsImpl implements ConnectionRaiBlocklistItemsOperations { + private static final ClientLogger LOGGER = new ClientLogger(ConnectionRaiBlocklistItemsOperationsImpl.class); + + private final ConnectionRaiBlocklistItemsOperationsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public ConnectionRaiBlocklistItemsOperationsImpl(ConnectionRaiBlocklistItemsOperationsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, connectionName, raiBlocklistName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new RaiBlocklistItemPropertiesBasicResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, String proxyApiVersion, Context context) { + PagedIterable inner = this.serviceClient() + .list(resourceGroupName, workspaceName, connectionName, raiBlocklistName, proxyApiVersion, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new RaiBlocklistItemPropertiesBasicResourceImpl(inner1, this.manager())); + } + + private ConnectionRaiBlocklistItemsOperationsClient 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/ConnectionRaiBlocklistOperationsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistOperationsClientImpl.java new file mode 100644 index 0000000000000..4227f6471fe4e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistOperationsClientImpl.java @@ -0,0 +1,899 @@ +// Copyright (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.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.ConnectionRaiBlocklistOperationsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistPropertiesBasicResourceInner; +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 ConnectionRaiBlocklistOperationsClient. + */ +public final class ConnectionRaiBlocklistOperationsClientImpl implements ConnectionRaiBlocklistOperationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ConnectionRaiBlocklistOperationsService service; + + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningWorkspacesImpl client; + + /** + * Initializes an instance of ConnectionRaiBlocklistOperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ConnectionRaiBlocklistOperationsClientImpl(AzureMachineLearningWorkspacesImpl client) { + this.service = RestProxy.create(ConnectionRaiBlocklistOperationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningWorkspacesConnectionRaiBlocklistOperations to be + * used by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface ConnectionRaiBlocklistOperationsService { + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}") + @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("connectionName") String connectionName, @PathParam("raiBlocklistName") String raiBlocklistName, + @QueryParam("api-version") String apiVersion, @QueryParam("proxy-api-version") String proxyApiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("raiBlocklistName") String raiBlocklistName, + @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}/connections/{connectionName}/raiBlocklists/{raiBlocklistName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("raiBlocklistName") String raiBlocklistName, + @QueryParam("api-version") String apiVersion, @QueryParam("proxy-api-version") String proxyApiVersion, + @BodyParam("application/json") RaiBlocklistPropertiesBasicResourceInner body, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, String raiBlocklistName, String proxyApiVersion) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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.")); + } + if (raiBlocklistName == null) { + return Mono + .error(new IllegalArgumentException("Parameter raiBlocklistName 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, raiBlocklistName, this.client.getApiVersion(), + proxyApiVersion, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, String raiBlocklistName, String proxyApiVersion, 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 (connectionName == null) { + return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); + } + if (raiBlocklistName == null) { + return Mono + .error(new IllegalArgumentException("Parameter raiBlocklistName 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, connectionName, raiBlocklistName, this.client.getApiVersion(), proxyApiVersion, accept, + context); + } + + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 connectionName, String raiBlocklistName, String proxyApiVersion) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, + connectionName, raiBlocklistName, proxyApiVersion); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 connectionName, String raiBlocklistName) { + final String proxyApiVersion = null; + Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, + connectionName, raiBlocklistName, proxyApiVersion); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 connectionName, String raiBlocklistName, String proxyApiVersion, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, + connectionName, raiBlocklistName, proxyApiVersion, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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 connectionName, String raiBlocklistName) { + final String proxyApiVersion = null; + return this + .beginDeleteAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, proxyApiVersion) + .getSyncPoller(); + } + + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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 connectionName, String raiBlocklistName, String proxyApiVersion, Context context) { + return this + .beginDeleteAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, proxyApiVersion, + context) + .getSyncPoller(); + } + + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, + String raiBlocklistName, String proxyApiVersion) { + return beginDeleteAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, proxyApiVersion) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, + String raiBlocklistName) { + final String proxyApiVersion = null; + return beginDeleteAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, proxyApiVersion) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, + String raiBlocklistName, String proxyApiVersion, Context context) { + return beginDeleteAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, proxyApiVersion, + context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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, String raiBlocklistName) { + final String proxyApiVersion = null; + deleteAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, proxyApiVersion).block(); + } + + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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, String raiBlocklistName, + String proxyApiVersion, Context context) { + deleteAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, proxyApiVersion, context) + .block(); + } + + /** + * Gets the specified custom blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 custom blocklist associated with the Azure OpenAI connection along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String workspaceName, String connectionName, String raiBlocklistName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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.")); + } + if (raiBlocklistName == null) { + return Mono + .error(new IllegalArgumentException("Parameter raiBlocklistName 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, connectionName, raiBlocklistName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the specified custom blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 custom blocklist associated with the Azure OpenAI connection along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String workspaceName, String connectionName, String raiBlocklistName, 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 (connectionName == null) { + return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); + } + if (raiBlocklistName == null) { + return Mono + .error(new IllegalArgumentException("Parameter raiBlocklistName 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, + connectionName, raiBlocklistName, this.client.getApiVersion(), accept, context); + } + + /** + * Gets the specified custom blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 custom blocklist associated with the Azure OpenAI connection on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName) { + return getWithResponseAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the specified custom blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 custom blocklist associated with the Azure OpenAI connection along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, + String workspaceName, String connectionName, String raiBlocklistName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, context) + .block(); + } + + /** + * Gets the specified custom blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 custom blocklist associated with the Azure OpenAI connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RaiBlocklistPropertiesBasicResourceInner get(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName) { + return getWithResponse(resourceGroupName, workspaceName, connectionName, raiBlocklistName, Context.NONE) + .getValue(); + } + + /** + * Update the state of specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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>> createWithResponseAsync(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, RaiBlocklistPropertiesBasicResourceInner body, + String proxyApiVersion) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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.")); + } + if (raiBlocklistName == null) { + return Mono + .error(new IllegalArgumentException("Parameter raiBlocklistName 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.create(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, connectionName, raiBlocklistName, this.client.getApiVersion(), + proxyApiVersion, body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update the state of specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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>> createWithResponseAsync(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, RaiBlocklistPropertiesBasicResourceInner body, + String proxyApiVersion, 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 (connectionName == null) { + return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); + } + if (raiBlocklistName == null) { + return Mono + .error(new IllegalArgumentException("Parameter raiBlocklistName 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.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, connectionName, raiBlocklistName, this.client.getApiVersion(), proxyApiVersion, body, accept, + context); + } + + /** + * Update the state of specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, RaiBlocklistPropertiesBasicResourceInner> + beginCreateAsync(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + RaiBlocklistPropertiesBasicResourceInner body, String proxyApiVersion) { + Mono>> mono = createWithResponseAsync(resourceGroupName, workspaceName, + connectionName, raiBlocklistName, body, proxyApiVersion); + return this.client + .getLroResult(mono, + this.client.getHttpPipeline(), RaiBlocklistPropertiesBasicResourceInner.class, + RaiBlocklistPropertiesBasicResourceInner.class, this.client.getContext()); + } + + /** + * Update the state of specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @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 {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, RaiBlocklistPropertiesBasicResourceInner> + beginCreateAsync(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + RaiBlocklistPropertiesBasicResourceInner body) { + final String proxyApiVersion = null; + Mono>> mono = createWithResponseAsync(resourceGroupName, workspaceName, + connectionName, raiBlocklistName, body, proxyApiVersion); + return this.client + .getLroResult(mono, + this.client.getHttpPipeline(), RaiBlocklistPropertiesBasicResourceInner.class, + RaiBlocklistPropertiesBasicResourceInner.class, this.client.getContext()); + } + + /** + * Update the state of specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, RaiBlocklistPropertiesBasicResourceInner> + beginCreateAsync(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + RaiBlocklistPropertiesBasicResourceInner body, String proxyApiVersion, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createWithResponseAsync(resourceGroupName, workspaceName, + connectionName, raiBlocklistName, body, proxyApiVersion, context); + return this.client + .getLroResult(mono, + this.client.getHttpPipeline(), RaiBlocklistPropertiesBasicResourceInner.class, + RaiBlocklistPropertiesBasicResourceInner.class, context); + } + + /** + * Update the state of specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @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 {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, RaiBlocklistPropertiesBasicResourceInner> + beginCreate(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + RaiBlocklistPropertiesBasicResourceInner body) { + final String proxyApiVersion = null; + return this + .beginCreateAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body, proxyApiVersion) + .getSyncPoller(); + } + + /** + * Update the state of specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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, RaiBlocklistPropertiesBasicResourceInner> + beginCreate(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + RaiBlocklistPropertiesBasicResourceInner body, String proxyApiVersion, Context context) { + return this + .beginCreateAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body, proxyApiVersion, + context) + .getSyncPoller(); + } + + /** + * Update the state of specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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, String raiBlocklistName, RaiBlocklistPropertiesBasicResourceInner body, + String proxyApiVersion) { + return beginCreateAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body, + proxyApiVersion).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update the state of specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @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 createAsync(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, RaiBlocklistPropertiesBasicResourceInner body) { + final String proxyApiVersion = null; + return beginCreateAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body, + proxyApiVersion).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update the state of specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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, String raiBlocklistName, RaiBlocklistPropertiesBasicResourceInner body, + String proxyApiVersion, Context context) { + return beginCreateAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body, + proxyApiVersion, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update the state of specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @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 RaiBlocklistPropertiesBasicResourceInner create(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, RaiBlocklistPropertiesBasicResourceInner body) { + final String proxyApiVersion = null; + return createAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body, proxyApiVersion) + .block(); + } + + /** + * Update the state of specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 RaiBlocklistPropertiesBasicResourceInner create(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, RaiBlocklistPropertiesBasicResourceInner body, + String proxyApiVersion, Context context) { + return createAsync(resourceGroupName, workspaceName, connectionName, raiBlocklistName, body, proxyApiVersion, + context).block(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistOperationsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistOperationsImpl.java new file mode 100644 index 0000000000000..98cabb1980e61 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistOperationsImpl.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.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.ConnectionRaiBlocklistOperationsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.ConnectionRaiBlocklistOperations; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistPropertiesBasicResource; + +public final class ConnectionRaiBlocklistOperationsImpl implements ConnectionRaiBlocklistOperations { + private static final ClientLogger LOGGER = new ClientLogger(ConnectionRaiBlocklistOperationsImpl.class); + + private final ConnectionRaiBlocklistOperationsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public ConnectionRaiBlocklistOperationsImpl(ConnectionRaiBlocklistOperationsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public void delete(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName) { + this.serviceClient().delete(resourceGroupName, workspaceName, connectionName, raiBlocklistName); + } + + public void delete(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + String proxyApiVersion, Context context) { + this.serviceClient() + .delete(resourceGroupName, workspaceName, connectionName, raiBlocklistName, proxyApiVersion, context); + } + + public Response getWithResponse(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, workspaceName, connectionName, raiBlocklistName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new RaiBlocklistPropertiesBasicResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public RaiBlocklistPropertiesBasicResource get(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName) { + RaiBlocklistPropertiesBasicResourceInner inner + = this.serviceClient().get(resourceGroupName, workspaceName, connectionName, raiBlocklistName); + if (inner != null) { + return new RaiBlocklistPropertiesBasicResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public RaiBlocklistPropertiesBasicResource 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 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))); + } + String raiBlocklistName = ResourceManagerUtils.getValueFromIdByName(id, "raiBlocklists"); + if (raiBlocklistName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'raiBlocklists'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, connectionName, raiBlocklistName, 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 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))); + } + String raiBlocklistName = ResourceManagerUtils.getValueFromIdByName(id, "raiBlocklists"); + if (raiBlocklistName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'raiBlocklists'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, connectionName, raiBlocklistName, 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 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))); + } + String raiBlocklistName = ResourceManagerUtils.getValueFromIdByName(id, "raiBlocklists"); + if (raiBlocklistName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'raiBlocklists'.", id))); + } + String localProxyApiVersion = null; + this.delete(resourceGroupName, workspaceName, connectionName, raiBlocklistName, localProxyApiVersion, + Context.NONE); + } + + public void deleteByIdWithResponse(String id, String proxyApiVersion, 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 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))); + } + String raiBlocklistName = ResourceManagerUtils.getValueFromIdByName(id, "raiBlocklists"); + if (raiBlocklistName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'raiBlocklists'.", id))); + } + this.delete(resourceGroupName, workspaceName, connectionName, raiBlocklistName, proxyApiVersion, context); + } + + private ConnectionRaiBlocklistOperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public RaiBlocklistPropertiesBasicResourceImpl define(String name) { + return new RaiBlocklistPropertiesBasicResourceImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistsClientImpl.java new file mode 100644 index 0000000000000..761864fd5bcd9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistsClientImpl.java @@ -0,0 +1,330 @@ +// Copyright (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.ConnectionRaiBlocklistsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistPropertiesBasicResourceArmPaginatedResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ConnectionRaiBlocklistsClient. + */ +public final class ConnectionRaiBlocklistsClientImpl implements ConnectionRaiBlocklistsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ConnectionRaiBlocklistsService service; + + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningWorkspacesImpl client; + + /** + * Initializes an instance of ConnectionRaiBlocklistsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ConnectionRaiBlocklistsClientImpl(AzureMachineLearningWorkspacesImpl client) { + this.service = RestProxy.create(ConnectionRaiBlocklistsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningWorkspacesConnectionRaiBlocklists to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface ConnectionRaiBlocklistsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiBlocklists") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@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("proxy-api-version") String proxyApiVersion, @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); + } + + /** + * Gets the custom blocklists associated with the Azure OpenAI connection. + * + * @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 proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the custom blocklists associated with the Azure OpenAI connection along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String connectionName, String proxyApiVersion) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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.list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, connectionName, this.client.getApiVersion(), proxyApiVersion, 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 custom blocklists associated with the Azure OpenAI connection. + * + * @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 proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the custom blocklists associated with the Azure OpenAI connection along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String connectionName, String proxyApiVersion, 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 (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 + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + connectionName, this.client.getApiVersion(), proxyApiVersion, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets the custom blocklists associated with the Azure OpenAI connection. + * + * @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 proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the custom blocklists associated with the Azure OpenAI connection as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, + String workspaceName, String connectionName, String proxyApiVersion) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, connectionName, proxyApiVersion), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets the custom blocklists associated with the Azure OpenAI connection. + * + * @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 custom blocklists associated with the Azure OpenAI connection as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, + String workspaceName, String connectionName) { + final String proxyApiVersion = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, connectionName, proxyApiVersion), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets the custom blocklists associated with the Azure OpenAI connection. + * + * @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 proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the custom blocklists associated with the Azure OpenAI connection as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, + String workspaceName, String connectionName, String proxyApiVersion, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, connectionName, proxyApiVersion, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets the custom blocklists associated with the Azure OpenAI connection. + * + * @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 custom blocklists associated with the Azure OpenAI connection as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName) { + final String proxyApiVersion = null; + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, connectionName, proxyApiVersion)); + } + + /** + * Gets the custom blocklists associated with the Azure OpenAI connection. + * + * @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 proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the custom blocklists associated with the Azure OpenAI connection as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName, String proxyApiVersion, Context context) { + return new PagedIterable<>( + listAsync(resourceGroupName, workspaceName, connectionName, proxyApiVersion, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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/ConnectionRaiBlocklistsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistsImpl.java new file mode 100644 index 0000000000000..8b992acaab743 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiBlocklistsImpl.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.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiBlocklistsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.ConnectionRaiBlocklists; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistPropertiesBasicResource; + +public final class ConnectionRaiBlocklistsImpl implements ConnectionRaiBlocklists { + private static final ClientLogger LOGGER = new ClientLogger(ConnectionRaiBlocklistsImpl.class); + + private final ConnectionRaiBlocklistsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public ConnectionRaiBlocklistsImpl(ConnectionRaiBlocklistsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, connectionName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new RaiBlocklistPropertiesBasicResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName, String proxyApiVersion, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, connectionName, proxyApiVersion, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new RaiBlocklistPropertiesBasicResourceImpl(inner1, this.manager())); + } + + private ConnectionRaiBlocklistsClient 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/ConnectionRaiPoliciesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPoliciesClientImpl.java new file mode 100644 index 0000000000000..4ae4940b8849a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPoliciesClientImpl.java @@ -0,0 +1,325 @@ +// Copyright (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.ConnectionRaiPoliciesClient; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiPolicyPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyPropertiesBasicResourceArmPaginatedResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ConnectionRaiPoliciesClient. + */ +public final class ConnectionRaiPoliciesClientImpl implements ConnectionRaiPoliciesClient { + /** + * The proxy service used to perform REST calls. + */ + private final ConnectionRaiPoliciesService service; + + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningWorkspacesImpl client; + + /** + * Initializes an instance of ConnectionRaiPoliciesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ConnectionRaiPoliciesClientImpl(AzureMachineLearningWorkspacesImpl client) { + this.service = RestProxy.create(ConnectionRaiPoliciesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningWorkspacesConnectionRaiPolicies to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface ConnectionRaiPoliciesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiPolicies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@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("proxy-api-version") String proxyApiVersion, @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 the specified Content Filters associated with the Azure OpenAI connection. + * + * @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 proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource list along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String connectionName, String proxyApiVersion) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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.list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, connectionName, this.client.getApiVersion(), proxyApiVersion, 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 the specified Content Filters associated with the Azure OpenAI connection. + * + * @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 proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource list along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String connectionName, String proxyApiVersion, 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 (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 + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + connectionName, this.client.getApiVersion(), proxyApiVersion, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List the specified Content Filters associated with the Azure OpenAI connection. + * + * @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 proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource list as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, + String connectionName, String proxyApiVersion) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, connectionName, proxyApiVersion), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List the specified Content Filters associated with the Azure OpenAI connection. + * + * @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 azure OpenAI Content Filters resource list as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, + String connectionName) { + final String proxyApiVersion = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, connectionName, proxyApiVersion), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List the specified Content Filters associated with the Azure OpenAI connection. + * + * @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 proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource list as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, + String connectionName, String proxyApiVersion, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, connectionName, proxyApiVersion, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List the specified Content Filters associated with the Azure OpenAI connection. + * + * @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 azure OpenAI Content Filters resource list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName) { + final String proxyApiVersion = null; + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, connectionName, proxyApiVersion)); + } + + /** + * List the specified Content Filters associated with the Azure OpenAI connection. + * + * @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 proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName, String proxyApiVersion, Context context) { + return new PagedIterable<>( + listAsync(resourceGroupName, workspaceName, connectionName, proxyApiVersion, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource list along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource list 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/ConnectionRaiPoliciesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPoliciesImpl.java new file mode 100644 index 0000000000000..38ae883989f5a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPoliciesImpl.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.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearning.fluent.ConnectionRaiPoliciesClient; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiPolicyPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.ConnectionRaiPolicies; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyPropertiesBasicResource; + +public final class ConnectionRaiPoliciesImpl implements ConnectionRaiPolicies { + private static final ClientLogger LOGGER = new ClientLogger(ConnectionRaiPoliciesImpl.class); + + private final ConnectionRaiPoliciesClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public ConnectionRaiPoliciesImpl(ConnectionRaiPoliciesClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, connectionName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new RaiPolicyPropertiesBasicResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName, String proxyApiVersion, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, connectionName, proxyApiVersion, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new RaiPolicyPropertiesBasicResourceImpl(inner1, this.manager())); + } + + private ConnectionRaiPoliciesClient 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/ConnectionRaiPolicyOperationsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPolicyOperationsClientImpl.java new file mode 100644 index 0000000000000..c40ee949669a0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPolicyOperationsClientImpl.java @@ -0,0 +1,888 @@ +// Copyright (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.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.ConnectionRaiPolicyOperationsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiPolicyPropertiesBasicResourceInner; +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 ConnectionRaiPolicyOperationsClient. + */ +public final class ConnectionRaiPolicyOperationsClientImpl implements ConnectionRaiPolicyOperationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ConnectionRaiPolicyOperationsService service; + + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningWorkspacesImpl client; + + /** + * Initializes an instance of ConnectionRaiPolicyOperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ConnectionRaiPolicyOperationsClientImpl(AzureMachineLearningWorkspacesImpl client) { + this.service = RestProxy.create(ConnectionRaiPolicyOperationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningWorkspacesConnectionRaiPolicyOperations to be + * used by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface ConnectionRaiPolicyOperationsService { + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiPolicies/{raiPolicyName}") + @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("connectionName") String connectionName, @PathParam("raiPolicyName") String raiPolicyName, + @QueryParam("api-version") String apiVersion, @QueryParam("proxy-api-version") String proxyApiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/raiPolicies/{raiPolicyName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("raiPolicyName") String raiPolicyName, + @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}/connections/{connectionName}/raiPolicies/{raiPolicyName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("raiPolicyName") String raiPolicyName, + @QueryParam("api-version") String apiVersion, @QueryParam("proxy-api-version") String proxyApiVersion, + @BodyParam("application/json") RaiPolicyPropertiesBasicResourceInner body, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, String raiPolicyName, String proxyApiVersion) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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.")); + } + if (raiPolicyName == null) { + return Mono.error(new IllegalArgumentException("Parameter raiPolicyName 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, raiPolicyName, this.client.getApiVersion(), + proxyApiVersion, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, String raiPolicyName, String proxyApiVersion, 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 (connectionName == null) { + return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); + } + if (raiPolicyName == null) { + return Mono.error(new IllegalArgumentException("Parameter raiPolicyName 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, connectionName, raiPolicyName, this.client.getApiVersion(), proxyApiVersion, accept, + context); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 connectionName, String raiPolicyName, String proxyApiVersion) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, connectionName, raiPolicyName, proxyApiVersion); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 connectionName, String raiPolicyName) { + final String proxyApiVersion = null; + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, connectionName, raiPolicyName, proxyApiVersion); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 connectionName, String raiPolicyName, String proxyApiVersion, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, + connectionName, raiPolicyName, proxyApiVersion, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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 connectionName, String raiPolicyName) { + final String proxyApiVersion = null; + return this.beginDeleteAsync(resourceGroupName, workspaceName, connectionName, raiPolicyName, proxyApiVersion) + .getSyncPoller(); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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 connectionName, String raiPolicyName, String proxyApiVersion, Context context) { + return this + .beginDeleteAsync(resourceGroupName, workspaceName, connectionName, raiPolicyName, proxyApiVersion, context) + .getSyncPoller(); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, + String raiPolicyName, String proxyApiVersion) { + return beginDeleteAsync(resourceGroupName, workspaceName, connectionName, raiPolicyName, proxyApiVersion).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, + String raiPolicyName) { + final String proxyApiVersion = null; + return beginDeleteAsync(resourceGroupName, workspaceName, connectionName, raiPolicyName, proxyApiVersion).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, + String raiPolicyName, String proxyApiVersion, Context context) { + return beginDeleteAsync(resourceGroupName, workspaceName, connectionName, raiPolicyName, proxyApiVersion, + context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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, String raiPolicyName) { + final String proxyApiVersion = null; + deleteAsync(resourceGroupName, workspaceName, connectionName, raiPolicyName, proxyApiVersion).block(); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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, String raiPolicyName, + String proxyApiVersion, Context context) { + deleteAsync(resourceGroupName, workspaceName, connectionName, raiPolicyName, proxyApiVersion, context).block(); + } + + /** + * Gets the specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Content Filters associated with the Azure OpenAI connection along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String workspaceName, String connectionName, String raiPolicyName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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.")); + } + if (raiPolicyName == null) { + return Mono.error(new IllegalArgumentException("Parameter raiPolicyName 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, connectionName, raiPolicyName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Content Filters associated with the Azure OpenAI connection along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String workspaceName, String connectionName, String raiPolicyName, 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 (connectionName == null) { + return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); + } + if (raiPolicyName == null) { + return Mono.error(new IllegalArgumentException("Parameter raiPolicyName 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, + connectionName, raiPolicyName, this.client.getApiVersion(), accept, context); + } + + /** + * Gets the specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Content Filters associated with the Azure OpenAI connection on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String workspaceName, + String connectionName, String raiPolicyName) { + return getWithResponseAsync(resourceGroupName, workspaceName, connectionName, raiPolicyName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Content Filters associated with the Azure OpenAI connection along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, + String workspaceName, String connectionName, String raiPolicyName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, connectionName, raiPolicyName, context).block(); + } + + /** + * Gets the specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Content Filters associated with the Azure OpenAI connection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RaiPolicyPropertiesBasicResourceInner get(String resourceGroupName, String workspaceName, + String connectionName, String raiPolicyName) { + return getWithResponse(resourceGroupName, workspaceName, connectionName, raiPolicyName, Context.NONE) + .getValue(); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String workspaceName, + String connectionName, String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body, + String proxyApiVersion) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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.")); + } + if (raiPolicyName == null) { + return Mono.error(new IllegalArgumentException("Parameter raiPolicyName 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.create(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, connectionName, raiPolicyName, this.client.getApiVersion(), + proxyApiVersion, body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String workspaceName, + String connectionName, String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body, String proxyApiVersion, + 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 (connectionName == null) { + return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); + } + if (raiPolicyName == null) { + return Mono.error(new IllegalArgumentException("Parameter raiPolicyName 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.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, connectionName, raiPolicyName, this.client.getApiVersion(), proxyApiVersion, body, accept, + context); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, RaiPolicyPropertiesBasicResourceInner> + beginCreateAsync(String resourceGroupName, String workspaceName, String connectionName, String raiPolicyName, + RaiPolicyPropertiesBasicResourceInner body, String proxyApiVersion) { + Mono>> mono = createWithResponseAsync(resourceGroupName, workspaceName, + connectionName, raiPolicyName, body, proxyApiVersion); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), RaiPolicyPropertiesBasicResourceInner.class, + RaiPolicyPropertiesBasicResourceInner.class, this.client.getContext()); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @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 {@link PollerFlux} for polling of azure OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, RaiPolicyPropertiesBasicResourceInner> + beginCreateAsync(String resourceGroupName, String workspaceName, String connectionName, String raiPolicyName, + RaiPolicyPropertiesBasicResourceInner body) { + final String proxyApiVersion = null; + Mono>> mono = createWithResponseAsync(resourceGroupName, workspaceName, + connectionName, raiPolicyName, body, proxyApiVersion); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), RaiPolicyPropertiesBasicResourceInner.class, + RaiPolicyPropertiesBasicResourceInner.class, this.client.getContext()); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, RaiPolicyPropertiesBasicResourceInner> + beginCreateAsync(String resourceGroupName, String workspaceName, String connectionName, String raiPolicyName, + RaiPolicyPropertiesBasicResourceInner body, String proxyApiVersion, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createWithResponseAsync(resourceGroupName, workspaceName, + connectionName, raiPolicyName, body, proxyApiVersion, context); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), RaiPolicyPropertiesBasicResourceInner.class, + RaiPolicyPropertiesBasicResourceInner.class, context); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @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 {@link SyncPoller} for polling of azure OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, RaiPolicyPropertiesBasicResourceInner> + beginCreate(String resourceGroupName, String workspaceName, String connectionName, String raiPolicyName, + RaiPolicyPropertiesBasicResourceInner body) { + final String proxyApiVersion = null; + return this + .beginCreateAsync(resourceGroupName, workspaceName, connectionName, raiPolicyName, body, proxyApiVersion) + .getSyncPoller(); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, RaiPolicyPropertiesBasicResourceInner> + beginCreate(String resourceGroupName, String workspaceName, String connectionName, String raiPolicyName, + RaiPolicyPropertiesBasicResourceInner body, String proxyApiVersion, Context context) { + return this + .beginCreateAsync(resourceGroupName, workspaceName, connectionName, raiPolicyName, body, proxyApiVersion, + context) + .getSyncPoller(); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String workspaceName, + String connectionName, String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body, + String proxyApiVersion) { + return beginCreateAsync(resourceGroupName, workspaceName, connectionName, raiPolicyName, body, proxyApiVersion) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @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 azure OpenAI Content Filters resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String workspaceName, + String connectionName, String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body) { + final String proxyApiVersion = null; + return beginCreateAsync(resourceGroupName, workspaceName, connectionName, raiPolicyName, body, proxyApiVersion) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String workspaceName, + String connectionName, String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body, String proxyApiVersion, + Context context) { + return beginCreateAsync(resourceGroupName, workspaceName, connectionName, raiPolicyName, body, proxyApiVersion, + context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @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 azure OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RaiPolicyPropertiesBasicResourceInner create(String resourceGroupName, String workspaceName, + String connectionName, String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body) { + final String proxyApiVersion = null; + return createAsync(resourceGroupName, workspaceName, connectionName, raiPolicyName, body, proxyApiVersion) + .block(); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RaiPolicyPropertiesBasicResourceInner create(String resourceGroupName, String workspaceName, + String connectionName, String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body, String proxyApiVersion, + Context context) { + return createAsync(resourceGroupName, workspaceName, connectionName, raiPolicyName, body, proxyApiVersion, + context).block(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPolicyOperationsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPolicyOperationsImpl.java new file mode 100644 index 0000000000000..5e481e05f4c1c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionRaiPolicyOperationsImpl.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.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.ConnectionRaiPolicyOperationsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiPolicyPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.ConnectionRaiPolicyOperations; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyPropertiesBasicResource; + +public final class ConnectionRaiPolicyOperationsImpl implements ConnectionRaiPolicyOperations { + private static final ClientLogger LOGGER = new ClientLogger(ConnectionRaiPolicyOperationsImpl.class); + + private final ConnectionRaiPolicyOperationsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public ConnectionRaiPolicyOperationsImpl(ConnectionRaiPolicyOperationsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public void delete(String resourceGroupName, String workspaceName, String connectionName, String raiPolicyName) { + this.serviceClient().delete(resourceGroupName, workspaceName, connectionName, raiPolicyName); + } + + public void delete(String resourceGroupName, String workspaceName, String connectionName, String raiPolicyName, + String proxyApiVersion, Context context) { + this.serviceClient() + .delete(resourceGroupName, workspaceName, connectionName, raiPolicyName, proxyApiVersion, context); + } + + public Response getWithResponse(String resourceGroupName, String workspaceName, + String connectionName, String raiPolicyName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, workspaceName, connectionName, raiPolicyName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new RaiPolicyPropertiesBasicResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public RaiPolicyPropertiesBasicResource get(String resourceGroupName, String workspaceName, String connectionName, + String raiPolicyName) { + RaiPolicyPropertiesBasicResourceInner inner + = this.serviceClient().get(resourceGroupName, workspaceName, connectionName, raiPolicyName); + if (inner != null) { + return new RaiPolicyPropertiesBasicResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public RaiPolicyPropertiesBasicResource 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 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))); + } + String raiPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "raiPolicies"); + if (raiPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'raiPolicies'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, connectionName, raiPolicyName, 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 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))); + } + String raiPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "raiPolicies"); + if (raiPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'raiPolicies'.", id))); + } + return this.getWithResponse(resourceGroupName, workspaceName, connectionName, raiPolicyName, 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 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))); + } + String raiPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "raiPolicies"); + if (raiPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'raiPolicies'.", id))); + } + String localProxyApiVersion = null; + this.delete(resourceGroupName, workspaceName, connectionName, raiPolicyName, localProxyApiVersion, + Context.NONE); + } + + public void deleteByIdWithResponse(String id, String proxyApiVersion, 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 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))); + } + String raiPolicyName = ResourceManagerUtils.getValueFromIdByName(id, "raiPolicies"); + if (raiPolicyName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'raiPolicies'.", id))); + } + this.delete(resourceGroupName, workspaceName, connectionName, raiPolicyName, proxyApiVersion, context); + } + + private ConnectionRaiPolicyOperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + public RaiPolicyPropertiesBasicResourceImpl define(String name) { + return new RaiPolicyPropertiesBasicResourceImpl(name, this.manager()); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionsClientImpl.java new file mode 100644 index 0000000000000..a83feb9ebbc83 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionsClientImpl.java @@ -0,0 +1,1567 @@ +// Copyright (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.ConnectionsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelPropertiesInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelsInner; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult; +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 ConnectionsClient. + */ +public final class ConnectionsClientImpl implements ConnectionsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ConnectionsService service; + + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningWorkspacesImpl client; + + /** + * Initializes an instance of ConnectionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ConnectionsClientImpl(AzureMachineLearningWorkspacesImpl client) { + this.service + = RestProxy.create(ConnectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningWorkspacesConnections to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface ConnectionsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/deployments") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listDeployments( + @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("proxy-api-version") String proxyApiVersion, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/deployments/{deploymentName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> deleteDeployment(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("deploymentName") String deploymentName, + @QueryParam("api-version") String apiVersion, @QueryParam("proxy-api-version") String proxyApiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/deployments/{deploymentName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getDeployment( + @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @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}/connections/{connectionName}/deployments/{deploymentName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdateDeployment(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("connectionName") String connectionName, @PathParam("deploymentName") String deploymentName, + @QueryParam("api-version") String apiVersion, @QueryParam("proxy-api-version") String proxyApiVersion, + @BodyParam("application/json") EndpointDeploymentResourcePropertiesBasicResourceInner body, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/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("connectionName") String connectionName, @QueryParam("api-version") String apiVersion, + @QueryParam("proxy-api-version") String proxyApiVersion, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listConnectionModels") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getAllModels(@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" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listDeploymentsNext( + @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); + } + + /** + * Get all the deployments under the Azure OpenAI connection. + * + * @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 proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Azure OpenAI connection along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDeploymentsSinglePageAsync( + String resourceGroupName, String workspaceName, String connectionName, String proxyApiVersion) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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.listDeployments(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, connectionName, this.client.getApiVersion(), proxyApiVersion, 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 Azure OpenAI connection. + * + * @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 proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Azure OpenAI connection along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDeploymentsSinglePageAsync( + String resourceGroupName, String workspaceName, String connectionName, String proxyApiVersion, + 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 (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 + .listDeployments(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, connectionName, this.client.getApiVersion(), proxyApiVersion, 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 Azure OpenAI connection. + * + * @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 proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Azure OpenAI connection as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listDeploymentsAsync( + String resourceGroupName, String workspaceName, String connectionName, String proxyApiVersion) { + return new PagedFlux<>( + () -> listDeploymentsSinglePageAsync(resourceGroupName, workspaceName, connectionName, proxyApiVersion), + nextLink -> listDeploymentsNextSinglePageAsync(nextLink)); + } + + /** + * Get all the deployments under the Azure OpenAI connection. + * + * @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 all the deployments under the Azure OpenAI connection as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux + listDeploymentsAsync(String resourceGroupName, String workspaceName, String connectionName) { + final String proxyApiVersion = null; + return new PagedFlux<>( + () -> listDeploymentsSinglePageAsync(resourceGroupName, workspaceName, connectionName, proxyApiVersion), + nextLink -> listDeploymentsNextSinglePageAsync(nextLink)); + } + + /** + * Get all the deployments under the Azure OpenAI connection. + * + * @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 proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Azure OpenAI connection as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listDeploymentsAsync( + String resourceGroupName, String workspaceName, String connectionName, String proxyApiVersion, + Context context) { + return new PagedFlux<>(() -> listDeploymentsSinglePageAsync(resourceGroupName, workspaceName, connectionName, + proxyApiVersion, context), nextLink -> listDeploymentsNextSinglePageAsync(nextLink, context)); + } + + /** + * Get all the deployments under the Azure OpenAI connection. + * + * @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 all the deployments under the Azure OpenAI connection as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable + listDeployments(String resourceGroupName, String workspaceName, String connectionName) { + final String proxyApiVersion = null; + return new PagedIterable<>( + listDeploymentsAsync(resourceGroupName, workspaceName, connectionName, proxyApiVersion)); + } + + /** + * Get all the deployments under the Azure OpenAI connection. + * + * @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 proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Azure OpenAI connection as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDeployments( + String resourceGroupName, String workspaceName, String connectionName, String proxyApiVersion, + Context context) { + return new PagedIterable<>( + listDeploymentsAsync(resourceGroupName, workspaceName, connectionName, proxyApiVersion, context)); + } + + /** + * Delete Azure OpenAI connection 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 connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @param proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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>> deleteDeploymentWithResponseAsync(String resourceGroupName, + String workspaceName, String connectionName, String deploymentName, String proxyApiVersion) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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.")); + } + 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.deleteDeployment(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, connectionName, deploymentName, this.client.getApiVersion(), + proxyApiVersion, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete Azure OpenAI connection 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 connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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>> deleteDeploymentWithResponseAsync(String resourceGroupName, + String workspaceName, String connectionName, String deploymentName, String proxyApiVersion, 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 (connectionName == null) { + return Mono.error(new IllegalArgumentException("Parameter connectionName 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.deleteDeployment(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, connectionName, deploymentName, this.client.getApiVersion(), proxyApiVersion, accept, + context); + } + + /** + * Delete Azure OpenAI connection 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 connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @param proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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> beginDeleteDeploymentAsync(String resourceGroupName, + String workspaceName, String connectionName, String deploymentName, String proxyApiVersion) { + Mono>> mono = deleteDeploymentWithResponseAsync(resourceGroupName, workspaceName, + connectionName, deploymentName, proxyApiVersion); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete Azure OpenAI connection 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 connectionName Friendly name of the workspace connection. + * @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> beginDeleteDeploymentAsync(String resourceGroupName, + String workspaceName, String connectionName, String deploymentName) { + final String proxyApiVersion = null; + Mono>> mono = deleteDeploymentWithResponseAsync(resourceGroupName, workspaceName, + connectionName, deploymentName, proxyApiVersion); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete Azure OpenAI connection 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 connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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> beginDeleteDeploymentAsync(String resourceGroupName, + String workspaceName, String connectionName, String deploymentName, String proxyApiVersion, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteDeploymentWithResponseAsync(resourceGroupName, workspaceName, + connectionName, deploymentName, proxyApiVersion, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete Azure OpenAI connection 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 connectionName Friendly name of the workspace connection. + * @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> beginDeleteDeployment(String resourceGroupName, String workspaceName, + String connectionName, String deploymentName) { + final String proxyApiVersion = null; + return this + .beginDeleteDeploymentAsync(resourceGroupName, workspaceName, connectionName, deploymentName, + proxyApiVersion) + .getSyncPoller(); + } + + /** + * Delete Azure OpenAI connection 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 connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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> beginDeleteDeployment(String resourceGroupName, String workspaceName, + String connectionName, String deploymentName, String proxyApiVersion, Context context) { + return this + .beginDeleteDeploymentAsync(resourceGroupName, workspaceName, connectionName, deploymentName, + proxyApiVersion, context) + .getSyncPoller(); + } + + /** + * Delete Azure OpenAI connection 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 connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @param proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 deleteDeploymentAsync(String resourceGroupName, String workspaceName, String connectionName, + String deploymentName, String proxyApiVersion) { + return beginDeleteDeploymentAsync(resourceGroupName, workspaceName, connectionName, deploymentName, + proxyApiVersion).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete Azure OpenAI connection 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 connectionName Friendly name of the workspace connection. + * @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 deleteDeploymentAsync(String resourceGroupName, String workspaceName, String connectionName, + String deploymentName) { + final String proxyApiVersion = null; + return beginDeleteDeploymentAsync(resourceGroupName, workspaceName, connectionName, deploymentName, + proxyApiVersion).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete Azure OpenAI connection 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 connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 deleteDeploymentAsync(String resourceGroupName, String workspaceName, String connectionName, + String deploymentName, String proxyApiVersion, Context context) { + return beginDeleteDeploymentAsync(resourceGroupName, workspaceName, connectionName, deploymentName, + proxyApiVersion, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete Azure OpenAI connection 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 connectionName Friendly name of the workspace connection. + * @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 deleteDeployment(String resourceGroupName, String workspaceName, String connectionName, + String deploymentName) { + final String proxyApiVersion = null; + deleteDeploymentAsync(resourceGroupName, workspaceName, connectionName, deploymentName, proxyApiVersion) + .block(); + } + + /** + * Delete Azure OpenAI connection 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 connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 deleteDeployment(String resourceGroupName, String workspaceName, String connectionName, + String deploymentName, String proxyApiVersion, Context context) { + deleteDeploymentAsync(resourceGroupName, workspaceName, connectionName, deploymentName, proxyApiVersion, + context).block(); + } + + /** + * Get deployments under the Azure OpenAI connection 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 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 the Azure OpenAI connection by name along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDeploymentWithResponseAsync( + String resourceGroupName, String workspaceName, String connectionName, 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 (connectionName == null) { + return Mono.error(new IllegalArgumentException("Parameter connectionName 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.getDeployment(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, connectionName, deploymentName, this.client.getApiVersion(), accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get deployments under the Azure OpenAI connection 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 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 the Azure OpenAI connection by name along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDeploymentWithResponseAsync( + String resourceGroupName, String workspaceName, String connectionName, 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 (connectionName == null) { + return Mono.error(new IllegalArgumentException("Parameter connectionName 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.getDeployment(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, connectionName, deploymentName, this.client.getApiVersion(), accept, context); + } + + /** + * Get deployments under the Azure OpenAI connection 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 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 the Azure OpenAI connection by name on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getDeploymentAsync(String resourceGroupName, + String workspaceName, String connectionName, String deploymentName) { + return getDeploymentWithResponseAsync(resourceGroupName, workspaceName, connectionName, deploymentName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get deployments under the Azure OpenAI connection 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 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 the Azure OpenAI connection by name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeploymentWithResponse( + String resourceGroupName, String workspaceName, String connectionName, String deploymentName, Context context) { + return getDeploymentWithResponseAsync(resourceGroupName, workspaceName, connectionName, deploymentName, context) + .block(); + } + + /** + * Get deployments under the Azure OpenAI connection 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 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 the Azure OpenAI connection by name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EndpointDeploymentResourcePropertiesBasicResourceInner getDeployment(String resourceGroupName, + String workspaceName, String connectionName, String deploymentName) { + return getDeploymentWithResponse(resourceGroupName, workspaceName, connectionName, deploymentName, Context.NONE) + .getValue(); + } + + /** + * Create or update Azure OpenAI connection 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 connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @param body deployment object. + * @param proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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>> createOrUpdateDeploymentWithResponseAsync(String resourceGroupName, + String workspaceName, String connectionName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body, String proxyApiVersion) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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.")); + } + 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.createOrUpdateDeployment(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, deploymentName, + this.client.getApiVersion(), proxyApiVersion, body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update Azure OpenAI connection 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 connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @param body deployment object. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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>> createOrUpdateDeploymentWithResponseAsync(String resourceGroupName, + String workspaceName, String connectionName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body, String proxyApiVersion, 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 (connectionName == null) { + return Mono.error(new IllegalArgumentException("Parameter connectionName 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.createOrUpdateDeployment(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, connectionName, deploymentName, this.client.getApiVersion(), + proxyApiVersion, body, accept, context); + } + + /** + * Create or update Azure OpenAI connection 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 connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @param body deployment object. + * @param proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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> + beginCreateOrUpdateDeploymentAsync(String resourceGroupName, String workspaceName, String connectionName, + String deploymentName, EndpointDeploymentResourcePropertiesBasicResourceInner body, + String proxyApiVersion) { + Mono>> mono = createOrUpdateDeploymentWithResponseAsync(resourceGroupName, + workspaceName, connectionName, deploymentName, body, proxyApiVersion); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), EndpointDeploymentResourcePropertiesBasicResourceInner.class, + EndpointDeploymentResourcePropertiesBasicResourceInner.class, this.client.getContext()); + } + + /** + * Create or update Azure OpenAI connection 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 connectionName Friendly name of the workspace connection. + * @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> + beginCreateOrUpdateDeploymentAsync(String resourceGroupName, String workspaceName, String connectionName, + String deploymentName, EndpointDeploymentResourcePropertiesBasicResourceInner body) { + final String proxyApiVersion = null; + Mono>> mono = createOrUpdateDeploymentWithResponseAsync(resourceGroupName, + workspaceName, connectionName, deploymentName, body, proxyApiVersion); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), EndpointDeploymentResourcePropertiesBasicResourceInner.class, + EndpointDeploymentResourcePropertiesBasicResourceInner.class, this.client.getContext()); + } + + /** + * Create or update Azure OpenAI connection 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 connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @param body deployment object. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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> + beginCreateOrUpdateDeploymentAsync(String resourceGroupName, String workspaceName, String connectionName, + String deploymentName, EndpointDeploymentResourcePropertiesBasicResourceInner body, String proxyApiVersion, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateDeploymentWithResponseAsync(resourceGroupName, + workspaceName, connectionName, deploymentName, body, proxyApiVersion, context); + return this.client + .getLroResult( + mono, this.client.getHttpPipeline(), EndpointDeploymentResourcePropertiesBasicResourceInner.class, + EndpointDeploymentResourcePropertiesBasicResourceInner.class, context); + } + + /** + * Create or update Azure OpenAI connection 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 connectionName Friendly name of the workspace connection. + * @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> + beginCreateOrUpdateDeployment(String resourceGroupName, String workspaceName, String connectionName, + String deploymentName, EndpointDeploymentResourcePropertiesBasicResourceInner body) { + final String proxyApiVersion = null; + return this + .beginCreateOrUpdateDeploymentAsync(resourceGroupName, workspaceName, connectionName, deploymentName, body, + proxyApiVersion) + .getSyncPoller(); + } + + /** + * Create or update Azure OpenAI connection 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 connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @param body deployment object. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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> + beginCreateOrUpdateDeployment(String resourceGroupName, String workspaceName, String connectionName, + String deploymentName, EndpointDeploymentResourcePropertiesBasicResourceInner body, String proxyApiVersion, + Context context) { + return this + .beginCreateOrUpdateDeploymentAsync(resourceGroupName, workspaceName, connectionName, deploymentName, body, + proxyApiVersion, context) + .getSyncPoller(); + } + + /** + * Create or update Azure OpenAI connection 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 connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @param body deployment object. + * @param proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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 createOrUpdateDeploymentAsync( + String resourceGroupName, String workspaceName, String connectionName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body, String proxyApiVersion) { + return beginCreateOrUpdateDeploymentAsync(resourceGroupName, workspaceName, connectionName, deploymentName, + body, proxyApiVersion).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update Azure OpenAI connection 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 connectionName Friendly name of the workspace connection. + * @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 createOrUpdateDeploymentAsync( + String resourceGroupName, String workspaceName, String connectionName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body) { + final String proxyApiVersion = null; + return beginCreateOrUpdateDeploymentAsync(resourceGroupName, workspaceName, connectionName, deploymentName, + body, proxyApiVersion).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update Azure OpenAI connection 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 connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @param body deployment object. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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 createOrUpdateDeploymentAsync( + String resourceGroupName, String workspaceName, String connectionName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body, String proxyApiVersion, Context context) { + return beginCreateOrUpdateDeploymentAsync(resourceGroupName, workspaceName, connectionName, deploymentName, + body, proxyApiVersion, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update Azure OpenAI connection 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 connectionName Friendly name of the workspace connection. + * @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 createOrUpdateDeployment(String resourceGroupName, + String workspaceName, String connectionName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body) { + final String proxyApiVersion = null; + return createOrUpdateDeploymentAsync(resourceGroupName, workspaceName, connectionName, deploymentName, body, + proxyApiVersion).block(); + } + + /** + * Create or update Azure OpenAI connection 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 connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @param body deployment object. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 createOrUpdateDeployment(String resourceGroupName, + String workspaceName, String connectionName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body, String proxyApiVersion, Context context) { + return createOrUpdateDeploymentAsync(resourceGroupName, workspaceName, connectionName, deploymentName, body, + proxyApiVersion, context).block(); + } + + /** + * Get available models under the Azure OpenAI connection. + * + * @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 proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Azure OpenAI connection along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getModelsSinglePageAsync(String resourceGroupName, + String workspaceName, String connectionName, String proxyApiVersion) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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.getModels(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, connectionName, this.client.getApiVersion(), proxyApiVersion, 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 Azure OpenAI connection. + * + * @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 proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Azure OpenAI connection along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getModelsSinglePageAsync(String resourceGroupName, + String workspaceName, String connectionName, String proxyApiVersion, 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 (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 + .getModels(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + connectionName, this.client.getApiVersion(), proxyApiVersion, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get available models under the Azure OpenAI connection. + * + * @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 proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Azure OpenAI connection as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getModelsAsync(String resourceGroupName, String workspaceName, + String connectionName, String proxyApiVersion) { + return new PagedFlux<>( + () -> getModelsSinglePageAsync(resourceGroupName, workspaceName, connectionName, proxyApiVersion), + nextLink -> getModelsNextSinglePageAsync(nextLink)); + } + + /** + * Get available models under the Azure OpenAI connection. + * + * @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 available models under the Azure OpenAI connection as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getModelsAsync(String resourceGroupName, String workspaceName, + String connectionName) { + final String proxyApiVersion = null; + return new PagedFlux<>( + () -> getModelsSinglePageAsync(resourceGroupName, workspaceName, connectionName, proxyApiVersion), + nextLink -> getModelsNextSinglePageAsync(nextLink)); + } + + /** + * Get available models under the Azure OpenAI connection. + * + * @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 proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Azure OpenAI connection as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getModelsAsync(String resourceGroupName, String workspaceName, + String connectionName, String proxyApiVersion, Context context) { + return new PagedFlux<>( + () -> getModelsSinglePageAsync(resourceGroupName, workspaceName, connectionName, proxyApiVersion, context), + nextLink -> getModelsNextSinglePageAsync(nextLink, context)); + } + + /** + * Get available models under the Azure OpenAI connection. + * + * @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 available models under the Azure OpenAI connection as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getModels(String resourceGroupName, String workspaceName, + String connectionName) { + final String proxyApiVersion = null; + return new PagedIterable<>(getModelsAsync(resourceGroupName, workspaceName, connectionName, proxyApiVersion)); + } + + /** + * Get available models under the Azure OpenAI connection. + * + * @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 proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Azure OpenAI connection as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getModels(String resourceGroupName, String workspaceName, + String connectionName, String proxyApiVersion, Context context) { + return new PagedIterable<>( + getModelsAsync(resourceGroupName, workspaceName, connectionName, proxyApiVersion, context)); + } + + /** + * Get models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + * + * @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 models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAllModelsWithResponseAsync(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.getAllModels(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + * + * @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 models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAllModelsWithResponseAsync(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.getAllModels(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, this.client.getApiVersion(), accept, context); + } + + /** + * Get models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + * + * @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 models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAllModelsAsync(String resourceGroupName, String workspaceName) { + return getAllModelsWithResponseAsync(resourceGroupName, workspaceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + * + * @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 models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getAllModelsWithResponse(String resourceGroupName, String workspaceName, + Context context) { + return getAllModelsWithResponseAsync(resourceGroupName, workspaceName, context).block(); + } + + /** + * Get models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + * + * @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 models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EndpointModelsInner getAllModels(String resourceGroupName, String workspaceName) { + return getAllModelsWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listDeploymentsNextSinglePageAsync(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.listDeploymentsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listDeploymentsNextSinglePageAsync(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.listDeploymentsNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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/ConnectionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionsImpl.java new file mode 100644 index 0000000000000..7b8eb7b3af370 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ConnectionsImpl.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.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.ConnectionsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelPropertiesInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelsInner; +import com.azure.resourcemanager.machinelearning.models.Connections; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentResourcePropertiesBasicResource; +import com.azure.resourcemanager.machinelearning.models.EndpointModelProperties; +import com.azure.resourcemanager.machinelearning.models.EndpointModels; + +public final class ConnectionsImpl implements Connections { + private static final ClientLogger LOGGER = new ClientLogger(ConnectionsImpl.class); + + private final ConnectionsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public ConnectionsImpl(ConnectionsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listDeployments(String resourceGroupName, + String workspaceName, String connectionName) { + PagedIterable inner + = this.serviceClient().listDeployments(resourceGroupName, workspaceName, connectionName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new EndpointDeploymentResourcePropertiesBasicResourceImpl(inner1, this.manager())); + } + + public PagedIterable listDeployments(String resourceGroupName, + String workspaceName, String connectionName, String proxyApiVersion, Context context) { + PagedIterable inner = this.serviceClient() + .listDeployments(resourceGroupName, workspaceName, connectionName, proxyApiVersion, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new EndpointDeploymentResourcePropertiesBasicResourceImpl(inner1, this.manager())); + } + + public void deleteDeployment(String resourceGroupName, String workspaceName, String connectionName, + String deploymentName) { + this.serviceClient().deleteDeployment(resourceGroupName, workspaceName, connectionName, deploymentName); + } + + public void deleteDeployment(String resourceGroupName, String workspaceName, String connectionName, + String deploymentName, String proxyApiVersion, Context context) { + this.serviceClient() + .deleteDeployment(resourceGroupName, workspaceName, connectionName, deploymentName, proxyApiVersion, + context); + } + + public Response getDeploymentWithResponse( + String resourceGroupName, String workspaceName, String connectionName, String deploymentName, Context context) { + Response inner = this.serviceClient() + .getDeploymentWithResponse(resourceGroupName, workspaceName, connectionName, 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 getDeployment(String resourceGroupName, + String workspaceName, String connectionName, String deploymentName) { + EndpointDeploymentResourcePropertiesBasicResourceInner inner + = this.serviceClient().getDeployment(resourceGroupName, workspaceName, connectionName, deploymentName); + if (inner != null) { + return new EndpointDeploymentResourcePropertiesBasicResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable getModels(String resourceGroupName, String workspaceName, + String connectionName) { + PagedIterable inner + = this.serviceClient().getModels(resourceGroupName, workspaceName, connectionName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EndpointModelPropertiesImpl(inner1, this.manager())); + } + + public PagedIterable getModels(String resourceGroupName, String workspaceName, + String connectionName, String proxyApiVersion, Context context) { + PagedIterable inner = this.serviceClient() + .getModels(resourceGroupName, workspaceName, connectionName, proxyApiVersion, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new EndpointModelPropertiesImpl(inner1, this.manager())); + } + + public Response getAllModelsWithResponse(String resourceGroupName, String workspaceName, + Context context) { + Response inner + = this.serviceClient().getAllModelsWithResponse(resourceGroupName, workspaceName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new EndpointModelsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public EndpointModels getAllModels(String resourceGroupName, String workspaceName) { + EndpointModelsInner inner = this.serviceClient().getAllModels(resourceGroupName, workspaceName); + if (inner != null) { + return new EndpointModelsImpl(inner, this.manager()); + } else { + return null; + } + } + + public EndpointDeploymentResourcePropertiesBasicResource getDeploymentById(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 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))); + } + 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 + .getDeploymentWithResponse(resourceGroupName, workspaceName, connectionName, deploymentName, Context.NONE) + .getValue(); + } + + public Response getDeploymentByIdWithResponse(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 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))); + } + 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.getDeploymentWithResponse(resourceGroupName, workspaceName, connectionName, deploymentName, + context); + } + + public void deleteDeploymentById(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 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))); + } + 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))); + } + String localProxyApiVersion = null; + this.deleteDeployment(resourceGroupName, workspaceName, connectionName, deploymentName, localProxyApiVersion, + Context.NONE); + } + + public void deleteDeploymentByIdWithResponse(String id, String proxyApiVersion, 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 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))); + } + 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.deleteDeployment(resourceGroupName, workspaceName, connectionName, deploymentName, proxyApiVersion, + context); + } + + private ConnectionsClient 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/DatastoreImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreImpl.java index 5aa80a944ac61..9c4a909137829 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 @@ -11,6 +11,7 @@ import com.azure.resourcemanager.machinelearning.models.Datastore; import com.azure.resourcemanager.machinelearning.models.DatastoreProperties; import com.azure.resourcemanager.machinelearning.models.DatastoreSecrets; +import com.azure.resourcemanager.machinelearning.models.SecretExpiry; public final class DatastoreImpl implements Datastore, Datastore.Definition, Datastore.Update { private DatastoreInner innerObject; @@ -138,8 +139,9 @@ public Datastore refresh(Context context) { return this; } - public Response listSecretsWithResponse(Context context) { - return serviceManager.datastores().listSecretsWithResponse(resourceGroupName, workspaceName, name, context); + public Response listSecretsWithResponse(SecretExpiry body, Context context) { + return serviceManager.datastores() + .listSecretsWithResponse(resourceGroupName, workspaceName, name, body, context); } public DatastoreSecrets listSecrets() { 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 98b657dec3205..a3fe06de6c518 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 @@ -33,6 +33,7 @@ import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreInner; import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner; import com.azure.resourcemanager.machinelearning.models.DatastoreResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.models.SecretExpiry; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; @@ -122,7 +123,7 @@ Mono> listSecrets(@HostParam("$host") String end @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); + @BodyParam("application/json") SecretExpiry body, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @@ -777,6 +778,7 @@ public DatastoreInner createOrUpdate(String resourceGroupName, String workspaceN * @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. + * @param body Secret expiry information. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -784,7 +786,7 @@ public DatastoreInner createOrUpdate(String resourceGroupName, String workspaceN */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSecretsWithResponseAsync(String resourceGroupName, - String workspaceName, String name) { + String workspaceName, String name, SecretExpiry body) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -803,10 +805,13 @@ private Mono> listSecretsWithResponseAsync(Strin if (name == null) { return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); } + if (body != null) { + body.validate(); + } 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)) + resourceGroupName, workspaceName, name, this.client.getApiVersion(), body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -816,6 +821,7 @@ private Mono> listSecretsWithResponseAsync(Strin * @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. + * @param body Secret expiry information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -824,7 +830,7 @@ private Mono> listSecretsWithResponseAsync(Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSecretsWithResponseAsync(String resourceGroupName, - String workspaceName, String name, Context context) { + String workspaceName, String name, SecretExpiry body, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -843,10 +849,13 @@ private Mono> listSecretsWithResponseAsync(Strin if (name == null) { return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); } + if (body != null) { + body.validate(); + } 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); + workspaceName, name, this.client.getApiVersion(), body, accept, context); } /** @@ -862,7 +871,8 @@ private Mono> listSecretsWithResponseAsync(Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listSecretsAsync(String resourceGroupName, String workspaceName, String name) { - return listSecretsWithResponseAsync(resourceGroupName, workspaceName, name) + final SecretExpiry body = null; + return listSecretsWithResponseAsync(resourceGroupName, workspaceName, name, body) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -872,6 +882,7 @@ private Mono listSecretsAsync(String resourceGroupName, S * @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. + * @param body Secret expiry information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -880,8 +891,8 @@ private Mono listSecretsAsync(String resourceGroupName, S */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listSecretsWithResponse(String resourceGroupName, String workspaceName, - String name, Context context) { - return listSecretsWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); + String name, SecretExpiry body, Context context) { + return listSecretsWithResponseAsync(resourceGroupName, workspaceName, name, body, context).block(); } /** @@ -897,7 +908,8 @@ public Response listSecretsWithResponse(String resourceGr */ @ServiceMethod(returns = ReturnType.SINGLE) public DatastoreSecretsInner listSecrets(String resourceGroupName, String workspaceName, String name) { - return listSecretsWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); + final SecretExpiry body = null; + return listSecretsWithResponse(resourceGroupName, workspaceName, name, body, Context.NONE).getValue(); } /** 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 fa7812fdde1c5..4c47b375c5748 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 @@ -13,8 +13,9 @@ import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreInner; import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner; import com.azure.resourcemanager.machinelearning.models.Datastore; -import com.azure.resourcemanager.machinelearning.models.Datastores; import com.azure.resourcemanager.machinelearning.models.DatastoreSecrets; +import com.azure.resourcemanager.machinelearning.models.Datastores; +import com.azure.resourcemanager.machinelearning.models.SecretExpiry; import java.util.List; public final class DatastoresImpl implements Datastores { @@ -74,9 +75,9 @@ public Datastore get(String resourceGroupName, String workspaceName, String name } public Response listSecretsWithResponse(String resourceGroupName, String workspaceName, - String name, Context context) { + String name, SecretExpiry body, Context context) { Response inner - = this.serviceClient().listSecretsWithResponse(resourceGroupName, workspaceName, name, context); + = this.serviceClient().listSecretsWithResponse(resourceGroupName, workspaceName, name, body, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new DatastoreSecretsImpl(inner.getValue(), this.manager())); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DeltaModelStatusResponseImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DeltaModelStatusResponseImpl.java new file mode 100644 index 0000000000000..d190cbd5a09a0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DeltaModelStatusResponseImpl.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.resourcemanager.machinelearning.fluent.models.DeltaModelStatusResponseInner; +import com.azure.resourcemanager.machinelearning.models.DeltaModelCurrentState; +import com.azure.resourcemanager.machinelearning.models.DeltaModelStatusResponse; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class DeltaModelStatusResponseImpl implements DeltaModelStatusResponse { + private DeltaModelStatusResponseInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + DeltaModelStatusResponseImpl(DeltaModelStatusResponseInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public Integer actualInstanceCount() { + return this.innerModel().actualInstanceCount(); + } + + public Map> deltaModels() { + Map> inner = this.innerModel().deltaModels(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public Integer expectedInstanceCount() { + return this.innerModel().expectedInstanceCount(); + } + + public String revisionId() { + return this.innerModel().revisionId(); + } + + public String targetBaseModel() { + return this.innerModel().targetBaseModel(); + } + + public DeltaModelStatusResponseInner 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/EndpointAuthTokenImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointAuthTokenImpl.java index 9746d7e9d7941..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 @@ -22,10 +22,6 @@ public String accessToken() { return this.innerModel().accessToken(); } - public String tokenType() { - return this.innerModel().tokenType(); - } - public Long expiryTimeUtc() { return this.innerModel().expiryTimeUtc(); } @@ -34,6 +30,10 @@ public Long refreshAfterTimeUtc() { return this.innerModel().refreshAfterTimeUtc(); } + public String tokenType() { + return this.innerModel().tokenType(); + } + public EndpointAuthTokenInner innerModel() { return this.innerObject; } 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..ff0034ccd686e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointDeploymentResourcePropertiesBasicResourceImpl.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.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 connectionName; + + private String deploymentName; + + private String createProxyApiVersion; + + private String updateProxyApiVersion; + + public EndpointDeploymentResourcePropertiesBasicResourceImpl withExistingConnection(String resourceGroupName, + String workspaceName, String connectionName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + this.connectionName = connectionName; + return this; + } + + public EndpointDeploymentResourcePropertiesBasicResource create() { + this.innerObject = serviceManager.serviceClient() + .getConnections() + .createOrUpdateDeployment(resourceGroupName, workspaceName, connectionName, deploymentName, + this.innerModel(), createProxyApiVersion, Context.NONE); + return this; + } + + public EndpointDeploymentResourcePropertiesBasicResource create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getConnections() + .createOrUpdateDeployment(resourceGroupName, workspaceName, connectionName, deploymentName, + this.innerModel(), createProxyApiVersion, context); + return this; + } + + EndpointDeploymentResourcePropertiesBasicResourceImpl(String name, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new EndpointDeploymentResourcePropertiesBasicResourceInner(); + this.serviceManager = serviceManager; + this.deploymentName = name; + this.createProxyApiVersion = null; + } + + public EndpointDeploymentResourcePropertiesBasicResourceImpl update() { + this.updateProxyApiVersion = null; + return this; + } + + public EndpointDeploymentResourcePropertiesBasicResource apply() { + this.innerObject = serviceManager.serviceClient() + .getConnections() + .createOrUpdateDeployment(resourceGroupName, workspaceName, connectionName, deploymentName, + this.innerModel(), updateProxyApiVersion, Context.NONE); + return this; + } + + public EndpointDeploymentResourcePropertiesBasicResource apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getConnections() + .createOrUpdateDeployment(resourceGroupName, workspaceName, connectionName, deploymentName, + this.innerModel(), updateProxyApiVersion, 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.connectionName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "connections"); + this.deploymentName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "deployments"); + } + + public EndpointDeploymentResourcePropertiesBasicResource refresh() { + this.innerObject = serviceManager.serviceClient() + .getConnections() + .getDeploymentWithResponse(resourceGroupName, workspaceName, connectionName, deploymentName, Context.NONE) + .getValue(); + return this; + } + + public EndpointDeploymentResourcePropertiesBasicResource refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getConnections() + .getDeploymentWithResponse(resourceGroupName, workspaceName, connectionName, deploymentName, context) + .getValue(); + return this; + } + + public EndpointDeploymentResourcePropertiesBasicResourceImpl + withProperties(EndpointDeploymentResourceProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public EndpointDeploymentResourcePropertiesBasicResourceImpl withProxyApiVersion(String proxyApiVersion) { + if (isInCreateMode()) { + this.createProxyApiVersion = proxyApiVersion; + return this; + } else { + this.updateProxyApiVersion = proxyApiVersion; + 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/EndpointDeploymentsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointDeploymentsClientImpl.java new file mode 100644 index 0000000000000..7878b1c216b8e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointDeploymentsClientImpl.java @@ -0,0 +1,1318 @@ +// Copyright (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 AzureMachineLearningWorkspacesImpl client; + + /** + * Initializes an instance of EndpointDeploymentsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + EndpointDeploymentsClientImpl(AzureMachineLearningWorkspacesImpl client) { + this.service = RestProxy.create(EndpointDeploymentsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningWorkspacesEndpointDeployments 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, @QueryParam("proxy-api-version") String proxyApiVersion, + @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. + * @param proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, String proxyApiVersion) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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(), + proxyApiVersion, 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 proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, String proxyApiVersion, 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(), proxyApiVersion, 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. + * @param proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, String proxyApiVersion) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, proxyApiVersion); + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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) { + final String proxyApiVersion = null; + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, proxyApiVersion); + 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 proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, String proxyApiVersion, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, + deploymentName, proxyApiVersion, 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) { + final String proxyApiVersion = null; + return this.beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName, proxyApiVersion) + .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 proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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, String proxyApiVersion, Context context) { + return this + .beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName, proxyApiVersion, 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. + * @param proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, String proxyApiVersion) { + return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName, proxyApiVersion).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. + * @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) { + final String proxyApiVersion = null; + return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName, proxyApiVersion).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 proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, String proxyApiVersion, Context context) { + return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName, proxyApiVersion, + 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) { + final String proxyApiVersion = null; + deleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName, proxyApiVersion).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 proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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, + String proxyApiVersion, Context context) { + deleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName, proxyApiVersion, 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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..eb2f1df67cb52 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointDeploymentsImpl.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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, + String proxyApiVersion, Context context) { + this.serviceClient() + .delete(resourceGroupName, workspaceName, endpointName, deploymentName, proxyApiVersion, 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 createOrUpdate(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body) { + EndpointDeploymentResourcePropertiesBasicResourceInner inner + = this.serviceClient().createOrUpdate(resourceGroupName, workspaceName, endpointName, deploymentName, body); + if (inner != null) { + return new EndpointDeploymentResourcePropertiesBasicResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public EndpointDeploymentResourcePropertiesBasicResource createOrUpdate(String resourceGroupName, + String workspaceName, String endpointName, String deploymentName, + EndpointDeploymentResourcePropertiesBasicResourceInner body, Context context) { + EndpointDeploymentResourcePropertiesBasicResourceInner inner = this.serviceClient() + .createOrUpdate(resourceGroupName, workspaceName, endpointName, deploymentName, body, context); + if (inner != null) { + return new EndpointDeploymentResourcePropertiesBasicResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + private EndpointDeploymentsClient 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/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/EndpointModelPropertiesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointModelPropertiesImpl.java new file mode 100644 index 0000000000000..07aef7628b2b1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointModelPropertiesImpl.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.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelPropertiesInner; +import com.azure.resourcemanager.machinelearning.models.EndpointModelDeprecationProperties; +import com.azure.resourcemanager.machinelearning.models.EndpointModelProperties; +import com.azure.resourcemanager.machinelearning.models.EndpointModelSkuProperties; +import com.azure.resourcemanager.machinelearning.models.ModelLifecycleStatus; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class EndpointModelPropertiesImpl implements EndpointModelProperties { + private EndpointModelPropertiesInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + EndpointModelPropertiesImpl(EndpointModelPropertiesInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public Map capabilities() { + Map inner = this.innerModel().capabilities(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public EndpointModelDeprecationProperties deprecation() { + return this.innerModel().deprecation(); + } + + public Map finetuneCapabilities() { + Map inner = this.innerModel().finetuneCapabilities(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public String format() { + return this.innerModel().format(); + } + + public Boolean isDefaultVersion() { + return this.innerModel().isDefaultVersion(); + } + + public ModelLifecycleStatus lifecycleStatus() { + return this.innerModel().lifecycleStatus(); + } + + public Integer maxCapacity() { + return this.innerModel().maxCapacity(); + } + + public String name() { + return this.innerModel().name(); + } + + public List skus() { + List inner = this.innerModel().skus(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String version() { + return this.innerModel().version(); + } + + public EndpointModelPropertiesInner 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/EndpointModelsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointModelsImpl.java new file mode 100644 index 0000000000000..51827c438f80b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointModelsImpl.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.implementation; + +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelPropertiesInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelsInner; +import com.azure.resourcemanager.machinelearning.models.EndpointModelProperties; +import com.azure.resourcemanager.machinelearning.models.EndpointModels; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class EndpointModelsImpl implements EndpointModels { + private EndpointModelsInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + EndpointModelsImpl(EndpointModelsInner innerObject, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String nextLink() { + return this.innerModel().nextLink(); + } + + public List value() { + List inner = this.innerModel().value(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new EndpointModelPropertiesImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public EndpointModelsInner 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 a9770051f489b..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 @@ -23,10 +23,23 @@ public final class EndpointPropertiesBaseImpl implements EndpointPropertiesBase this.serviceManager = serviceManager; } + public EndpointAuthMode authMode() { + return this.innerModel().authMode(); + } + public String description() { return this.innerModel().description(); } + public EndpointAuthKeys keys() { + EndpointAuthKeysInner inner = this.innerModel().keys(); + if (inner != null) { + return new EndpointAuthKeysImpl(inner, this.manager()); + } else { + return null; + } + } + public Map properties() { Map inner = this.innerModel().properties(); if (inner != null) { @@ -44,19 +57,6 @@ public String swaggerUri() { return this.innerModel().swaggerUri(); } - public EndpointAuthMode authMode() { - return this.innerModel().authMode(); - } - - public EndpointAuthKeys keys() { - EndpointAuthKeysInner inner = this.innerModel().keys(); - if (inner != null) { - return new EndpointAuthKeysImpl(inner, this.manager()); - } else { - return null; - } - } - public EndpointPropertiesBaseInner innerModel() { return this.innerObject; } 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..24e0386ec1827 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointResourcePropertiesBasicResourceImpl.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.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..131aaff918040 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointsClientImpl.java @@ -0,0 +1,1313 @@ +// Copyright (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.EndpointKeysInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelPropertiesInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelsInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointResourcePropertiesBasicResourceInner; +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 AzureMachineLearningWorkspacesImpl client; + + /** + * Initializes an instance of EndpointsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + EndpointsClientImpl(AzureMachineLearningWorkspacesImpl client) { + this.service + = RestProxy.create(EndpointsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningWorkspacesEndpoints 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("includeOnlineEndpoints") Boolean includeOnlineEndpoints, + @QueryParam("includeServerlessEndpoints") Boolean includeServerlessEndpoints, + @QueryParam("includeConnections") Boolean includeConnections, @QueryParam("$skip") String skip, + @QueryParam("$expand") String expand, @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 includeOnlineEndpoints The includeOnlineEndpoints parameter. + * @param includeServerlessEndpoints The includeServerlessEndpoints parameter. + * @param includeConnections The includeConnections parameter. + * @param skip Continuation token for pagination. + * @param expand Whether the endpoint resource will be expand to include deployment information, e.g. + * $expand=deployments. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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, Boolean includeOnlineEndpoints, + Boolean includeServerlessEndpoints, Boolean includeConnections, String skip, String expand) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + 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, includeOnlineEndpoints, + includeServerlessEndpoints, includeConnections, skip, expand, accept, context)) + .>map( + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * 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 includeOnlineEndpoints The includeOnlineEndpoints parameter. + * @param includeServerlessEndpoints The includeServerlessEndpoints parameter. + * @param includeConnections The includeConnections parameter. + * @param skip Continuation token for pagination. + * @param expand Whether the endpoint resource will be expand to include deployment information, e.g. + * $expand=deployments. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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, Boolean includeOnlineEndpoints, + Boolean includeServerlessEndpoints, Boolean includeConnections, String skip, String expand, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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, includeOnlineEndpoints, includeServerlessEndpoints, + includeConnections, skip, expand, 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 includeOnlineEndpoints The includeOnlineEndpoints parameter. + * @param includeServerlessEndpoints The includeServerlessEndpoints parameter. + * @param includeConnections The includeConnections parameter. + * @param skip Continuation token for pagination. + * @param expand Whether the endpoint resource will be expand to include deployment information, e.g. + * $expand=deployments. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, Boolean includeOnlineEndpoints, + Boolean includeServerlessEndpoints, Boolean includeConnections, String skip, String expand) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, endpointType, includeOnlineEndpoints, + includeServerlessEndpoints, includeConnections, skip, expand), + 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 Boolean includeOnlineEndpoints = null; + final Boolean includeServerlessEndpoints = null; + final Boolean includeConnections = null; + final String skip = null; + final String expand = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, endpointType, includeOnlineEndpoints, + includeServerlessEndpoints, includeConnections, skip, expand), + 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 includeOnlineEndpoints The includeOnlineEndpoints parameter. + * @param includeServerlessEndpoints The includeServerlessEndpoints parameter. + * @param includeConnections The includeConnections parameter. + * @param skip Continuation token for pagination. + * @param expand Whether the endpoint resource will be expand to include deployment information, e.g. + * $expand=deployments. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, Boolean includeOnlineEndpoints, + Boolean includeServerlessEndpoints, Boolean includeConnections, String skip, String expand, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, endpointType, includeOnlineEndpoints, + includeServerlessEndpoints, includeConnections, skip, expand, 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 Boolean includeOnlineEndpoints = null; + final Boolean includeServerlessEndpoints = null; + final Boolean includeConnections = null; + final String skip = null; + final String expand = null; + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, endpointType, includeOnlineEndpoints, + includeServerlessEndpoints, includeConnections, skip, expand)); + } + + /** + * 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 includeOnlineEndpoints The includeOnlineEndpoints parameter. + * @param includeServerlessEndpoints The includeServerlessEndpoints parameter. + * @param includeConnections The includeConnections parameter. + * @param skip Continuation token for pagination. + * @param expand Whether the endpoint resource will be expand to include deployment information, e.g. + * $expand=deployments. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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, Boolean includeOnlineEndpoints, + Boolean includeServerlessEndpoints, Boolean includeConnections, String skip, String expand, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, endpointType, includeOnlineEndpoints, + includeServerlessEndpoints, includeConnections, skip, expand, 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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..35568a652e38f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointsImpl.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.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.EndpointKeysInner; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelPropertiesInner; +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.EndpointModelProperties; +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, Boolean includeOnlineEndpoints, Boolean includeServerlessEndpoints, + Boolean includeConnections, String skip, String expand, Context context) { + PagedIterable inner = this.serviceClient() + .list(resourceGroupName, workspaceName, endpointType, includeOnlineEndpoints, includeServerlessEndpoints, + includeConnections, skip, expand, 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 EndpointModelPropertiesImpl(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 EndpointModelPropertiesImpl(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/ExternalFqdnResponseImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ExternalFqdnResponseImpl.java index 230f8d479695d..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; @@ -21,8 +21,8 @@ public final class ExternalFqdnResponseImpl implements ExternalFqdnResponse { 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/GroupStatusImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/GroupStatusImpl.java new file mode 100644 index 0000000000000..b80e2ec2bb657 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/GroupStatusImpl.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.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 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..7e47e735bc4b6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceEndpointImpl.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.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..e7ba6d3885afe --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceEndpointsClientImpl.java @@ -0,0 +1,1330 @@ +// Copyright (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 AzureMachineLearningWorkspacesImpl client; + + /** + * Initializes an instance of InferenceEndpointsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + InferenceEndpointsClientImpl(AzureMachineLearningWorkspacesImpl client) { + this.service = RestProxy.create(InferenceEndpointsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningWorkspacesInferenceEndpoints 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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..a128d7fb6347d --- /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..0beeea84afe28 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceGroupImpl.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.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..98a096717d354 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceGroupsClientImpl.java @@ -0,0 +1,2485 @@ +// Copyright (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.DeltaModelStatusResponseInner; +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.DeltaModelListRequest; +import com.azure.resourcemanager.machinelearning.models.DeltaModelModifyRequest; +import com.azure.resourcemanager.machinelearning.models.DeltaModelStatusRequest; +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 com.azure.resourcemanager.machinelearning.models.StringArmPaginatedResult; +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 AzureMachineLearningWorkspacesImpl client; + + /** + * Initializes an instance of InferenceGroupsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + InferenceGroupsClientImpl(AzureMachineLearningWorkspacesImpl client) { + this.service + = RestProxy.create(InferenceGroupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningWorkspacesInferenceGroups 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}/deltaModels/getStatus") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getDeltaModelsStatusAsync(@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") DeltaModelStatusRequest 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}/deltaModels/list") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listDeltaModelsAsync(@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") DeltaModelListRequest 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}/deltaModels/modify") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> modifyDeltaModelsAsync(@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") DeltaModelModifyRequest 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> listDeltaModelsAsyncNext( + @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 status of delta models associated with the InferenceGroup and the target base model. + * + * @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 DeltaModelBaseRequest. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return contract returning to user the delta models along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDeltaModelsStatusAsyncWithResponseAsync( + String resourceGroupName, String workspaceName, String poolName, String groupName, + DeltaModelStatusRequest 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.getDeltaModelsStatusAsync(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())); + } + + /** + * Retrieve status of delta models associated with the InferenceGroup and the target base model. + * + * @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 DeltaModelBaseRequest. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return contract returning to user the delta models along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDeltaModelsStatusAsyncWithResponseAsync( + String resourceGroupName, String workspaceName, String poolName, String groupName, DeltaModelStatusRequest 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.getDeltaModelsStatusAsync(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, poolName, groupName, this.client.getApiVersion(), body, accept, context); + } + + /** + * Retrieve status of delta models associated with the InferenceGroup and the target base model. + * + * @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 DeltaModelBaseRequest. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return contract returning to user the delta models on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getDeltaModelsStatusAsyncAsync(String resourceGroupName, + String workspaceName, String poolName, String groupName, DeltaModelStatusRequest body) { + return getDeltaModelsStatusAsyncWithResponseAsync(resourceGroupName, workspaceName, poolName, groupName, body) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Retrieve status of delta models associated with the InferenceGroup and the target base model. + * + * @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 DeltaModelBaseRequest. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return contract returning to user the delta models along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeltaModelsStatusAsyncWithResponse(String resourceGroupName, + String workspaceName, String poolName, String groupName, DeltaModelStatusRequest body, Context context) { + return getDeltaModelsStatusAsyncWithResponseAsync(resourceGroupName, workspaceName, poolName, groupName, body, + context).block(); + } + + /** + * Retrieve status of delta models associated with the InferenceGroup and the target base model. + * + * @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 DeltaModelBaseRequest. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return contract returning to user the delta models. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeltaModelStatusResponseInner getDeltaModelsStatusAsync(String resourceGroupName, String workspaceName, + String poolName, String groupName, DeltaModelStatusRequest body) { + return getDeltaModelsStatusAsyncWithResponse(resourceGroupName, workspaceName, poolName, groupName, body, + Context.NONE).getValue(); + } + + /** + * List delta models associated with the InferenceGroup and the target base model. + * + * @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 DeltaModelBaseRequest. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of String entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDeltaModelsAsyncSinglePageAsync(String resourceGroupName, + String workspaceName, String poolName, String groupName, DeltaModelListRequest 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.listDeltaModelsAsync(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, poolName, groupName, + this.client.getApiVersion(), body, 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 delta models associated with the InferenceGroup and the target base model. + * + * @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 DeltaModelBaseRequest. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of String entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDeltaModelsAsyncSinglePageAsync(String resourceGroupName, + String workspaceName, String poolName, String groupName, DeltaModelListRequest 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 + .listDeltaModelsAsync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, poolName, groupName, this.client.getApiVersion(), body, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List delta models associated with the InferenceGroup and the target base model. + * + * @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 DeltaModelBaseRequest. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of String entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listDeltaModelsAsyncAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName, DeltaModelListRequest body) { + return new PagedFlux<>( + () -> listDeltaModelsAsyncSinglePageAsync(resourceGroupName, workspaceName, poolName, groupName, body), + nextLink -> listDeltaModelsAsyncNextSinglePageAsync(nextLink)); + } + + /** + * List delta models associated with the InferenceGroup and the target base model. + * + * @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 DeltaModelBaseRequest. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of String entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listDeltaModelsAsyncAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName, DeltaModelListRequest body, Context context) { + return new PagedFlux<>(() -> listDeltaModelsAsyncSinglePageAsync(resourceGroupName, workspaceName, poolName, + groupName, body, context), nextLink -> listDeltaModelsAsyncNextSinglePageAsync(nextLink, context)); + } + + /** + * List delta models associated with the InferenceGroup and the target base model. + * + * @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 DeltaModelBaseRequest. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of String entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDeltaModelsAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName, DeltaModelListRequest body) { + return new PagedIterable<>( + listDeltaModelsAsyncAsync(resourceGroupName, workspaceName, poolName, groupName, body)); + } + + /** + * List delta models associated with the InferenceGroup and the target base model. + * + * @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 DeltaModelBaseRequest. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of String entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDeltaModelsAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName, DeltaModelListRequest body, Context context) { + return new PagedIterable<>( + listDeltaModelsAsyncAsync(resourceGroupName, workspaceName, poolName, groupName, body, context)); + } + + /** + * Modify delta models associated with the InferenceGroup and the target base model. + * + * @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 DeltaModelModifyRequest. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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>> modifyDeltaModelsAsyncWithResponseAsync(String resourceGroupName, + String workspaceName, String poolName, String groupName, DeltaModelModifyRequest 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.modifyDeltaModelsAsync(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())); + } + + /** + * Modify delta models associated with the InferenceGroup and the target base model. + * + * @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 DeltaModelModifyRequest. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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>> modifyDeltaModelsAsyncWithResponseAsync(String resourceGroupName, + String workspaceName, String poolName, String groupName, DeltaModelModifyRequest 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.modifyDeltaModelsAsync(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, poolName, groupName, this.client.getApiVersion(), body, accept, context); + } + + /** + * Modify delta models associated with the InferenceGroup and the target base model. + * + * @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 DeltaModelModifyRequest. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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> beginModifyDeltaModelsAsyncAsync(String resourceGroupName, + String workspaceName, String poolName, String groupName, DeltaModelModifyRequest body) { + Mono>> mono + = modifyDeltaModelsAsyncWithResponseAsync(resourceGroupName, workspaceName, poolName, groupName, body); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Modify delta models associated with the InferenceGroup and the target base model. + * + * @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 DeltaModelModifyRequest. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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> beginModifyDeltaModelsAsyncAsync(String resourceGroupName, + String workspaceName, String poolName, String groupName, DeltaModelModifyRequest body, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = modifyDeltaModelsAsyncWithResponseAsync(resourceGroupName, + workspaceName, poolName, groupName, body, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Modify delta models associated with the InferenceGroup and the target base model. + * + * @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 DeltaModelModifyRequest. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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> beginModifyDeltaModelsAsync(String resourceGroupName, + String workspaceName, String poolName, String groupName, DeltaModelModifyRequest body) { + return this.beginModifyDeltaModelsAsyncAsync(resourceGroupName, workspaceName, poolName, groupName, body) + .getSyncPoller(); + } + + /** + * Modify delta models associated with the InferenceGroup and the target base model. + * + * @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 DeltaModelModifyRequest. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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> beginModifyDeltaModelsAsync(String resourceGroupName, + String workspaceName, String poolName, String groupName, DeltaModelModifyRequest body, Context context) { + return this + .beginModifyDeltaModelsAsyncAsync(resourceGroupName, workspaceName, poolName, groupName, body, context) + .getSyncPoller(); + } + + /** + * Modify delta models associated with the InferenceGroup and the target base model. + * + * @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 DeltaModelModifyRequest. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 modifyDeltaModelsAsyncAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName, DeltaModelModifyRequest body) { + return beginModifyDeltaModelsAsyncAsync(resourceGroupName, workspaceName, poolName, groupName, body).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Modify delta models associated with the InferenceGroup and the target base model. + * + * @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 DeltaModelModifyRequest. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 modifyDeltaModelsAsyncAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName, DeltaModelModifyRequest body, Context context) { + return beginModifyDeltaModelsAsyncAsync(resourceGroupName, workspaceName, poolName, groupName, body, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Modify delta models associated with the InferenceGroup and the target base model. + * + * @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 DeltaModelModifyRequest. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 modifyDeltaModelsAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName, DeltaModelModifyRequest body) { + modifyDeltaModelsAsyncAsync(resourceGroupName, workspaceName, poolName, groupName, body).block(); + } + + /** + * Modify delta models associated with the InferenceGroup and the target base model. + * + * @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 DeltaModelModifyRequest. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 modifyDeltaModelsAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName, DeltaModelModifyRequest body, Context context) { + modifyDeltaModelsAsyncAsync(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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of String entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDeltaModelsAsyncNextSinglePageAsync(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.listDeltaModelsAsyncNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of String entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDeltaModelsAsyncNextSinglePageAsync(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.listDeltaModelsAsyncNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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..9cfdb70fa8d2f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferenceGroupsImpl.java @@ -0,0 +1,271 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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.DeltaModelStatusResponseInner; +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.DeltaModelListRequest; +import com.azure.resourcemanager.machinelearning.models.DeltaModelModifyRequest; +import com.azure.resourcemanager.machinelearning.models.DeltaModelStatusRequest; +import com.azure.resourcemanager.machinelearning.models.DeltaModelStatusResponse; +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 getDeltaModelsStatusAsyncWithResponse(String resourceGroupName, + String workspaceName, String poolName, String groupName, DeltaModelStatusRequest body, Context context) { + Response inner = this.serviceClient() + .getDeltaModelsStatusAsyncWithResponse(resourceGroupName, workspaceName, poolName, groupName, body, + context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DeltaModelStatusResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DeltaModelStatusResponse getDeltaModelsStatusAsync(String resourceGroupName, String workspaceName, + String poolName, String groupName, DeltaModelStatusRequest body) { + DeltaModelStatusResponseInner inner = this.serviceClient() + .getDeltaModelsStatusAsync(resourceGroupName, workspaceName, poolName, groupName, body); + if (inner != null) { + return new DeltaModelStatusResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listDeltaModelsAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName, DeltaModelListRequest body) { + return this.serviceClient().listDeltaModelsAsync(resourceGroupName, workspaceName, poolName, groupName, body); + } + + public PagedIterable listDeltaModelsAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName, DeltaModelListRequest body, Context context) { + return this.serviceClient() + .listDeltaModelsAsync(resourceGroupName, workspaceName, poolName, groupName, body, context); + } + + public void modifyDeltaModelsAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName, DeltaModelModifyRequest body) { + this.serviceClient().modifyDeltaModelsAsync(resourceGroupName, workspaceName, poolName, groupName, body); + } + + public void modifyDeltaModelsAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName, DeltaModelModifyRequest body, Context context) { + this.serviceClient() + .modifyDeltaModelsAsync(resourceGroupName, workspaceName, poolName, groupName, body, context); + } + + 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..157bf319df084 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferencePoolImpl.java @@ -0,0 +1,222 @@ +// Copyright (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.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.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 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..bcd5453b1bee0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferencePoolsClientImpl.java @@ -0,0 +1,1261 @@ +// Copyright (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.InferencePoolsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.InferencePoolInner; +import com.azure.resourcemanager.machinelearning.models.InferencePoolTrackedResourceArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.models.OrderString; +import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSkuAndIdentity; +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 AzureMachineLearningWorkspacesImpl client; + + /** + * Initializes an instance of InferencePoolsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + InferencePoolsClientImpl(AzureMachineLearningWorkspacesImpl client) { + this.service + = RestProxy.create(InferencePoolsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningWorkspacesInferencePools 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" }) + @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 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(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the 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)); + } +} 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..c099994adfc4e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/InferencePoolsImpl.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.InferencePoolsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.InferencePoolInner; +import com.azure.resourcemanager.machinelearning.models.InferencePool; +import com.azure.resourcemanager.machinelearning.models.InferencePools; +import com.azure.resourcemanager.machinelearning.models.OrderString; + +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 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/ListWorkspaceKeysResultImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListWorkspaceKeysResultImpl.java index 9e7be2fa5cb3e..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 @@ -21,14 +21,6 @@ public final class ListWorkspaceKeysResultImpl implements ListWorkspaceKeysResul this.serviceManager = serviceManager; } - public String userStorageKey() { - return this.innerModel().userStorageKey(); - } - - public String userStorageResourceId() { - return this.innerModel().userStorageResourceId(); - } - public String appInsightsInstrumentationKey() { return this.innerModel().appInsightsInstrumentationKey(); } @@ -46,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/ManagedNetworkProvisionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ManagedNetworkProvisionsClientImpl.java index 96e272d5478b5..a7cf0cd5e4f17 100644 --- 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 @@ -80,7 +80,7 @@ Mono>> provisionManagedNetwork(@HostParam("$host") Str * Provisions the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -121,7 +121,7 @@ private Mono>> provisionManagedNetworkWithResponseAsyn * Provisions the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -161,7 +161,7 @@ private Mono>> provisionManagedNetworkWithResponseAsyn * Provisions the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -184,7 +184,7 @@ private Mono>> provisionManagedNetworkWithResponseAsyn * Provisions the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -206,7 +206,7 @@ private Mono>> provisionManagedNetworkWithResponseAsyn * Provisions the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -231,7 +231,7 @@ private Mono>> provisionManagedNetworkWithResponseAsyn * Provisions the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -249,7 +249,7 @@ private Mono>> provisionManagedNetworkWithResponseAsyn * Provisions the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -269,7 +269,7 @@ private Mono>> provisionManagedNetworkWithResponseAsyn * Provisions the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -288,7 +288,7 @@ private Mono provisionManagedNetworkAsync(St * Provisions the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -307,7 +307,7 @@ private Mono provisionManagedNetworkAsync(St * Provisions the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -327,7 +327,7 @@ private Mono provisionManagedNetworkAsync(St * Provisions the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -343,7 +343,7 @@ public ManagedNetworkProvisionStatusInner provisionManagedNetwork(String resourc * Provisions the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. 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 index f4cf1d1ea9aa9..eb0d0a15e575e 100644 --- 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 @@ -9,8 +9,8 @@ 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.ManagedNetworkProvisions; 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); 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 index 5f961f3216330..679103c540b33 100644 --- 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 @@ -6,11 +6,13 @@ import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkProvisionStatusInner; import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsInner; +import com.azure.resourcemanager.machinelearning.models.FirewallSku; 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 { @@ -24,6 +26,10 @@ public final class ManagedNetworkSettingsImpl implements ManagedNetworkSettings this.serviceManager = serviceManager; } + public FirewallSku firewallSku() { + return this.innerModel().firewallSku(); + } + public IsolationMode isolationMode() { return this.innerModel().isolationMode(); } @@ -50,6 +56,15 @@ public ManagedNetworkProvisionStatus status() { } } + 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; } 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 index ea48a2334edb4..db0ae91c24bff 100644 --- 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 @@ -122,7 +122,7 @@ Mono> listNext(@PathParam(value = "nextLink", e * Lists the managed network outbound rules for a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -160,7 +160,7 @@ private Mono> listSinglePageAsync( * Lists the managed network outbound rules for a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -199,7 +199,7 @@ private Mono> listSinglePageAsync( * Lists the managed network outbound rules for a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -216,7 +216,7 @@ private PagedFlux listAsync(String resourceGroup * Lists the managed network outbound rules for a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -235,7 +235,7 @@ private PagedFlux listAsync(String resourceGroup * Lists the managed network outbound rules for a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -251,7 +251,7 @@ public PagedIterable list(String resourceGroupNa * Lists the managed network outbound rules for a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -269,7 +269,7 @@ public PagedIterable list(String resourceGroupNa * Deletes an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -308,7 +308,7 @@ private Mono>> deleteWithResponseAsync(String resource * Deletes an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -347,7 +347,7 @@ private Mono>> deleteWithResponseAsync(String resource * Deletes an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -366,7 +366,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * Deletes an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -388,7 +388,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * Deletes an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -405,7 +405,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * Deletes an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -423,7 +423,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * Deletes an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -440,7 +440,7 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * Deletes an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -458,7 +458,7 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * Deletes an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -473,7 +473,7 @@ public void delete(String resourceGroupName, String workspaceName, String ruleNa * Deletes an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -489,7 +489,7 @@ public void delete(String resourceGroupName, String workspaceName, String ruleNa * Gets an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -529,7 +529,7 @@ private Mono> getWithResponseAsync(Stri * Gets an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -569,7 +569,7 @@ private Mono> getWithResponseAsync(Stri * Gets an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -588,7 +588,7 @@ private Mono getAsync(String resourceGroupName, * Gets an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -606,7 +606,7 @@ public Response getWithResponse(String resourceG * Gets an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -622,14 +622,13 @@ public OutboundRuleBasicResourceInner get(String resourceGroupName, String works * Creates or updates an outbound rule in the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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 outbound Rule Basic Resource for the managed network of a machine learning workspace along with - * {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, @@ -668,15 +667,14 @@ private Mono>> createOrUpdateWithResponseAsync(String * Creates or updates an outbound rule in the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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 outbound Rule Basic Resource for the managed network of a machine learning workspace along with - * {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, @@ -714,14 +712,13 @@ private Mono>> createOrUpdateWithResponseAsync(String * Creates or updates an outbound rule in the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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 outbound Rule Basic Resource for the managed network of a machine - * learning workspace. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OutboundRuleBasicResourceInner> @@ -738,15 +735,14 @@ private Mono>> createOrUpdateWithResponseAsync(String * Creates or updates an outbound rule in the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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 outbound Rule Basic Resource for the managed network of a machine - * learning workspace. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, OutboundRuleBasicResourceInner> @@ -764,14 +760,13 @@ private Mono>> createOrUpdateWithResponseAsync(String * Creates or updates an outbound rule in the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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 outbound Rule Basic Resource for the managed network of a machine - * learning workspace. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OutboundRuleBasicResourceInner> beginCreateOrUpdate( @@ -783,15 +778,14 @@ public SyncPoller, OutboundRuleBasicR * Creates or updates an outbound rule in the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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 outbound Rule Basic Resource for the managed network of a machine - * learning workspace. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, OutboundRuleBasicResourceInner> beginCreateOrUpdate( @@ -804,14 +798,13 @@ public SyncPoller, OutboundRuleBasicR * Creates or updates an outbound rule in the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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 outbound Rule Basic Resource for the managed network of a machine learning workspace on successful - * completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, @@ -824,15 +817,14 @@ private Mono createOrUpdateAsync(String resource * Creates or updates an outbound rule in the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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 outbound Rule Basic Resource for the managed network of a machine learning workspace on successful - * completion of {@link Mono}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, @@ -845,13 +837,13 @@ private Mono createOrUpdateAsync(String resource * Creates or updates an outbound rule in the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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 outbound Rule Basic Resource for the managed network of a machine learning workspace. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public OutboundRuleBasicResourceInner createOrUpdate(String resourceGroupName, String workspaceName, @@ -863,14 +855,14 @@ public OutboundRuleBasicResourceInner createOrUpdate(String resourceGroupName, S * Creates or updates an outbound rule in the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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 outbound Rule Basic Resource for the managed network of a machine learning workspace. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) public OutboundRuleBasicResourceInner createOrUpdate(String resourceGroupName, String workspaceName, 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 d606c9997543e..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 @@ -18,28 +18,24 @@ public final class NotebookAccessTokenResultImpl implements NotebookAccessTokenR 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() { @@ -50,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 a4f232ff10d32..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 @@ -23,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 1219e37c4d824..cac2d85bd3ab9 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 @@ -51,16 +51,16 @@ public Map tags() { } } - public OnlineDeploymentProperties properties() { - return this.innerModel().properties(); + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); } public String kind() { return this.innerModel().kind(); } - public ManagedServiceIdentity identity() { - return this.innerModel().identity(); + public OnlineDeploymentProperties properties() { + return this.innerModel().properties(); } public Sku sku() { @@ -210,13 +210,13 @@ public OnlineDeploymentImpl withTags(Map tags) { } } - public OnlineDeploymentImpl withKind(String kind) { - this.innerModel().withKind(kind); + public OnlineDeploymentImpl withIdentity(ManagedServiceIdentity identity) { + this.innerModel().withIdentity(identity); return this; } - public OnlineDeploymentImpl withIdentity(ManagedServiceIdentity identity) { - this.innerModel().withIdentity(identity); + public OnlineDeploymentImpl withKind(String kind) { + this.innerModel().withKind(kind); return this; } 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 26821fa97776b..deca2eaaba4b2 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 @@ -51,16 +51,16 @@ public Map tags() { } } - public OnlineEndpointProperties properties() { - return this.innerModel().properties(); + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); } public String kind() { return this.innerModel().kind(); } - public ManagedServiceIdentity identity() { - return this.innerModel().identity(); + public OnlineEndpointProperties properties() { + return this.innerModel().properties(); } public Sku sku() { @@ -220,13 +220,13 @@ public OnlineEndpointImpl withTags(Map tags) { } } - public OnlineEndpointImpl withKind(String kind) { - this.innerModel().withKind(kind); + public OnlineEndpointImpl withIdentity(ManagedServiceIdentity identity) { + this.innerModel().withIdentity(identity); return this; } - public OnlineEndpointImpl withIdentity(ManagedServiceIdentity identity) { - this.innerModel().withIdentity(identity); + public OnlineEndpointImpl withKind(String kind) { + this.innerModel().withKind(kind); return this; } 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 c8219e514cfc5..9bc166fda9e60 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(); } @@ -202,7 +202,7 @@ public PrivateEndpointConnectionImpl withSku(Sku sku) { return this; } - public PrivateEndpointConnectionImpl withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + public PrivateEndpointConnectionImpl withPrivateEndpoint(WorkspacePrivateEndpointResource privateEndpoint) { this.innerModel().withPrivateEndpoint(privateEndpoint); return this; } @@ -212,4 +212,10 @@ public PrivateEndpointConnectionImpl withPrivateEndpoint(PrivateEndpoint private 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 d98f87dac6c36..deff2bfe5ecd9 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 @@ -70,48 +70,48 @@ public interface PrivateEndpointConnectionsService { @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, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); + @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 }) + @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("privateEndpointConnectionName") String privateEndpointConnectionName, @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}") + @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("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 }) + @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("privateEndpointConnectionName") String privateEndpointConnectionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @QueryParam("api-version") String apiVersion, + @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. @@ -125,6 +125,10 @@ private Mono> listSinglePageAsync( return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); @@ -132,24 +136,20 @@ 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)) + .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. @@ -164,6 +164,10 @@ private Mono> listSinglePageAsync( return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); @@ -171,24 +175,20 @@ 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) + .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. @@ -201,10 +201,10 @@ 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. @@ -219,10 +219,10 @@ 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -235,10 +235,10 @@ 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. @@ -253,20 +253,19 @@ public PagedIterable list(String resourceGroupNa } /** - * 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.")); @@ -289,27 +288,26 @@ private Mono> getWithResponseAsync(Stri final String accept = "application/json"; return FluxUtil .withContext( - context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + 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.")); @@ -331,72 +329,68 @@ private Mono> getWithResponseAsync(Stri } 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, + private Mono deleteAsync(String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { - return getWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + 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, + public Response deleteWithResponse(String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, context).block(); + 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. @@ -404,8 +398,8 @@ public PrivateEndpointConnectionInner get(String resourceGroupName, String works * {@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.")); @@ -425,26 +419,20 @@ private Mono> createOrUpdateWithRespons 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(); - } 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)) + .withContext( + 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. @@ -453,9 +441,8 @@ private Mono> createOrUpdateWithRespons * {@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.")); @@ -475,43 +462,36 @@ private Mono> createOrUpdateWithRespons 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(); - } 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).flatMap(res -> Mono.justOrEmpty(res.getValue())); + 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. @@ -519,46 +499,46 @@ private Mono createOrUpdateAsync(String resource * @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).getValue(); + 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.")); @@ -578,29 +558,38 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S 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.")); @@ -620,61 +609,76 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S 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 03774c6fedf2a..a90266732dbbc 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 @@ -40,6 +40,16 @@ public PagedIterable list(String resourceGroupName, S return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); } + 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() @@ -63,16 +73,6 @@ public PrivateEndpointConnection get(String resourceGroupName, String workspaceN } } - 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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { 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 50a78d55c3156..2e494c2d84c21 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,13 +16,18 @@ 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; /** @@ -61,25 +66,29 @@ public interface PrivateLinkResourcesService { @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); } /** - * 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, + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -100,23 +109,29 @@ private Mono> listWithResponseAsync 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(), 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, + private Mono> listSinglePageAsync(String resourceGroupName, String workspaceName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -135,55 +150,90 @@ 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); + 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(), 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, + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, Context context) { - return listWithResponseAsync(resourceGroupName, workspaceName, context).block(); + 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 f221aad8c31a2..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 { @@ -26,25 +25,15 @@ public PrivateLinkResourcesImpl(PrivateLinkResourcesClient 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/PtuQuotasClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PtuQuotasClientImpl.java new file mode 100644 index 0000000000000..bf2d39da9c5b7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PtuQuotasClientImpl.java @@ -0,0 +1,614 @@ +// Copyright (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.PtuQuotasClient; +import com.azure.resourcemanager.machinelearning.fluent.models.AvailableQuotaInner; +import com.azure.resourcemanager.machinelearning.fluent.models.UsageAndQuotaDetailsInner; +import com.azure.resourcemanager.machinelearning.models.AvailableQuotaArmPaginatedResult; +import com.azure.resourcemanager.machinelearning.models.UsageAndQuotaDetailsArmPaginatedResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in PtuQuotasClient. + */ +public final class PtuQuotasClientImpl implements PtuQuotasClient { + /** + * The proxy service used to perform REST calls. + */ + private final PtuQuotasService service; + + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningWorkspacesImpl client; + + /** + * Initializes an instance of PtuQuotasClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PtuQuotasClientImpl(AzureMachineLearningWorkspacesImpl client) { + this.service + = RestProxy.create(PtuQuotasService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningWorkspacesPtuQuotas to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface PtuQuotasService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/availableQuota") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAvailable(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, + @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/availableQuota/default") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getAvailable(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/quotaAndUsage") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, + @QueryParam("api-version") String apiVersion, @QueryParam("$skip") String skip, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listAvailableNext( + @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 available MaaS PTU quota. + * + * @param location The name of Azure region. + * @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 AvailableQuota entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAvailableSinglePageAsync(String location, 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 (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.listAvailable(this.client.getEndpoint(), this.client.getSubscriptionId(), + location, 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 available MaaS PTU quota. + * + * @param location The name of Azure region. + * @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 AvailableQuota entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAvailableSinglePageAsync(String location, 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 (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listAvailable(this.client.getEndpoint(), this.client.getSubscriptionId(), location, + this.client.getApiVersion(), skip, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List available MaaS PTU quota. + * + * @param location The name of Azure region. + * @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 AvailableQuota entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAvailableAsync(String location, String skip) { + return new PagedFlux<>(() -> listAvailableSinglePageAsync(location, skip), + nextLink -> listAvailableNextSinglePageAsync(nextLink)); + } + + /** + * List available MaaS PTU quota. + * + * @param location The name of Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of AvailableQuota entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAvailableAsync(String location) { + final String skip = null; + return new PagedFlux<>(() -> listAvailableSinglePageAsync(location, skip), + nextLink -> listAvailableNextSinglePageAsync(nextLink)); + } + + /** + * List available MaaS PTU quota. + * + * @param location The name of Azure region. + * @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 AvailableQuota entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAvailableAsync(String location, String skip, Context context) { + return new PagedFlux<>(() -> listAvailableSinglePageAsync(location, skip, context), + nextLink -> listAvailableNextSinglePageAsync(nextLink, context)); + } + + /** + * List available MaaS PTU quota. + * + * @param location The name of Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of AvailableQuota entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAvailable(String location) { + final String skip = null; + return new PagedIterable<>(listAvailableAsync(location, skip)); + } + + /** + * List available MaaS PTU quota. + * + * @param location The name of Azure region. + * @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 AvailableQuota entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAvailable(String location, String skip, Context context) { + return new PagedIterable<>(listAvailableAsync(location, skip, context)); + } + + /** + * Get available MaaS PTU quota. + * + * @param location The name of Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available MaaS PTU quota along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAvailableWithResponseAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getAvailable(this.client.getEndpoint(), this.client.getSubscriptionId(), + location, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get available MaaS PTU quota. + * + * @param location The name of Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available MaaS PTU quota along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAvailableWithResponseAsync(String location, 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 (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getAvailable(this.client.getEndpoint(), this.client.getSubscriptionId(), location, + this.client.getApiVersion(), accept, context); + } + + /** + * Get available MaaS PTU quota. + * + * @param location The name of Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available MaaS PTU quota on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAvailableAsync(String location) { + return getAvailableWithResponseAsync(location).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get available MaaS PTU quota. + * + * @param location The name of Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available MaaS PTU quota along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getAvailableWithResponse(String location, Context context) { + return getAvailableWithResponseAsync(location, context).block(); + } + + /** + * Get available MaaS PTU quota. + * + * @param location The name of Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available MaaS PTU quota. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AvailableQuotaInner getAvailable(String location) { + return getAvailableWithResponse(location, Context.NONE).getValue(); + } + + /** + * List MaaS PTU usage and quota. + * + * @param location The name of Azure region. + * @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 UsageAndQuotaDetails entities along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String location, 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 (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.getSubscriptionId(), location, + 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 MaaS PTU usage and quota. + * + * @param location The name of Azure region. + * @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 UsageAndQuotaDetails entities along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String location, 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 (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location 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(), location, this.client.getApiVersion(), + skip, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List MaaS PTU usage and quota. + * + * @param location The name of Azure region. + * @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 UsageAndQuotaDetails entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String location, String skip) { + return new PagedFlux<>(() -> listSinglePageAsync(location, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List MaaS PTU usage and quota. + * + * @param location The name of Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of UsageAndQuotaDetails entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String location) { + final String skip = null; + return new PagedFlux<>(() -> listSinglePageAsync(location, skip), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List MaaS PTU usage and quota. + * + * @param location The name of Azure region. + * @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 UsageAndQuotaDetails entities as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String location, String skip, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(location, skip, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List MaaS PTU usage and quota. + * + * @param location The name of Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of UsageAndQuotaDetails entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String location) { + final String skip = null; + return new PagedIterable<>(listAsync(location, skip)); + } + + /** + * List MaaS PTU usage and quota. + * + * @param location The name of Azure region. + * @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 UsageAndQuotaDetails entities as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String location, String skip, Context context) { + return new PagedIterable<>(listAsync(location, skip, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of AvailableQuota entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAvailableNextSinglePageAsync(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.listAvailableNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of AvailableQuota entities along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAvailableNextSinglePageAsync(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.listAvailableNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of UsageAndQuotaDetails 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of UsageAndQuotaDetails 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/PtuQuotasImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PtuQuotasImpl.java new file mode 100644 index 0000000000000..ce3e79e71e3e3 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PtuQuotasImpl.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.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.PtuQuotasClient; +import com.azure.resourcemanager.machinelearning.fluent.models.AvailableQuotaInner; +import com.azure.resourcemanager.machinelearning.fluent.models.UsageAndQuotaDetailsInner; +import com.azure.resourcemanager.machinelearning.models.AvailableQuota; +import com.azure.resourcemanager.machinelearning.models.PtuQuotas; +import com.azure.resourcemanager.machinelearning.models.UsageAndQuotaDetails; + +public final class PtuQuotasImpl implements PtuQuotas { + private static final ClientLogger LOGGER = new ClientLogger(PtuQuotasImpl.class); + + private final PtuQuotasClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public PtuQuotasImpl(PtuQuotasClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listAvailable(String location) { + PagedIterable inner = this.serviceClient().listAvailable(location); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AvailableQuotaImpl(inner1, this.manager())); + } + + public PagedIterable listAvailable(String location, String skip, Context context) { + PagedIterable inner = this.serviceClient().listAvailable(location, skip, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AvailableQuotaImpl(inner1, this.manager())); + } + + public Response getAvailableWithResponse(String location, Context context) { + Response inner = this.serviceClient().getAvailableWithResponse(location, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new AvailableQuotaImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public AvailableQuota getAvailable(String location) { + AvailableQuotaInner inner = this.serviceClient().getAvailable(location); + if (inner != null) { + return new AvailableQuotaImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable list(String location) { + PagedIterable inner = this.serviceClient().list(location); + return ResourceManagerUtils.mapPage(inner, inner1 -> new UsageAndQuotaDetailsImpl(inner1, this.manager())); + } + + public PagedIterable list(String location, String skip, Context context) { + PagedIterable inner = this.serviceClient().list(location, skip, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new UsageAndQuotaDetailsImpl(inner1, this.manager())); + } + + private PtuQuotasClient 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/QuotasImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasImpl.java index e3278e22e6ec0..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 @@ -12,8 +12,8 @@ import com.azure.resourcemanager.machinelearning.fluent.QuotasClient; import com.azure.resourcemanager.machinelearning.fluent.models.ResourceQuotaInner; import com.azure.resourcemanager.machinelearning.fluent.models.UpdateWorkspaceQuotasResultInner; -import com.azure.resourcemanager.machinelearning.models.Quotas; import com.azure.resourcemanager.machinelearning.models.QuotaUpdateParameters; +import com.azure.resourcemanager.machinelearning.models.Quotas; import com.azure.resourcemanager.machinelearning.models.ResourceQuota; import com.azure.resourcemanager.machinelearning.models.UpdateWorkspaceQuotasResult; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiBlocklistItemPropertiesBasicResourceImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiBlocklistItemPropertiesBasicResourceImpl.java new file mode 100644 index 0000000000000..8dd5f5e98fa8b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiBlocklistItemPropertiesBasicResourceImpl.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistItemPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemProperties; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemPropertiesBasicResource; + +public final class RaiBlocklistItemPropertiesBasicResourceImpl + implements RaiBlocklistItemPropertiesBasicResource, RaiBlocklistItemPropertiesBasicResource.Definition { + private RaiBlocklistItemPropertiesBasicResourceInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + RaiBlocklistItemPropertiesBasicResourceImpl(RaiBlocklistItemPropertiesBasicResourceInner 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 RaiBlocklistItemProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public RaiBlocklistItemPropertiesBasicResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private String connectionName; + + private String raiBlocklistName; + + private String raiBlocklistItemName; + + private String createProxyApiVersion; + + public RaiBlocklistItemPropertiesBasicResourceImpl withExistingRaiBlocklist(String resourceGroupName, + String workspaceName, String connectionName, String raiBlocklistName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + this.connectionName = connectionName; + this.raiBlocklistName = raiBlocklistName; + return this; + } + + public RaiBlocklistItemPropertiesBasicResource create() { + this.innerObject = serviceManager.serviceClient() + .getConnectionRaiBlocklistItems() + .create(resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName, + this.innerModel(), createProxyApiVersion, Context.NONE); + return this; + } + + public RaiBlocklistItemPropertiesBasicResource create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getConnectionRaiBlocklistItems() + .create(resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName, + this.innerModel(), createProxyApiVersion, context); + return this; + } + + RaiBlocklistItemPropertiesBasicResourceImpl(String name, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new RaiBlocklistItemPropertiesBasicResourceInner(); + this.serviceManager = serviceManager; + this.raiBlocklistItemName = name; + this.createProxyApiVersion = null; + } + + public RaiBlocklistItemPropertiesBasicResource refresh() { + this.innerObject = serviceManager.serviceClient() + .getConnectionRaiBlocklistItems() + .getWithResponse(resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName, + Context.NONE) + .getValue(); + return this; + } + + public RaiBlocklistItemPropertiesBasicResource refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getConnectionRaiBlocklistItems() + .getWithResponse(resourceGroupName, workspaceName, connectionName, raiBlocklistName, raiBlocklistItemName, + context) + .getValue(); + return this; + } + + public RaiBlocklistItemPropertiesBasicResourceImpl withProperties(RaiBlocklistItemProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public RaiBlocklistItemPropertiesBasicResourceImpl withProxyApiVersion(String proxyApiVersion) { + this.createProxyApiVersion = proxyApiVersion; + return this; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiBlocklistPropertiesBasicResourceImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiBlocklistPropertiesBasicResourceImpl.java new file mode 100644 index 0000000000000..cb153e5314784 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiBlocklistPropertiesBasicResourceImpl.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.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistProperties; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistPropertiesBasicResource; + +public final class RaiBlocklistPropertiesBasicResourceImpl + implements RaiBlocklistPropertiesBasicResource, RaiBlocklistPropertiesBasicResource.Definition { + private RaiBlocklistPropertiesBasicResourceInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + RaiBlocklistPropertiesBasicResourceImpl(RaiBlocklistPropertiesBasicResourceInner 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 RaiBlocklistProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public RaiBlocklistPropertiesBasicResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private String connectionName; + + private String raiBlocklistName; + + private String createProxyApiVersion; + + public RaiBlocklistPropertiesBasicResourceImpl withExistingConnection(String resourceGroupName, + String workspaceName, String connectionName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + this.connectionName = connectionName; + return this; + } + + public RaiBlocklistPropertiesBasicResource create() { + this.innerObject = serviceManager.serviceClient() + .getConnectionRaiBlocklistOperations() + .create(resourceGroupName, workspaceName, connectionName, raiBlocklistName, this.innerModel(), + createProxyApiVersion, Context.NONE); + return this; + } + + public RaiBlocklistPropertiesBasicResource create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getConnectionRaiBlocklistOperations() + .create(resourceGroupName, workspaceName, connectionName, raiBlocklistName, this.innerModel(), + createProxyApiVersion, context); + return this; + } + + RaiBlocklistPropertiesBasicResourceImpl(String name, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new RaiBlocklistPropertiesBasicResourceInner(); + this.serviceManager = serviceManager; + this.raiBlocklistName = name; + this.createProxyApiVersion = null; + } + + public RaiBlocklistPropertiesBasicResource refresh() { + this.innerObject = serviceManager.serviceClient() + .getConnectionRaiBlocklistOperations() + .getWithResponse(resourceGroupName, workspaceName, connectionName, raiBlocklistName, Context.NONE) + .getValue(); + return this; + } + + public RaiBlocklistPropertiesBasicResource refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getConnectionRaiBlocklistOperations() + .getWithResponse(resourceGroupName, workspaceName, connectionName, raiBlocklistName, context) + .getValue(); + return this; + } + + public RaiBlocklistPropertiesBasicResourceImpl withProperties(RaiBlocklistProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public RaiBlocklistPropertiesBasicResourceImpl withProxyApiVersion(String proxyApiVersion) { + this.createProxyApiVersion = proxyApiVersion; + return this; + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPoliciesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPoliciesClientImpl.java new file mode 100644 index 0000000000000..50b1b545ea810 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPoliciesClientImpl.java @@ -0,0 +1,324 @@ +// Copyright (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.RaiPoliciesClient; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiPolicyPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyPropertiesBasicResourceArmPaginatedResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in RaiPoliciesClient. + */ +public final class RaiPoliciesClientImpl implements RaiPoliciesClient { + /** + * The proxy service used to perform REST calls. + */ + private final RaiPoliciesService service; + + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningWorkspacesImpl client; + + /** + * Initializes an instance of RaiPoliciesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + RaiPoliciesClientImpl(AzureMachineLearningWorkspacesImpl client) { + this.service + = RestProxy.create(RaiPoliciesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningWorkspacesRaiPolicies to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface RaiPoliciesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/raiPolicies") + @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, + @QueryParam("proxy-api-version") String proxyApiVersion, @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 the specified Content Filters associated with the Azure OpenAI account. + * + * @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 proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource list along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String endpointName, String proxyApiVersion) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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(), proxyApiVersion, 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 the specified Content Filters associated with the Azure OpenAI account. + * + * @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 proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource list along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String workspaceName, String endpointName, String proxyApiVersion, 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(), proxyApiVersion, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List the specified Content Filters associated with the Azure OpenAI account. + * + * @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 proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource list as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, + String endpointName, String proxyApiVersion) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, endpointName, proxyApiVersion), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List the specified Content Filters associated with the Azure OpenAI account. + * + * @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 azure OpenAI Content Filters resource list as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, + String endpointName) { + final String proxyApiVersion = null; + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, endpointName, proxyApiVersion), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List the specified Content Filters associated with the Azure OpenAI account. + * + * @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 proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource list as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String workspaceName, + String endpointName, String proxyApiVersion, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, workspaceName, endpointName, proxyApiVersion, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List the specified Content Filters associated with the Azure OpenAI account. + * + * @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 azure OpenAI Content Filters resource list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, + String endpointName) { + final String proxyApiVersion = null; + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, endpointName, proxyApiVersion)); + } + + /** + * List the specified Content Filters associated with the Azure OpenAI account. + * + * @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 proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource list as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String workspaceName, + String endpointName, String proxyApiVersion, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, endpointName, proxyApiVersion, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource list along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource list 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/RaiPoliciesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPoliciesImpl.java new file mode 100644 index 0000000000000..f1e25cd782dd4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPoliciesImpl.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.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.machinelearning.fluent.RaiPoliciesClient; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiPolicyPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.RaiPolicies; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyPropertiesBasicResource; + +public final class RaiPoliciesImpl implements RaiPolicies { + private static final ClientLogger LOGGER = new ClientLogger(RaiPoliciesImpl.class); + + private final RaiPoliciesClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public RaiPoliciesImpl(RaiPoliciesClient 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 ResourceManagerUtils.mapPage(inner, + inner1 -> new RaiPolicyPropertiesBasicResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String workspaceName, + String endpointName, String proxyApiVersion, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, workspaceName, endpointName, proxyApiVersion, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new RaiPolicyPropertiesBasicResourceImpl(inner1, this.manager())); + } + + private RaiPoliciesClient 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/RaiPolicyOperationsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPolicyOperationsClientImpl.java new file mode 100644 index 0000000000000..493dde50c230a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPolicyOperationsClientImpl.java @@ -0,0 +1,885 @@ +// Copyright (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.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.RaiPolicyOperationsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiPolicyPropertiesBasicResourceInner; +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 RaiPolicyOperationsClient. + */ +public final class RaiPolicyOperationsClientImpl implements RaiPolicyOperationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final RaiPolicyOperationsService service; + + /** + * The service client containing this operation class. + */ + private final AzureMachineLearningWorkspacesImpl client; + + /** + * Initializes an instance of RaiPolicyOperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + RaiPolicyOperationsClientImpl(AzureMachineLearningWorkspacesImpl client) { + this.service = RestProxy.create(RaiPolicyOperationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for AzureMachineLearningWorkspacesRaiPolicyOperations to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "AzureMachineLearning") + public interface RaiPolicyOperationsService { + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/raiPolicies/{raiPolicyName}") + @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("raiPolicyName") String raiPolicyName, + @QueryParam("api-version") String apiVersion, @QueryParam("proxy-api-version") String proxyApiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/endpoints/{endpointName}/raiPolicies/{raiPolicyName}") + @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("raiPolicyName") String raiPolicyName, + @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}/raiPolicies/{raiPolicyName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @PathParam("endpointName") String endpointName, @PathParam("raiPolicyName") String raiPolicyName, + @QueryParam("api-version") String apiVersion, @QueryParam("proxy-api-version") String proxyApiVersion, + @BodyParam("application/json") RaiPolicyPropertiesBasicResourceInner body, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 raiPolicyName, String proxyApiVersion) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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 (raiPolicyName == null) { + return Mono.error(new IllegalArgumentException("Parameter raiPolicyName 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, raiPolicyName, this.client.getApiVersion(), + proxyApiVersion, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 raiPolicyName, String proxyApiVersion, 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 (raiPolicyName == null) { + return Mono.error(new IllegalArgumentException("Parameter raiPolicyName 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, raiPolicyName, this.client.getApiVersion(), proxyApiVersion, accept, context); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 raiPolicyName, String proxyApiVersion) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, raiPolicyName, proxyApiVersion); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 raiPolicyName) { + final String proxyApiVersion = null; + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, raiPolicyName, proxyApiVersion); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 raiPolicyName, String proxyApiVersion, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, + raiPolicyName, proxyApiVersion, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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 raiPolicyName) { + final String proxyApiVersion = null; + return this.beginDeleteAsync(resourceGroupName, workspaceName, endpointName, raiPolicyName, proxyApiVersion) + .getSyncPoller(); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked 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 raiPolicyName, String proxyApiVersion, Context context) { + return this + .beginDeleteAsync(resourceGroupName, workspaceName, endpointName, raiPolicyName, proxyApiVersion, context) + .getSyncPoller(); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 raiPolicyName, String proxyApiVersion) { + return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, raiPolicyName, proxyApiVersion).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 raiPolicyName) { + final String proxyApiVersion = null; + return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, raiPolicyName, proxyApiVersion).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 raiPolicyName, String proxyApiVersion, Context context) { + return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, raiPolicyName, proxyApiVersion, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 raiPolicyName) { + final String proxyApiVersion = null; + deleteAsync(resourceGroupName, workspaceName, endpointName, raiPolicyName, proxyApiVersion).block(); + } + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 raiPolicyName, + String proxyApiVersion, Context context) { + deleteAsync(resourceGroupName, workspaceName, endpointName, raiPolicyName, proxyApiVersion, context).block(); + } + + /** + * Gets the specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Content Filters associated with the Azure OpenAI account along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String workspaceName, String endpointName, String raiPolicyName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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 (raiPolicyName == null) { + return Mono.error(new IllegalArgumentException("Parameter raiPolicyName 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, raiPolicyName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Content Filters associated with the Azure OpenAI account along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String workspaceName, String endpointName, String raiPolicyName, 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 (raiPolicyName == null) { + return Mono.error(new IllegalArgumentException("Parameter raiPolicyName 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, raiPolicyName, this.client.getApiVersion(), accept, context); + } + + /** + * Gets the specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Content Filters associated with the Azure OpenAI account on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String workspaceName, + String endpointName, String raiPolicyName) { + return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, raiPolicyName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Content Filters associated with the Azure OpenAI account along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, + String workspaceName, String endpointName, String raiPolicyName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, raiPolicyName, context).block(); + } + + /** + * Gets the specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Content Filters associated with the Azure OpenAI account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RaiPolicyPropertiesBasicResourceInner get(String resourceGroupName, String workspaceName, + String endpointName, String raiPolicyName) { + return getWithResponse(resourceGroupName, workspaceName, endpointName, raiPolicyName, Context.NONE).getValue(); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName, String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body, String proxyApiVersion) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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 (raiPolicyName == null) { + return Mono.error(new IllegalArgumentException("Parameter raiPolicyName 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.create(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, endpointName, raiPolicyName, this.client.getApiVersion(), + proxyApiVersion, body, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync(String resourceGroupName, String workspaceName, + String endpointName, String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body, String proxyApiVersion, + 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 (raiPolicyName == null) { + return Mono.error(new IllegalArgumentException("Parameter raiPolicyName 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.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, endpointName, raiPolicyName, this.client.getApiVersion(), proxyApiVersion, body, accept, + context); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, RaiPolicyPropertiesBasicResourceInner> + beginCreateAsync(String resourceGroupName, String workspaceName, String endpointName, String raiPolicyName, + RaiPolicyPropertiesBasicResourceInner body, String proxyApiVersion) { + Mono>> mono = createWithResponseAsync(resourceGroupName, workspaceName, endpointName, + raiPolicyName, body, proxyApiVersion); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), RaiPolicyPropertiesBasicResourceInner.class, + RaiPolicyPropertiesBasicResourceInner.class, this.client.getContext()); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @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 {@link PollerFlux} for polling of azure OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, RaiPolicyPropertiesBasicResourceInner> + beginCreateAsync(String resourceGroupName, String workspaceName, String endpointName, String raiPolicyName, + RaiPolicyPropertiesBasicResourceInner body) { + final String proxyApiVersion = null; + Mono>> mono = createWithResponseAsync(resourceGroupName, workspaceName, endpointName, + raiPolicyName, body, proxyApiVersion); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), RaiPolicyPropertiesBasicResourceInner.class, + RaiPolicyPropertiesBasicResourceInner.class, this.client.getContext()); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, RaiPolicyPropertiesBasicResourceInner> + beginCreateAsync(String resourceGroupName, String workspaceName, String endpointName, String raiPolicyName, + RaiPolicyPropertiesBasicResourceInner body, String proxyApiVersion, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createWithResponseAsync(resourceGroupName, workspaceName, endpointName, + raiPolicyName, body, proxyApiVersion, context); + return this.client.getLroResult( + mono, this.client.getHttpPipeline(), RaiPolicyPropertiesBasicResourceInner.class, + RaiPolicyPropertiesBasicResourceInner.class, context); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @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 {@link SyncPoller} for polling of azure OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, RaiPolicyPropertiesBasicResourceInner> + beginCreate(String resourceGroupName, String workspaceName, String endpointName, String raiPolicyName, + RaiPolicyPropertiesBasicResourceInner body) { + final String proxyApiVersion = null; + return this + .beginCreateAsync(resourceGroupName, workspaceName, endpointName, raiPolicyName, body, proxyApiVersion) + .getSyncPoller(); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, RaiPolicyPropertiesBasicResourceInner> + beginCreate(String resourceGroupName, String workspaceName, String endpointName, String raiPolicyName, + RaiPolicyPropertiesBasicResourceInner body, String proxyApiVersion, Context context) { + return this + .beginCreateAsync(resourceGroupName, workspaceName, endpointName, raiPolicyName, body, proxyApiVersion, + context) + .getSyncPoller(); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String workspaceName, + String endpointName, String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body, String proxyApiVersion) { + return beginCreateAsync(resourceGroupName, workspaceName, endpointName, raiPolicyName, body, proxyApiVersion) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @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 azure OpenAI Content Filters resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String workspaceName, + String endpointName, String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body) { + final String proxyApiVersion = null; + return beginCreateAsync(resourceGroupName, workspaceName, endpointName, raiPolicyName, body, proxyApiVersion) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String workspaceName, + String endpointName, String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body, String proxyApiVersion, + Context context) { + return beginCreateAsync(resourceGroupName, workspaceName, endpointName, raiPolicyName, body, proxyApiVersion, + context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @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 azure OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RaiPolicyPropertiesBasicResourceInner create(String resourceGroupName, String workspaceName, + String endpointName, String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body) { + final String proxyApiVersion = null; + return createAsync(resourceGroupName, workspaceName, endpointName, raiPolicyName, body, proxyApiVersion) + .block(); + } + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RaiPolicyPropertiesBasicResourceInner create(String resourceGroupName, String workspaceName, + String endpointName, String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body, String proxyApiVersion, + Context context) { + return createAsync(resourceGroupName, workspaceName, endpointName, raiPolicyName, body, proxyApiVersion, + context).block(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPolicyOperationsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPolicyOperationsImpl.java new file mode 100644 index 0000000000000..3239621702cb5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPolicyOperationsImpl.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.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.RaiPolicyOperationsClient; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiPolicyPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyOperations; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyPropertiesBasicResource; + +public final class RaiPolicyOperationsImpl implements RaiPolicyOperations { + private static final ClientLogger LOGGER = new ClientLogger(RaiPolicyOperationsImpl.class); + + private final RaiPolicyOperationsClient innerClient; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + public RaiPolicyOperationsImpl(RaiPolicyOperationsClient innerClient, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public void delete(String resourceGroupName, String workspaceName, String endpointName, String raiPolicyName) { + this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, raiPolicyName); + } + + public void delete(String resourceGroupName, String workspaceName, String endpointName, String raiPolicyName, + String proxyApiVersion, Context context) { + this.serviceClient() + .delete(resourceGroupName, workspaceName, endpointName, raiPolicyName, proxyApiVersion, context); + } + + public Response getWithResponse(String resourceGroupName, String workspaceName, + String endpointName, String raiPolicyName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, workspaceName, endpointName, raiPolicyName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new RaiPolicyPropertiesBasicResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public RaiPolicyPropertiesBasicResource get(String resourceGroupName, String workspaceName, String endpointName, + String raiPolicyName) { + RaiPolicyPropertiesBasicResourceInner inner + = this.serviceClient().get(resourceGroupName, workspaceName, endpointName, raiPolicyName); + if (inner != null) { + return new RaiPolicyPropertiesBasicResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public RaiPolicyPropertiesBasicResource create(String resourceGroupName, String workspaceName, String endpointName, + String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body) { + RaiPolicyPropertiesBasicResourceInner inner + = this.serviceClient().create(resourceGroupName, workspaceName, endpointName, raiPolicyName, body); + if (inner != null) { + return new RaiPolicyPropertiesBasicResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public RaiPolicyPropertiesBasicResource create(String resourceGroupName, String workspaceName, String endpointName, + String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body, String proxyApiVersion, Context context) { + RaiPolicyPropertiesBasicResourceInner inner = this.serviceClient() + .create(resourceGroupName, workspaceName, endpointName, raiPolicyName, body, proxyApiVersion, context); + if (inner != null) { + return new RaiPolicyPropertiesBasicResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + private RaiPolicyOperationsClient 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/RaiPolicyPropertiesBasicResourceImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPolicyPropertiesBasicResourceImpl.java new file mode 100644 index 0000000000000..d6a0ae4aa7bbd --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/RaiPolicyPropertiesBasicResourceImpl.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.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiPolicyPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyProperties; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyPropertiesBasicResource; + +public final class RaiPolicyPropertiesBasicResourceImpl + implements RaiPolicyPropertiesBasicResource, RaiPolicyPropertiesBasicResource.Definition { + private RaiPolicyPropertiesBasicResourceInner innerObject; + + private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; + + RaiPolicyPropertiesBasicResourceImpl(RaiPolicyPropertiesBasicResourceInner 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 RaiPolicyProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public RaiPolicyPropertiesBasicResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String workspaceName; + + private String connectionName; + + private String raiPolicyName; + + private String createProxyApiVersion; + + public RaiPolicyPropertiesBasicResourceImpl withExistingConnection(String resourceGroupName, String workspaceName, + String connectionName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + this.connectionName = connectionName; + return this; + } + + public RaiPolicyPropertiesBasicResource create() { + this.innerObject = serviceManager.serviceClient() + .getConnectionRaiPolicyOperations() + .create(resourceGroupName, workspaceName, connectionName, raiPolicyName, this.innerModel(), + createProxyApiVersion, Context.NONE); + return this; + } + + public RaiPolicyPropertiesBasicResource create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getConnectionRaiPolicyOperations() + .create(resourceGroupName, workspaceName, connectionName, raiPolicyName, this.innerModel(), + createProxyApiVersion, context); + return this; + } + + RaiPolicyPropertiesBasicResourceImpl(String name, + com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { + this.innerObject = new RaiPolicyPropertiesBasicResourceInner(); + this.serviceManager = serviceManager; + this.raiPolicyName = name; + this.createProxyApiVersion = null; + } + + public RaiPolicyPropertiesBasicResource refresh() { + this.innerObject = serviceManager.serviceClient() + .getConnectionRaiPolicyOperations() + .getWithResponse(resourceGroupName, workspaceName, connectionName, raiPolicyName, Context.NONE) + .getValue(); + return this; + } + + public RaiPolicyPropertiesBasicResource refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getConnectionRaiPolicyOperations() + .getWithResponse(resourceGroupName, workspaceName, connectionName, raiPolicyName, context) + .getValue(); + return this; + } + + public RaiPolicyPropertiesBasicResourceImpl withProperties(RaiPolicyProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public RaiPolicyPropertiesBasicResourceImpl withProxyApiVersion(String proxyApiVersion) { + this.createProxyApiVersion = proxyApiVersion; + return this; + } +} 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 index 37863e5db4586..da221014d53d1 100644 --- 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 @@ -9,6 +9,7 @@ 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; @@ -79,6 +80,10 @@ public ArmResourceId managedResourceGroup() { return this.innerModel().managedResourceGroup(); } + public ManagedResourceGroupSettings managedResourceGroupSettings() { + return this.innerModel().managedResourceGroupSettings(); + } + public String mlFlowRegistryUri() { return this.innerModel().mlFlowRegistryUri(); } @@ -259,6 +264,11 @@ public RegistryImpl withManagedResourceGroup(ArmResourceId 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; 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 index 0bd10a98774f1..04d5d4e91b6ff 100644 --- 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 @@ -52,16 +52,16 @@ public Map tags() { } } - public ServerlessEndpointProperties properties() { - return this.innerModel().properties(); + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); } public String kind() { return this.innerModel().kind(); } - public ManagedServiceIdentity identity() { - return this.innerModel().identity(); + public ServerlessEndpointProperties properties() { + return this.innerModel().properties(); } public Sku sku() { @@ -214,13 +214,13 @@ public ServerlessEndpointImpl withTags(Map tags) { } } - public ServerlessEndpointImpl withKind(String kind) { - this.innerModel().withKind(kind); + public ServerlessEndpointImpl withIdentity(ManagedServiceIdentity identity) { + this.innerModel().withIdentity(identity); return this; } - public ServerlessEndpointImpl withIdentity(ManagedServiceIdentity identity) { - this.innerModel().withIdentity(identity); + public ServerlessEndpointImpl withKind(String kind) { + this.innerModel().withKind(kind); return this; } @@ -229,13 +229,13 @@ public ServerlessEndpointImpl withSku(Sku sku) { return this; } - public ServerlessEndpointImpl withSku(PartialSku sku) { - this.updateBody.withSku(sku); + public ServerlessEndpointImpl withIdentity(PartialManagedServiceIdentity identity) { + this.updateBody.withIdentity(identity); return this; } - public ServerlessEndpointImpl withIdentity(PartialManagedServiceIdentity identity) { - this.updateBody.withIdentity(identity); + public ServerlessEndpointImpl withSku(PartialSku sku) { + this.updateBody.withSku(sku); return this; } 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 7d3e193ce5f72..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 @@ -20,6 +20,10 @@ public final class SkuResourceImpl implements SkuResource { this.serviceManager = serviceManager; } + public SkuCapacity capacity() { + return this.innerModel().capacity(); + } + public String resourceType() { return this.innerModel().resourceType(); } @@ -28,10 +32,6 @@ public SkuSetting sku() { return this.innerModel().sku(); } - public SkuCapacity capacity() { - return this.innerModel().capacity(); - } - public SkuResourceInner innerModel() { return this.innerObject; } 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/UsageAndQuotaDetailsImpl.java similarity index 53% 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/UsageAndQuotaDetailsImpl.java index b245faebb0a88..380a5659e7149 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/UsageAndQuotaDetailsImpl.java @@ -4,25 +4,33 @@ 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.UsageAndQuotaDetailsInner; +import com.azure.resourcemanager.machinelearning.models.PtuDeploymentUsage; +import com.azure.resourcemanager.machinelearning.models.UsageAndQuotaDetails; import java.util.Collections; import java.util.List; -public final class PrivateLinkResourceListResultImpl implements PrivateLinkResourceListResult { - private PrivateLinkResourceListResultInner innerObject; +public final class UsageAndQuotaDetailsImpl implements UsageAndQuotaDetails { + private UsageAndQuotaDetailsInner innerObject; private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - PrivateLinkResourceListResultImpl(PrivateLinkResourceListResultInner innerObject, + UsageAndQuotaDetailsImpl(UsageAndQuotaDetailsInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } - public List value() { - List inner = this.innerModel().value(); + public String modelCollection() { + return this.innerModel().modelCollection(); + } + + public Long quota() { + return this.innerModel().quota(); + } + + public List usageDetails() { + List inner = this.innerModel().usageDetails(); if (inner != null) { return Collections.unmodifiableList(inner); } else { @@ -30,7 +38,7 @@ public List value() { } } - public PrivateLinkResourceListResultInner innerModel() { + public UsageAndQuotaDetailsInner innerModel() { return this.innerObject; } 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 8dbbeb5c54524..6a09997b24ae5 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 @@ -10,19 +10,15 @@ 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,6 +57,8 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String connectionName; + private WorkspaceConnectionUpdateParameter updateBody; + public WorkspaceConnectionPropertiesV2BasicResourceImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { this.resourceGroupName = resourceGroupName; @@ -87,6 +89,36 @@ public WorkspaceConnectionPropertiesV2BasicResource create(Context context) { 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() @@ -112,8 +144,26 @@ 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 62ef51558d033..d1d27645dda67 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,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; @@ -27,11 +28,17 @@ 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; /** @@ -67,14 +74,24 @@ public final class WorkspaceConnectionsClientImpl implements WorkspaceConnection @ServiceInterface(name = "AzureMachineLearning") public interface WorkspaceConnectionsService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}") + @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); @Headers({ "Content-Type: application/json" }) @@ -88,24 +105,26 @@ Mono> get(@HostParam @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 }) + @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, + @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") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, + 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, Context context); + @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") @@ -117,31 +136,493 @@ Mono> listSecrets( @PathParam("connectionName") String connectionName, @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); + @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 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context 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. + * @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 PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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 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 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 + .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.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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.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.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, connectionName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if 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, 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 (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.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, + connectionName, this.client.getApiVersion(), accept, 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, + String workspaceName, String connectionName) { + return getWithResponseAsync(resourceGroupName, workspaceName, connectionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * 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 context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, + String workspaceName, String connectionName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, connectionName, context).block(); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 get(String resourceGroupName, String workspaceName, + String connectionName) { + return getWithResponse(resourceGroupName, workspaceName, connectionName, Context.NONE).getValue(); } /** - * The create 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 parameters The object for creating or updating a new 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> createWithResponseAsync( + private Mono> updateWithResponseAsync( String resourceGroupName, String workspaceName, String connectionName, - WorkspaceConnectionPropertiesV2BasicResourceInner parameters) { + WorkspaceConnectionUpdateParameter body) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -160,26 +641,23 @@ 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(); + if (body != null) { + body.validate(); } 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)) + .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 create 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 parameters The object for creating or updating a new 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. @@ -187,9 +665,9 @@ 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, 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.")); @@ -208,43 +686,41 @@ 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(); + if (body != null) { + body.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.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, connectionName, this.client.getApiVersion(), body, accept, context); } /** - * The create 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 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 updateAsync(String resourceGroupName, + String workspaceName, String connectionName) { + final WorkspaceConnectionUpdateParameter body = null; + return updateWithResponseAsync(resourceGroupName, workspaceName, connectionName, body) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * The create 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 parameters The object for creating or updating a new 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. @@ -252,45 +728,45 @@ private Mono createAsync(Stri * @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 updateWithResponse(String resourceGroupName, + String workspaceName, String connectionName, WorkspaceConnectionUpdateParameter body, Context context) { + return updateWithResponseAsync(resourceGroupName, workspaceName, connectionName, body, context).block(); } /** - * The create 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 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) - .getValue(); + public WorkspaceConnectionPropertiesV2BasicResourceInner update(String resourceGroupName, String workspaceName, + String connectionName) { + final WorkspaceConnectionUpdateParameter body = null; + return updateWithResponse(resourceGroupName, workspaceName, connectionName, body, Context.NONE).getValue(); } /** - * The get 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 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> 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.")); @@ -309,19 +785,23 @@ public WorkspaceConnectionPropertiesV2BasicResourceInner create(String resourceG 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.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 get 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. @@ -329,8 +809,9 @@ public WorkspaceConnectionPropertiesV2BasicResourceInner create(String resourceG * @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> 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.")); @@ -349,17 +830,20 @@ public WorkspaceConnectionPropertiesV2BasicResourceInner create(String resourceG 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.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, connectionName, this.client.getApiVersion(), body, accept, context); } /** - * The get 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. @@ -367,18 +851,20 @@ public WorkspaceConnectionPropertiesV2BasicResourceInner create(String resourceG * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, + private Mono createAsync(String resourceGroupName, String workspaceName, String connectionName) { - return getWithResponseAsync(resourceGroupName, workspaceName, connectionName) + final WorkspaceConnectionPropertiesV2BasicResourceInner body = null; + return createWithResponseAsync(resourceGroupName, workspaceName, connectionName, body) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * The get 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. @@ -386,16 +872,17 @@ private Mono getAsync(String * @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 createWithResponse(String resourceGroupName, + String workspaceName, String connectionName, WorkspaceConnectionPropertiesV2BasicResourceInner body, + Context context) { + return createWithResponseAsync(resourceGroupName, workspaceName, connectionName, body, context).block(); } /** - * The get 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. @@ -403,25 +890,26 @@ public Response getWithRespon * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceConnectionPropertiesV2BasicResourceInner get(String resourceGroupName, String workspaceName, + public WorkspaceConnectionPropertiesV2BasicResourceInner create(String resourceGroupName, String workspaceName, String connectionName) { - return getWithResponse(resourceGroupName, workspaceName, connectionName, Context.NONE).getValue(); + final WorkspaceConnectionPropertiesV2BasicResourceInner body = null; + return createWithResponse(resourceGroupName, workspaceName, connectionName, body, Context.NONE).getValue(); } /** - * 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 ManagementException thrown 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> + listSecretsWithResponseAsync(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.")); @@ -442,26 +930,26 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + .withContext(context -> service.listSecrets(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * 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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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> listSecretsWithResponseAsync( + 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.")); @@ -482,75 +970,78 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + return service.listSecrets(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, workspaceName, connectionName, this.client.getApiVersion(), accept, 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 ManagementException 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 listSecretsAsync(String resourceGroupName, + String workspaceName, String connectionName) { + return listSecretsWithResponseAsync(resourceGroupName, workspaceName, connectionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * 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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown 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 listSecretsWithResponse(String resourceGroupName, + String workspaceName, String connectionName, Context context) { + return listSecretsWithResponseAsync(resourceGroupName, workspaceName, connectionName, context).block(); } /** - * 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 ManagementException thrown 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 listSecrets(String resourceGroupName, String workspaceName, + String connectionName) { + return listSecretsWithResponse(resourceGroupName, workspaceName, connectionName, Context.NONE).getValue(); } /** - * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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 {@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>> 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.")); @@ -566,32 +1057,36 @@ public void delete(String resourceGroupName, String workspaceName, String connec 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.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.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())); } /** - * 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 response body 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> listSinglePageAsync( - String resourceGroupName, String workspaceName, String target, String category, Context context) { + 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.")); @@ -607,239 +1102,210 @@ 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)); + return service.testConnection(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, connectionName, this.client.getApiVersion(), body, accept, 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 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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(); } /** - * List all the secrets of a machine learning workspaces connections. + * 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. + * @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 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> - listSecretsWithResponseAsync(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 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.listSecrets(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, connectionName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono testConnectionAsync(String resourceGroupName, String workspaceName, String connectionName, + WorkspaceConnectionPropertiesV2BasicResourceInner body) { + return beginTestConnectionAsync(resourceGroupName, workspaceName, connectionName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * List all the secrets of a machine learning workspaces connections. + * 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. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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> listSecretsWithResponseAsync( - 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 - .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(), accept, context); + private Mono testConnectionAsync(String resourceGroupName, String workspaceName, String connectionName) { + final WorkspaceConnectionPropertiesV2BasicResourceInner body = null; + return beginTestConnectionAsync(resourceGroupName, workspaceName, connectionName, body).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * List all the secrets of a machine learning workspaces connections. + * 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. + * @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 response body on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listSecretsAsync(String resourceGroupName, - String workspaceName, String connectionName) { - return listSecretsWithResponseAsync(resourceGroupName, workspaceName, connectionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + 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); } /** - * List all the secrets of a machine learning workspaces connections. + * 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. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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, Context context) { - return listSecretsWithResponseAsync(resourceGroupName, workspaceName, connectionName, context).block(); + public void testConnection(String resourceGroupName, String workspaceName, String connectionName) { + final WorkspaceConnectionPropertiesV2BasicResourceInner body = null; + testConnectionAsync(resourceGroupName, workspaceName, connectionName, body).block(); } /** - * List all the secrets of a machine learning workspaces connections. + * 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. + * @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 response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceConnectionPropertiesV2BasicResourceInner listSecrets(String resourceGroupName, String workspaceName, - String connectionName) { - return listSecretsWithResponse(resourceGroupName, workspaceName, connectionName, Context.NONE).getValue(); + public void testConnection(String resourceGroupName, String workspaceName, String connectionName, + WorkspaceConnectionPropertiesV2BasicResourceInner body, Context context) { + testConnectionAsync(resourceGroupName, workspaceName, connectionName, body, context).block(); } /** 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 58050994047b8..356bfe8af693b 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 @@ -27,6 +27,31 @@ public WorkspaceConnectionsImpl(WorkspaceConnectionsClient innerClient, this.serviceManager = serviceManager; } + 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, Context context) { Response inner @@ -50,31 +75,6 @@ public WorkspaceConnectionPropertiesV2BasicResource get(String resourceGroupName } } - 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 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, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, workspaceName, target, category, context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new WorkspaceConnectionPropertiesV2BasicResourceImpl(inner1, this.manager())); - } - public Response listSecretsWithResponse(String resourceGroupName, String workspaceName, String connectionName, Context context) { Response inner @@ -98,6 +98,15 @@ public WorkspaceConnectionPropertiesV2BasicResource listSecrets(String resourceG } } + public void testConnection(String resourceGroupName, String workspaceName, String connectionName) { + this.serviceClient().testConnection(resourceGroupName, workspaceName, connectionName); + } + + 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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { 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 dea0ef544dde9..c67a3e66eabb6 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 @@ -22,15 +22,17 @@ 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.NetworkAcls; 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.SystemDatastoresAuthMode; import com.azure.resourcemanager.machinelearning.models.Workspace; import com.azure.resourcemanager.machinelearning.models.WorkspaceHubConfig; import com.azure.resourcemanager.machinelearning.models.WorkspaceUpdateParameters; @@ -68,6 +70,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) { @@ -77,95 +83,120 @@ 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 String agentsEndpointUri() { + return this.innerModel().agentsEndpointUri(); } - public String friendlyName() { - return this.innerModel().friendlyName(); + public Boolean allowPublicAccessWhenBehindVnet() { + return this.innerModel().allowPublicAccessWhenBehindVnet(); } - public String keyVault() { - return this.innerModel().keyVault(); + public Boolean allowRoleAssignmentOnRG() { + return this.innerModel().allowRoleAssignmentOnRG(); } public String applicationInsights() { return this.innerModel().applicationInsights(); } + public List associatedWorkspaces() { + List inner = this.innerModel().associatedWorkspaces(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + 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 enableServiceSideCmkEncryption() { + return this.innerModel().enableServiceSideCmkEncryption(); + } + + public Boolean enableSimplifiedCmk() { + return this.innerModel().enableSimplifiedCmk(); + } + + 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 ServerlessComputeSettings serverlessComputeSettings() { - return this.innerModel().serverlessComputeSettings(); + public String keyVault() { + return this.innerModel().keyVault(); } - public List sharedPrivateLinkResources() { - List inner = this.innerModel().sharedPrivateLinkResources(); + public List keyVaults() { + List inner = this.innerModel().keyVaults(); if (inner != null) { return Collections.unmodifiableList(inner); } else { @@ -173,6 +204,23 @@ 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 NetworkAcls networkAcls() { + return this.innerModel().networkAcls(); + } + public NotebookResourceInfo notebookInfo() { NotebookResourceInfoInner inner = this.innerModel().notebookInfo(); if (inner != null) { @@ -182,45 +230,68 @@ public NotebookResourceInfo notebookInfo() { } } - public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { - return this.innerModel().serviceManagedResourcesSettings(); - } - public String primaryUserAssignedIdentity() { return this.innerModel().primaryUserAssignedIdentity(); } - public String tenantId() { - return this.innerModel().tenantId(); + 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 Boolean storageHnsEnabled() { - return this.innerModel().storageHnsEnabled(); + public Integer privateLinkCount() { + return this.innerModel().privateLinkCount(); } - public String mlFlowTrackingUri() { - return this.innerModel().mlFlowTrackingUri(); + public Boolean provisionNetworkNow() { + return this.innerModel().provisionNetworkNow(); } - public Boolean v1LegacyMode() { - return this.innerModel().v1LegacyMode(); + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); } - public ManagedNetworkSettings managedNetwork() { - ManagedNetworkSettingsInner inner = this.innerModel().managedNetwork(); + public PublicNetworkAccessType publicNetworkAccess() { + return this.innerModel().publicNetworkAccess(); + } + + public ServerlessComputeSettings serverlessComputeSettings() { + return this.innerModel().serverlessComputeSettings(); + } + + public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { + return this.innerModel().serviceManagedResourcesSettings(); + } + + public String serviceProvisionedResourceGroup() { + return this.innerModel().serviceProvisionedResourceGroup(); + } + + public List sharedPrivateLinkResources() { + List inner = this.innerModel().sharedPrivateLinkResources(); if (inner != null) { - return new ManagedNetworkSettingsImpl(inner, this.manager()); + return Collections.unmodifiableList(inner); } else { - return null; + return Collections.emptyList(); } } - public FeatureStoreSettings featureStoreSettings() { - return this.innerModel().featureStoreSettings(); + public Integer softDeleteRetentionInDays() { + return this.innerModel().softDeleteRetentionInDays(); } - public List associatedWorkspaces() { - List inner = this.innerModel().associatedWorkspaces(); + public String storageAccount() { + return this.innerModel().storageAccount(); + } + + public List storageAccounts() { + List inner = this.innerModel().storageAccounts(); if (inner != null) { return Collections.unmodifiableList(inner); } else { @@ -228,18 +299,30 @@ public List associatedWorkspaces() { } } - public Boolean enableDataIsolation() { - return this.innerModel().enableDataIsolation(); + public Boolean storageHnsEnabled() { + return this.innerModel().storageHnsEnabled(); } - public String hubResourceId() { - return this.innerModel().hubResourceId(); + public SystemDatastoresAuthMode 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()); } @@ -264,7 +347,7 @@ private com.azure.resourcemanager.machinelearning.MachineLearningManager manager private String workspaceName; - private WorkspaceUpdateParameters updateParameters; + private WorkspaceUpdateParameters updateBody; public WorkspaceImpl withExistingResourceGroup(String resourceGroupName) { this.resourceGroupName = resourceGroupName; @@ -292,21 +375,21 @@ public Workspace create(Context context) { } public WorkspaceImpl update() { - this.updateParameters = new WorkspaceUpdateParameters(); + this.updateBody = new WorkspaceUpdateParameters(); return this; } public Workspace apply() { this.innerObject = serviceManager.serviceClient() .getWorkspaces() - .update(resourceGroupName, workspaceName, updateParameters, Context.NONE); + .update(resourceGroupName, workspaceName, updateBody, Context.NONE); return this; } public Workspace apply(Context context) { this.innerObject = serviceManager.serviceClient() .getWorkspaces() - .update(resourceGroupName, workspaceName, updateParameters, context); + .update(resourceGroupName, workspaceName, updateBody, context); return this; } @@ -338,8 +421,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) { @@ -350,14 +433,6 @@ 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); @@ -367,12 +442,12 @@ 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) { @@ -384,12 +459,20 @@ 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) { @@ -407,7 +490,7 @@ public WorkspaceImpl withTags(Map tags) { this.innerModel().withTags(tags); return this; } else { - this.updateParameters.withTags(tags); + this.updateBody.withTags(tags); return this; } } @@ -417,7 +500,7 @@ public WorkspaceImpl withIdentity(ManagedServiceIdentity identity) { this.innerModel().withIdentity(identity); return this; } else { - this.updateParameters.withIdentity(identity); + this.updateBody.withIdentity(identity); return this; } } @@ -432,123 +515,187 @@ public WorkspaceImpl withSku(Sku sku) { 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 withAllowRoleAssignmentOnRG(Boolean allowRoleAssignmentOnRG) { if (isInCreateMode()) { - this.innerModel().withDescription(description); + this.innerModel().withAllowRoleAssignmentOnRG(allowRoleAssignmentOnRG); return this; } else { - this.updateParameters.withDescription(description); + this.updateBody.withAllowRoleAssignmentOnRG(allowRoleAssignmentOnRG); return this; } } - public WorkspaceImpl withFriendlyName(String friendlyName) { + public WorkspaceImpl withApplicationInsights(String applicationInsights) { if (isInCreateMode()) { - this.innerModel().withFriendlyName(friendlyName); + this.innerModel().withApplicationInsights(applicationInsights); return this; } else { - this.updateParameters.withFriendlyName(friendlyName); + this.updateBody.withApplicationInsights(applicationInsights); return this; } } - public WorkspaceImpl withKeyVault(String keyVault) { - this.innerModel().withKeyVault(keyVault); + public WorkspaceImpl withAssociatedWorkspaces(List associatedWorkspaces) { + this.innerModel().withAssociatedWorkspaces(associatedWorkspaces); return this; } - public WorkspaceImpl withApplicationInsights(String applicationInsights) { + public WorkspaceImpl withContainerRegistries(List containerRegistries) { + this.innerModel().withContainerRegistries(containerRegistries); + return this; + } + + public WorkspaceImpl withContainerRegistry(String containerRegistry) { if (isInCreateMode()) { - this.innerModel().withApplicationInsights(applicationInsights); + this.innerModel().withContainerRegistry(containerRegistry); return this; } else { - this.updateParameters.withApplicationInsights(applicationInsights); + this.updateBody.withContainerRegistry(containerRegistry); return this; } } - public WorkspaceImpl withContainerRegistry(String containerRegistry) { + public WorkspaceImpl withDescription(String description) { if (isInCreateMode()) { - this.innerModel().withContainerRegistry(containerRegistry); + this.innerModel().withDescription(description); return this; } else { - this.updateParameters.withContainerRegistry(containerRegistry); + this.updateBody.withDescription(description); return this; } } - public WorkspaceImpl withStorageAccount(String storageAccount) { - this.innerModel().withStorageAccount(storageAccount); + public WorkspaceImpl withDiscoveryUrl(String discoveryUrl) { + this.innerModel().withDiscoveryUrl(discoveryUrl); return this; } - public WorkspaceImpl withDiscoveryUrl(String discoveryUrl) { - this.innerModel().withDiscoveryUrl(discoveryUrl); + public WorkspaceImpl withEnableDataIsolation(Boolean enableDataIsolation) { + if (isInCreateMode()) { + this.innerModel().withEnableDataIsolation(enableDataIsolation); + return this; + } else { + this.updateBody.withEnableDataIsolation(enableDataIsolation); + return this; + } + } + + public WorkspaceImpl withEnableServiceSideCmkEncryption(Boolean enableServiceSideCmkEncryption) { + this.innerModel().withEnableServiceSideCmkEncryption(enableServiceSideCmkEncryption); + return this; + } + + public WorkspaceImpl withEnableSimplifiedCmk(Boolean enableSimplifiedCmk) { + this.innerModel().withEnableSimplifiedCmk(enableSimplifiedCmk); return this; } + public WorkspaceImpl withEnableSoftwareBillOfMaterials(Boolean enableSoftwareBillOfMaterials) { + if (isInCreateMode()) { + this.innerModel().withEnableSoftwareBillOfMaterials(enableSoftwareBillOfMaterials); + return this; + } else { + this.updateBody.withEnableSoftwareBillOfMaterials(enableSoftwareBillOfMaterials); + return this; + } + } + public WorkspaceImpl withEncryption(EncryptionProperty encryption) { this.innerModel().withEncryption(encryption); return this; } - public WorkspaceImpl withHbiWorkspace(Boolean hbiWorkspace) { - this.innerModel().withHbiWorkspace(hbiWorkspace); + public WorkspaceImpl withExistingWorkspaces(List existingWorkspaces) { + this.innerModel().withExistingWorkspaces(existingWorkspaces); return this; } - public WorkspaceImpl withImageBuildCompute(String imageBuildCompute) { + public WorkspaceImpl withFeatureStoreSettings(FeatureStoreSettings featureStoreSettings) { if (isInCreateMode()) { - this.innerModel().withImageBuildCompute(imageBuildCompute); + this.innerModel().withFeatureStoreSettings(featureStoreSettings); return this; } else { - this.updateParameters.withImageBuildCompute(imageBuildCompute); + this.updateBody.withFeatureStoreSettings(featureStoreSettings); return this; } } - public WorkspaceImpl withAllowPublicAccessWhenBehindVnet(Boolean allowPublicAccessWhenBehindVnet) { - this.innerModel().withAllowPublicAccessWhenBehindVnet(allowPublicAccessWhenBehindVnet); + 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) { + this.innerModel().withHbiWorkspace(hbiWorkspace); return this; } - public WorkspaceImpl withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + public WorkspaceImpl withHubResourceId(String hubResourceId) { + this.innerModel().withHubResourceId(hubResourceId); + return this; + } + + public WorkspaceImpl withImageBuildCompute(String imageBuildCompute) { if (isInCreateMode()) { - this.innerModel().withPublicNetworkAccess(publicNetworkAccess); + this.innerModel().withImageBuildCompute(imageBuildCompute); return this; } else { - this.updateParameters.withPublicNetworkAccess(publicNetworkAccess); + this.updateBody.withImageBuildCompute(imageBuildCompute); return this; } } - public WorkspaceImpl withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings) { + public WorkspaceImpl withIpAllowlist(List ipAllowlist) { if (isInCreateMode()) { - this.innerModel().withServerlessComputeSettings(serverlessComputeSettings); + this.innerModel().withIpAllowlist(ipAllowlist); return this; } else { - this.updateParameters.withServerlessComputeSettings(serverlessComputeSettings); + this.updateBody.withIpAllowlist(ipAllowlist); return this; } } - public WorkspaceImpl withSharedPrivateLinkResources(List sharedPrivateLinkResources) { - this.innerModel().withSharedPrivateLinkResources(sharedPrivateLinkResources); + public WorkspaceImpl withKeyVault(String keyVault) { + this.innerModel().withKeyVault(keyVault); return this; } - public WorkspaceImpl - withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings) { + public WorkspaceImpl withKeyVaults(List keyVaults) { + this.innerModel().withKeyVaults(keyVaults); + return this; + } + + public WorkspaceImpl withManagedNetwork(ManagedNetworkSettingsInner managedNetwork) { if (isInCreateMode()) { - this.innerModel().withServiceManagedResourcesSettings(serviceManagedResourcesSettings); + this.innerModel().withManagedNetwork(managedNetwork); + return this; + } else { + this.updateBody.withManagedNetwork(managedNetwork); + return this; + } + } + + public WorkspaceImpl withNetworkAcls(NetworkAcls networkAcls) { + if (isInCreateMode()) { + this.innerModel().withNetworkAcls(networkAcls); return this; } else { - this.updateParameters.withServiceManagedResourcesSettings(serviceManagedResourcesSettings); + this.updateBody.withNetworkAcls(networkAcls); return this; } } @@ -558,68 +705,99 @@ public WorkspaceImpl withPrimaryUserAssignedIdentity(String primaryUserAssignedI this.innerModel().withPrimaryUserAssignedIdentity(primaryUserAssignedIdentity); return this; } else { - this.updateParameters.withPrimaryUserAssignedIdentity(primaryUserAssignedIdentity); + this.updateBody.withPrimaryUserAssignedIdentity(primaryUserAssignedIdentity); return this; } } - public WorkspaceImpl withV1LegacyMode(Boolean v1LegacyMode) { + public WorkspaceImpl withProvisionNetworkNow(Boolean provisionNetworkNow) { + this.innerModel().withProvisionNetworkNow(provisionNetworkNow); + return this; + } + + public WorkspaceImpl withPublicNetworkAccess(PublicNetworkAccessType publicNetworkAccess) { if (isInCreateMode()) { - this.innerModel().withV1LegacyMode(v1LegacyMode); + this.innerModel().withPublicNetworkAccess(publicNetworkAccess); return this; } else { - this.updateParameters.withV1LegacyMode(v1LegacyMode); + this.updateBody.withPublicNetworkAccess(publicNetworkAccess); return this; } } - public WorkspaceImpl withManagedNetwork(ManagedNetworkSettingsInner managedNetwork) { + public WorkspaceImpl withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings) { if (isInCreateMode()) { - this.innerModel().withManagedNetwork(managedNetwork); + this.innerModel().withServerlessComputeSettings(serverlessComputeSettings); return this; } else { - this.updateParameters.withManagedNetwork(managedNetwork); + this.updateBody.withServerlessComputeSettings(serverlessComputeSettings); return this; } } - public WorkspaceImpl withFeatureStoreSettings(FeatureStoreSettings featureStoreSettings) { + public WorkspaceImpl + withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings) { if (isInCreateMode()) { - this.innerModel().withFeatureStoreSettings(featureStoreSettings); + this.innerModel().withServiceManagedResourcesSettings(serviceManagedResourcesSettings); return this; } else { - this.updateParameters.withFeatureStoreSettings(featureStoreSettings); + this.updateBody.withServiceManagedResourcesSettings(serviceManagedResourcesSettings); return this; } } - public WorkspaceImpl withAssociatedWorkspaces(List associatedWorkspaces) { - this.innerModel().withAssociatedWorkspaces(associatedWorkspaces); + public WorkspaceImpl withSharedPrivateLinkResources(List sharedPrivateLinkResources) { + this.innerModel().withSharedPrivateLinkResources(sharedPrivateLinkResources); return this; } - public WorkspaceImpl withEnableDataIsolation(Boolean enableDataIsolation) { + public WorkspaceImpl withSoftDeleteRetentionInDays(Integer softDeleteRetentionInDays) { if (isInCreateMode()) { - this.innerModel().withEnableDataIsolation(enableDataIsolation); + this.innerModel().withSoftDeleteRetentionInDays(softDeleteRetentionInDays); return this; } else { - this.updateParameters.withEnableDataIsolation(enableDataIsolation); + this.updateBody.withSoftDeleteRetentionInDays(softDeleteRetentionInDays); return this; } } - public WorkspaceImpl withHubResourceId(String hubResourceId) { - this.innerModel().withHubResourceId(hubResourceId); + public WorkspaceImpl withStorageAccount(String storageAccount) { + this.innerModel().withStorageAccount(storageAccount); + return this; + } + + public WorkspaceImpl withStorageAccounts(List storageAccounts) { + this.innerModel().withStorageAccounts(storageAccounts); return this; } + public WorkspaceImpl withSystemDatastoresAuthMode(SystemDatastoresAuthMode systemDatastoresAuthMode) { + if (isInCreateMode()) { + this.innerModel().withSystemDatastoresAuthMode(systemDatastoresAuthMode); + return this; + } else { + this.updateBody.withSystemDatastoresAuthMode(systemDatastoresAuthMode); + return this; + } + } + + public WorkspaceImpl withV1LegacyMode(Boolean v1LegacyMode) { + if (isInCreateMode()) { + this.innerModel().withV1LegacyMode(v1LegacyMode); + return this; + } else { + this.updateBody.withV1LegacyMode(v1LegacyMode); + return this; + } + } + public WorkspaceImpl withWorkspaceHubConfig(WorkspaceHubConfig workspaceHubConfig) { this.innerModel().withWorkspaceHubConfig(workspaceHubConfig); return this; } public WorkspaceImpl withEncryption(EncryptionUpdateProperties encryption) { - this.updateParameters.withEncryption(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 7b8461716398c..75868357685bd 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 @@ -11,13 +11,15 @@ 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.NetworkAcls; 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.SystemDatastoresAuthMode; import com.azure.resourcemanager.machinelearning.models.WorkspaceHubConfig; import com.azure.resourcemanager.machinelearning.models.WorkspaceProperties; import java.util.Collections; @@ -35,87 +37,116 @@ public final class WorkspacePropertiesImpl implements WorkspaceProperties { this.serviceManager = serviceManager; } - public String workspaceId() { - return this.innerModel().workspaceId(); - } - - public String description() { - return this.innerModel().description(); + public String agentsEndpointUri() { + return this.innerModel().agentsEndpointUri(); } - public String friendlyName() { - return this.innerModel().friendlyName(); + public Boolean allowPublicAccessWhenBehindVnet() { + return this.innerModel().allowPublicAccessWhenBehindVnet(); } - public String keyVault() { - return this.innerModel().keyVault(); + public Boolean allowRoleAssignmentOnRG() { + return this.innerModel().allowRoleAssignmentOnRG(); } public String applicationInsights() { return this.innerModel().applicationInsights(); } + public List associatedWorkspaces() { + List inner = this.innerModel().associatedWorkspaces(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + 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 enableServiceSideCmkEncryption() { + return this.innerModel().enableServiceSideCmkEncryption(); + } + + public Boolean enableSimplifiedCmk() { + return this.innerModel().enableSimplifiedCmk(); + } + + 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 ServerlessComputeSettings serverlessComputeSettings() { - return this.innerModel().serverlessComputeSettings(); + public String keyVault() { + return this.innerModel().keyVault(); } - public List sharedPrivateLinkResources() { - List inner = this.innerModel().sharedPrivateLinkResources(); + public List keyVaults() { + List inner = this.innerModel().keyVaults(); if (inner != null) { return Collections.unmodifiableList(inner); } else { @@ -123,6 +154,23 @@ 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 NetworkAcls networkAcls() { + return this.innerModel().networkAcls(); + } + public NotebookResourceInfo notebookInfo() { NotebookResourceInfoInner inner = this.innerModel().notebookInfo(); if (inner != null) { @@ -132,45 +180,68 @@ public NotebookResourceInfo notebookInfo() { } } - public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { - return this.innerModel().serviceManagedResourcesSettings(); - } - public String primaryUserAssignedIdentity() { return this.innerModel().primaryUserAssignedIdentity(); } - public String tenantId() { - return this.innerModel().tenantId(); + 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 Boolean storageHnsEnabled() { - return this.innerModel().storageHnsEnabled(); + public Integer privateLinkCount() { + return this.innerModel().privateLinkCount(); } - public String mlFlowTrackingUri() { - return this.innerModel().mlFlowTrackingUri(); + public Boolean provisionNetworkNow() { + return this.innerModel().provisionNetworkNow(); } - public Boolean v1LegacyMode() { - return this.innerModel().v1LegacyMode(); + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); } - public ManagedNetworkSettings managedNetwork() { - ManagedNetworkSettingsInner inner = this.innerModel().managedNetwork(); + public PublicNetworkAccessType publicNetworkAccess() { + return this.innerModel().publicNetworkAccess(); + } + + public ServerlessComputeSettings serverlessComputeSettings() { + return this.innerModel().serverlessComputeSettings(); + } + + public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { + return this.innerModel().serviceManagedResourcesSettings(); + } + + public String serviceProvisionedResourceGroup() { + return this.innerModel().serviceProvisionedResourceGroup(); + } + + public List sharedPrivateLinkResources() { + List inner = this.innerModel().sharedPrivateLinkResources(); if (inner != null) { - return new ManagedNetworkSettingsImpl(inner, this.manager()); + return Collections.unmodifiableList(inner); } else { - return null; + return Collections.emptyList(); } } - public FeatureStoreSettings featureStoreSettings() { - return this.innerModel().featureStoreSettings(); + public Integer softDeleteRetentionInDays() { + return this.innerModel().softDeleteRetentionInDays(); } - public List associatedWorkspaces() { - List inner = this.innerModel().associatedWorkspaces(); + public String storageAccount() { + return this.innerModel().storageAccount(); + } + + public List storageAccounts() { + List inner = this.innerModel().storageAccounts(); if (inner != null) { return Collections.unmodifiableList(inner); } else { @@ -178,18 +249,30 @@ public List associatedWorkspaces() { } } - public Boolean enableDataIsolation() { - return this.innerModel().enableDataIsolation(); + public Boolean storageHnsEnabled() { + return this.innerModel().storageHnsEnabled(); } - public String hubResourceId() { - return this.innerModel().hubResourceId(); + public SystemDatastoresAuthMode 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 index 33bff913658cb..ddc0e6923e2a1 100644 --- 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 @@ -9,10 +9,14 @@ 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.PublicNetworkAccess; +import com.azure.resourcemanager.machinelearning.models.NetworkAcls; +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.SystemDatastoresAuthMode; import com.azure.resourcemanager.machinelearning.models.WorkspacePropertiesUpdateParameters; +import java.util.Collections; +import java.util.List; public final class WorkspacePropertiesUpdateParametersImpl implements WorkspacePropertiesUpdateParameters { private WorkspacePropertiesUpdateParametersInner innerObject; @@ -25,44 +29,53 @@ public final class WorkspacePropertiesUpdateParametersImpl implements WorkspaceP this.serviceManager = serviceManager; } - public String description() { - return this.innerModel().description(); + public Boolean allowRoleAssignmentOnRG() { + return this.innerModel().allowRoleAssignmentOnRG(); } - public String friendlyName() { - return this.innerModel().friendlyName(); + public String applicationInsights() { + return this.innerModel().applicationInsights(); } - public String imageBuildCompute() { - return this.innerModel().imageBuildCompute(); + public String containerRegistry() { + return this.innerModel().containerRegistry(); } - public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { - return this.innerModel().serviceManagedResourcesSettings(); + public String description() { + return this.innerModel().description(); } - public String primaryUserAssignedIdentity() { - return this.innerModel().primaryUserAssignedIdentity(); + public Boolean enableDataIsolation() { + return this.innerModel().enableDataIsolation(); } - public ServerlessComputeSettings serverlessComputeSettings() { - return this.innerModel().serverlessComputeSettings(); + public Boolean enableSoftwareBillOfMaterials() { + return this.innerModel().enableSoftwareBillOfMaterials(); } - public PublicNetworkAccess publicNetworkAccess() { - return this.innerModel().publicNetworkAccess(); + public EncryptionUpdateProperties encryption() { + return this.innerModel().encryption(); } - public String applicationInsights() { - return this.innerModel().applicationInsights(); + public FeatureStoreSettings featureStoreSettings() { + return this.innerModel().featureStoreSettings(); } - public String containerRegistry() { - return this.innerModel().containerRegistry(); + public String friendlyName() { + return this.innerModel().friendlyName(); } - public FeatureStoreSettings featureStoreSettings() { - return this.innerModel().featureStoreSettings(); + 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() { @@ -74,16 +87,36 @@ public ManagedNetworkSettings managedNetwork() { } } - public Boolean enableDataIsolation() { - return this.innerModel().enableDataIsolation(); + public NetworkAcls networkAcls() { + return this.innerModel().networkAcls(); } - public Boolean v1LegacyMode() { - return this.innerModel().v1LegacyMode(); + public String primaryUserAssignedIdentity() { + return this.innerModel().primaryUserAssignedIdentity(); } - public EncryptionUpdateProperties encryption() { - return this.innerModel().encryption(); + 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 SystemDatastoresAuthMode systemDatastoresAuthMode() { + return this.innerModel().systemDatastoresAuthMode(); + } + + public Boolean v1LegacyMode() { + return this.innerModel().v1LegacyMode(); } public WorkspacePropertiesUpdateParametersInner innerModel() { 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 a6b6367922126..ed69161586112 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 @@ -82,50 +82,61 @@ public final class WorkspacesClientImpl implements WorkspacesClient { @ServiceInterface(name = "AzureMachineLearning") public interface WorkspacesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, Context context); + 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" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}") - @ExpectedResponses({ 200, 202 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @BodyParam("application/json") WorkspaceInner parameters, @HeaderParam("Accept") String accept, - Context context); + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @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" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @QueryParam("forceToPurge") Boolean forceToPurge, @HeaderParam("Accept") String accept, Context context); + @QueryParam("api-version") String apiVersion, @QueryParam("forceToPurge") Boolean forceToPurge, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@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" }) @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, @PathParam("subscriptionId") String subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @BodyParam("application/json") WorkspaceUpdateParameters parameters, @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") WorkspaceUpdateParameters body, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces") - @ExpectedResponses({ 200 }) + @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, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$skip") String skip, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @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" }) @@ -136,7 +147,7 @@ Mono>> diagnose(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @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" }) @@ -144,69 +155,61 @@ Mono>> diagnose(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listKeys(@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" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> resyncKeys(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("$skip") String skip, @HeaderParam("Accept") String accept, Context context); + @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 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNotebookAccessToken(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, Context context); + @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 }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookKeys") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> prepareNotebook(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listNotebookKeys(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, Context context); + @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 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listStorageAccountKeys(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, Context context); + @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") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundNetworkDependenciesEndpoints") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNotebookKeys(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listOutboundNetworkDependenciesEndpoints( + @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, Context context); + @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 }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/prepareNotebook") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listOutboundNetworkDependenciesEndpoints( - @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, + Mono>> prepareNotebook(@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}/resyncKeys") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> resyncKeys(@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); @@ -214,7 +217,7 @@ Mono> listOutboundNetworkDependenciesEndpoin @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( + Mono> listBySubscriptionNext( @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); @@ -222,25 +225,25 @@ Mono> listByResourceGroupNext( @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( + 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. + * Lists all the available machine learning workspaces under the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure 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 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.")); @@ -249,35 +252,31 @@ private Mono> getByResourceGroupWithResponseAsync(Strin return Mono.error(new IllegalArgumentException( "Parameter this.client.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.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. + * Lists all the available machine learning workspaces under the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure 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 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.")); @@ -286,82 +285,116 @@ private Mono> getByResourceGroupWithResponseAsync(Strin return Mono.error(new IllegalArgumentException( "Parameter this.client.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.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context); + return 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)); } /** - * Gets the properties of the specified machine learning workspace. + * Lists all the available machine learning workspaces under the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure 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 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. + * Lists all the available machine learning workspaces under the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @throws ManagementException 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. + * Lists all the available machine learning workspaces under the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @throws ManagementException 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.")); @@ -374,37 +407,33 @@ private Mono>> createOrUpdateWithResponseAsync(String 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)) + .withContext( + 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.")); @@ -417,173 +446,116 @@ private Mono>> createOrUpdateWithResponseAsync(String 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); - } - - /** - * 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(); + return 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)); } /** - * 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. @@ -610,8 +582,8 @@ 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, forceToPurge, 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())); } @@ -619,7 +591,7 @@ private Mono>> deleteWithResponseAsync(String resource * 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. @@ -647,15 +619,15 @@ private Mono>> deleteWithResponseAsync(String resource } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, workspaceName, forceToPurge, 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. @@ -674,7 +646,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * 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. @@ -692,7 +664,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * 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. @@ -714,7 +686,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * 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. @@ -730,7 +702,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * 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. @@ -748,7 +720,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * 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. @@ -762,78 +734,199 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, B } /** - * Deletes a machine learning workspace. + * 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. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String workspaceName) { + 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 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. + * @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, + 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 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) { + 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 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, Boolean forceToPurge, Context context) { + deleteAsync(resourceGroupName, workspaceName, forceToPurge, 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 along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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 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 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 properties of the specified machine learning workspace along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName) { - final Boolean forceToPurge = null; - return beginDeleteAsync(resourceGroupName, workspaceName, forceToPurge).last() - .flatMap(this.client::getLroFinalResultOrError); + 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 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); } /** - * 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 forceToPurge Flag to indicate delete is a purge request. - * @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 properties of the specified machine learning workspace on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, Boolean forceToPurge, - Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, forceToPurge, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono getByResourceGroupAsync(String resourceGroupName, String workspaceName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, workspaceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * 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 ManagementException 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 void delete(String resourceGroupName, String workspaceName) { - final Boolean forceToPurge = null; - deleteAsync(resourceGroupName, workspaceName, forceToPurge).block(); + public Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, + Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, workspaceName, context).block(); } /** - * 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 forceToPurge Flag to indicate delete is a purge request. - * @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 properties of the specified machine learning workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, Boolean forceToPurge, Context context) { - deleteAsync(resourceGroupName, workspaceName, forceToPurge, context).block(); + 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 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. @@ -842,7 +935,7 @@ public void delete(String resourceGroupName, String workspaceName, Boolean force */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, - WorkspaceUpdateParameters parameters) { + WorkspaceUpdateParameters body) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -858,15 +951,15 @@ private Mono>> updateWithResponseAsync(String resource 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())); } @@ -874,8 +967,8 @@ private Mono>> updateWithResponseAsync(String resource * 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. @@ -885,7 +978,7 @@ private Mono>> updateWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync(String resourceGroupName, String workspaceName, - WorkspaceUpdateParameters parameters, Context context) { + WorkspaceUpdateParameters body, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -901,23 +994,23 @@ private Mono>> updateWithResponseAsync(String resource 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. @@ -925,8 +1018,8 @@ private Mono>> updateWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkspaceInner> beginUpdateAsync(String resourceGroupName, - String workspaceName, WorkspaceUpdateParameters parameters) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, workspaceName, parameters); + String workspaceName, WorkspaceUpdateParameters body) { + Mono>> mono = updateWithResponseAsync(resourceGroupName, workspaceName, body); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkspaceInner.class, WorkspaceInner.class, this.client.getContext()); } @@ -935,8 +1028,8 @@ private PollerFlux, WorkspaceInner> beginUpdateAsync( * 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. @@ -945,10 +1038,10 @@ private PollerFlux, WorkspaceInner> beginUpdateAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, WorkspaceInner> beginUpdateAsync(String resourceGroupName, - String workspaceName, WorkspaceUpdateParameters parameters, Context context) { + String workspaceName, WorkspaceUpdateParameters body, Context context) { context = this.client.mergeContext(context); Mono>> mono - = updateWithResponseAsync(resourceGroupName, workspaceName, parameters, context); + = updateWithResponseAsync(resourceGroupName, workspaceName, body, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), WorkspaceInner.class, WorkspaceInner.class, context); } @@ -957,8 +1050,8 @@ private PollerFlux, WorkspaceInner> beginUpdateAsync( * 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. @@ -966,16 +1059,16 @@ private PollerFlux, WorkspaceInner> beginUpdateAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkspaceInner> beginUpdate(String resourceGroupName, - String workspaceName, WorkspaceUpdateParameters parameters) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, parameters).getSyncPoller(); + String workspaceName, WorkspaceUpdateParameters 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. @@ -984,16 +1077,16 @@ public SyncPoller, WorkspaceInner> beginUpdate(String */ @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(); + String workspaceName, WorkspaceUpdateParameters 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. @@ -1001,8 +1094,8 @@ public SyncPoller, WorkspaceInner> beginUpdate(String */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String workspaceName, - WorkspaceUpdateParameters parameters) { - return beginUpdateAsync(resourceGroupName, workspaceName, parameters).last() + WorkspaceUpdateParameters body) { + return beginUpdateAsync(resourceGroupName, workspaceName, body).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1010,8 +1103,8 @@ private Mono updateAsync(String resourceGroupName, String worksp * 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. @@ -1020,8 +1113,8 @@ private Mono updateAsync(String resourceGroupName, String worksp */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String workspaceName, - WorkspaceUpdateParameters parameters, Context context) { - return beginUpdateAsync(resourceGroupName, workspaceName, parameters, context).last() + WorkspaceUpdateParameters body, Context context) { + return beginUpdateAsync(resourceGroupName, workspaceName, body, context).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1029,24 +1122,24 @@ private Mono updateAsync(String resourceGroupName, String worksp * 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, WorkspaceUpdateParameters 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. @@ -1054,25 +1147,26 @@ 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, + public WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdateParameters body, Context context) { - return updateAsync(resourceGroupName, workspaceName, parameters, context).block(); + 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.")); @@ -1085,30 +1179,37 @@ private Mono> listByResourceGroupSinglePageAsync(S 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 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 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, Context context) { + 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.")); @@ -1121,103 +1222,173 @@ private Mono> listByResourceGroupSinglePageAsync(S 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 - .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)); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, this.client.getApiVersion(), body, accept, 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 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 as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} 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) + 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()); } /** - * 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 the result of a request to list machine learning workspaces as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of an object that represents a machine learning workspace. */ - @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.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); } /** - * 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 {@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 body) { + return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, body).getSyncPoller(); + } + + /** + * 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 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, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, skip, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @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 PagedIterable}. + * @return an object that represents a machine learning workspace on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - final String skip = null; - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, skip)); + @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 PagedIterable}. + * @return an object that represents a machine learning workspace on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, String skip, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, skip, 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); + } + + /** + * 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 an object that represents a machine learning workspace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner body) { + return createOrUpdateAsync(resourceGroupName, workspaceName, body).block(); + } + + /** + * 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. + */ + @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. @@ -1225,7 +1396,7 @@ public PagedIterable listByResourceGroup(String resourceGroupNam */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> diagnoseWithResponseAsync(String resourceGroupName, String workspaceName, - DiagnoseWorkspaceParameters parameters) { + DiagnoseWorkspaceParameters body) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1241,13 +1412,13 @@ private Mono>> diagnoseWithResponseAsync(String resour 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)) + resourceGroupName, workspaceName, this.client.getApiVersion(), body, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1255,8 +1426,8 @@ private Mono>> diagnoseWithResponseAsync(String resour * 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. @@ -1265,7 +1436,7 @@ private Mono>> diagnoseWithResponseAsync(String resour */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> diagnoseWithResponseAsync(String resourceGroupName, String workspaceName, - DiagnoseWorkspaceParameters parameters, Context context) { + DiagnoseWorkspaceParameters body, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -1281,21 +1452,21 @@ private Mono>> diagnoseWithResponseAsync(String resour 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); + 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. @@ -1303,8 +1474,8 @@ private Mono>> diagnoseWithResponseAsync(String resour */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DiagnoseResponseResultInner> - beginDiagnoseAsync(String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters) { - Mono>> mono = diagnoseWithResponseAsync(resourceGroupName, workspaceName, parameters); + 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()); @@ -1314,7 +1485,7 @@ private Mono>> diagnoseWithResponseAsync(String resour * 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. @@ -1323,8 +1494,8 @@ private Mono>> diagnoseWithResponseAsync(String resour @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DiagnoseResponseResultInner> beginDiagnoseAsync(String resourceGroupName, String workspaceName) { - final DiagnoseWorkspaceParameters parameters = null; - Mono>> mono = diagnoseWithResponseAsync(resourceGroupName, workspaceName, parameters); + 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()); @@ -1334,8 +1505,8 @@ private Mono>> diagnoseWithResponseAsync(String resour * 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. @@ -1344,10 +1515,10 @@ private Mono>> diagnoseWithResponseAsync(String resour */ @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); + = diagnoseWithResponseAsync(resourceGroupName, workspaceName, body, context); return this.client.getLroResult(mono, this.client.getHttpPipeline(), DiagnoseResponseResultInner.class, DiagnoseResponseResultInner.class, context); @@ -1357,7 +1528,7 @@ private PollerFlux, DiagnoseResponseResu * 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. @@ -1366,16 +1537,16 @@ private PollerFlux, DiagnoseResponseResu @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(); + 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. @@ -1384,16 +1555,16 @@ private PollerFlux, DiagnoseResponseResu */ @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. @@ -1401,8 +1572,8 @@ public SyncPoller, DiagnoseResponseResul */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono diagnoseAsync(String resourceGroupName, String workspaceName, - DiagnoseWorkspaceParameters parameters) { - return beginDiagnoseAsync(resourceGroupName, workspaceName, parameters).last() + DiagnoseWorkspaceParameters body) { + return beginDiagnoseAsync(resourceGroupName, workspaceName, body).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1410,7 +1581,7 @@ private Mono diagnoseAsync(String resourceGroupName * 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. @@ -1418,8 +1589,8 @@ private Mono diagnoseAsync(String resourceGroupName */ @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); } @@ -1427,8 +1598,8 @@ private Mono diagnoseAsync(String resourceGroupName * 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. @@ -1437,8 +1608,8 @@ private Mono diagnoseAsync(String resourceGroupName */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono diagnoseAsync(String resourceGroupName, String workspaceName, - DiagnoseWorkspaceParameters parameters, Context context) { - return beginDiagnoseAsync(resourceGroupName, workspaceName, parameters, context).last() + DiagnoseWorkspaceParameters body, Context context) { + return beginDiagnoseAsync(resourceGroupName, workspaceName, body, context).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1446,7 +1617,7 @@ private Mono diagnoseAsync(String resourceGroupName * 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. @@ -1454,16 +1625,16 @@ private Mono diagnoseAsync(String resourceGroupName */ @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. @@ -1472,8 +1643,8 @@ public DiagnoseResponseResultInner diagnose(String resourceGroupName, String wor */ @ServiceMethod(returns = ReturnType.SINGLE) public DiagnoseResponseResultInner diagnose(String resourceGroupName, String workspaceName, - DiagnoseWorkspaceParameters parameters, Context context) { - return diagnoseAsync(resourceGroupName, workspaceName, parameters, context).block(); + DiagnoseWorkspaceParameters body, Context context) { + return diagnoseAsync(resourceGroupName, workspaceName, body, context).block(); } /** @@ -1481,7 +1652,7 @@ public DiagnoseResponseResultInner diagnose(String resourceGroupName, String wor * 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. @@ -1507,8 +1678,8 @@ private Mono> listKeysWithResponseAsync(S } 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())); } @@ -1517,7 +1688,7 @@ private Mono> listKeysWithResponseAsync(S * 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. @@ -1544,8 +1715,8 @@ private Mono> listKeysWithResponseAsync(S } 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); } /** @@ -1553,7 +1724,7 @@ private Mono> listKeysWithResponseAsync(S * 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. @@ -1570,7 +1741,7 @@ private Mono listKeysAsync(String resourceGroupNam * 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. @@ -1588,7 +1759,7 @@ public Response listKeysWithResponse(String resour * 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. @@ -1600,19 +1771,19 @@ 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.")); @@ -1630,26 +1801,27 @@ private Mono>> resyncKeysWithResponseAsync(String reso } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.resyncKeys(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) + .withContext( + 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.")); @@ -1667,161 +1839,190 @@ private Mono>> resyncKeysWithResponseAsync(String reso } 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. + * Lists keys of Azure Machine Learning Workspace's storage account. * - * @param skip Continuation token for pagination. + * @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.")); @@ -1830,28 +2031,35 @@ private Mono> listSinglePageAsync(String skip) { return Mono.error(new IllegalArgumentException( "Parameter this.client.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.getApiVersion(), - this.client.getSubscriptionId(), skip, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext( + 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. + * Lists keys of Azure Machine Learning Workspace's storage account. * - * @param skip Continuation token for pagination. + * @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.")); @@ -1860,103 +2068,81 @@ private Mono> listSinglePageAsync(String skip, Con return Mono.error(new IllegalArgumentException( "Parameter this.client.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.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. + * Lists keys of Azure Machine Learning Workspace's storage account. * - * @param skip Continuation token for pagination. + * @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. + * Lists keys of Azure Machine Learning Workspace's storage account. * - * @param skip Continuation token for pagination. + * @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. + * Lists keys of Azure Machine Learning Workspace's storage account. * - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @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.")); @@ -1974,17 +2160,17 @@ public PagedIterable list(String skip, Context context) { } 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. @@ -1992,8 +2178,8 @@ public PagedIterable list(String skip, Context context) { * @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, Context context) { + 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.")); @@ -2011,32 +2197,33 @@ public PagedIterable list(String skip, Context context) { } 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, + private Mono listOutboundNetworkDependenciesEndpointsAsync(String resourceGroupName, String workspaceName) { - return listNotebookAccessTokenWithResponseAsync(resourceGroupName, 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. @@ -2044,31 +2231,34 @@ private Mono listNotebookAccessTokenAsync(String * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listNotebookAccessTokenWithResponse(String resourceGroupName, - String workspaceName, Context context) { - return listNotebookAccessTokenWithResponseAsync(resourceGroupName, workspaceName, context).block(); + public Response listOutboundNetworkDependenciesEndpointsWithResponse( + String resourceGroupName, String workspaceName, Context context) { + 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. @@ -2094,16 +2284,16 @@ private Mono>> prepareNotebookWithResponseAsync(String } 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. @@ -2130,15 +2320,15 @@ private Mono>> prepareNotebookWithResponseAsync(String } 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. @@ -2154,10 +2344,10 @@ private Mono>> prepareNotebookWithResponseAsync(String } /** - * 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. @@ -2169,241 +2359,122 @@ private Mono>> prepareNotebookWithResponseAsync(String 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); - } - - /** - * Prepare 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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NotebookResourceInfoInner> - beginPrepareNotebook(String resourceGroupName, String workspaceName) { - return this.beginPrepareNotebookAsync(resourceGroupName, workspaceName).getSyncPoller(); - } - - /** - * Prepare a 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked 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, Context context) { - return this.beginPrepareNotebookAsync(resourceGroupName, workspaceName, context).getSyncPoller(); - } - - /** - * Prepare 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 body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono prepareNotebookAsync(String resourceGroupName, String workspaceName) { - return beginPrepareNotebookAsync(resourceGroupName, workspaceName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Prepare a 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if 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 prepareNotebookAsync(String resourceGroupName, String workspaceName, - Context context) { - return beginPrepareNotebookAsync(resourceGroupName, workspaceName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + = 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 response. + * @return the {@link SyncPoller} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NotebookResourceInfoInner prepareNotebook(String resourceGroupName, String workspaceName) { - return prepareNotebookAsync(resourceGroupName, workspaceName).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + 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. * @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 NotebookResourceInfoInner prepareNotebook(String resourceGroupName, String workspaceName, Context context) { - return prepareNotebookAsync(resourceGroupName, workspaceName, context).block(); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, NotebookResourceInfoInner> + beginPrepareNotebook(String resourceGroupName, String workspaceName, Context context) { + return this.beginPrepareNotebookAsync(resourceGroupName, workspaceName, context).getSyncPoller(); } /** - * List storage account keys of a workspace. + * 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}. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - 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.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.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.listStorageAccountKeys(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono prepareNotebookAsync(String resourceGroupName, String workspaceName) { + return beginPrepareNotebookAsync(resourceGroupName, workspaceName).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * List storage account keys of a workspace. + * 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. * @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> - 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.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.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.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())); + private Mono prepareNotebookAsync(String resourceGroupName, String workspaceName, + Context context) { + return beginPrepareNotebookAsync(resourceGroupName, workspaceName, context).last() + .flatMap(this.client::getLroFinalResultOrError); } /** - * List storage account keys of a workspace. + * 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 ManagementException thrown if 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listStorageAccountKeysWithResponse(String resourceGroupName, - String workspaceName, Context context) { - return listStorageAccountKeysWithResponseAsync(resourceGroupName, workspaceName, context).block(); + public NotebookResourceInfoInner prepareNotebook(String resourceGroupName, String workspaceName) { + return prepareNotebookAsync(resourceGroupName, workspaceName).block(); } /** - * List storage account keys of a workspace. + * 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. * @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(); + public NotebookResourceInfoInner prepareNotebook(String resourceGroupName, String workspaceName, Context context) { + return prepareNotebookAsync(resourceGroupName, workspaceName, context).block(); } /** - * 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 Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNotebookKeysWithResponseAsync(String resourceGroupName, + private Mono>> resyncKeysWithResponseAsync(String resourceGroupName, String workspaceName) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -2422,25 +2493,26 @@ private Mono> listNotebookKeysWithResponse } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listNotebookKeys(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 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 Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNotebookKeysWithResponseAsync(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.")); @@ -2458,180 +2530,147 @@ private Mono> listNotebookKeysWithResponse } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listNotebookKeys(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context); + return service.resyncKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + workspaceName, this.client.getApiVersion(), accept, 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 PollerFlux} 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) + 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}. + * @return the {@link PollerFlux} for polling of long-running operation. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listNotebookKeysWithResponse(String resourceGroupName, - String workspaceName, Context context) { - return listNotebookKeysWithResponseAsync(resourceGroupName, workspaceName, context).block(); + @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); } /** - * 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. + * @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) { + return this.beginResyncKeysAsync(resourceGroupName, workspaceName).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. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if 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 SyncPoller} for polling of long-running operation. */ - @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())); + @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 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 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) { + 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 on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listOutboundNetworkDependenciesEndpointsAsync(String resourceGroupName, - String workspaceName) { - return listOutboundNetworkDependenciesEndpointsWithResponseAsync(resourceGroupName, workspaceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + 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 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 body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listOutboundNetworkDependenciesEndpointsWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return listOutboundNetworkDependenciesEndpointsWithResponseAsync(resourceGroupName, workspaceName, context) - .block(); + 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. */ @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(); } /** @@ -2645,7 +2684,7 @@ public ExternalFqdnResponseInner listOutboundNetworkDependenciesEndpoints(String * 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.")); } @@ -2656,7 +2695,7 @@ private Mono> listByResourceGroupNextSinglePageAsy final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + 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())); @@ -2674,7 +2713,7 @@ private Mono> listByResourceGroupNextSinglePageAsy * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -2685,7 +2724,7 @@ private Mono> listByResourceGroupNextSinglePageAsy } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, 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)); } @@ -2701,7 +2740,7 @@ private Mono> listByResourceGroupNextSinglePageAsy * 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.")); } @@ -2712,7 +2751,7 @@ private Mono> listBySubscriptionNextSinglePageAsyn final String accept = "application/json"; return FluxUtil .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + 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())); @@ -2730,7 +2769,7 @@ private Mono> listBySubscriptionNextSinglePageAsyn * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); @@ -2741,7 +2780,7 @@ private Mono> listBySubscriptionNextSinglePageAsyn } final String accept = "application/json"; context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, 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)); } 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 380278379945f..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 @@ -42,6 +42,36 @@ public WorkspacesImpl(WorkspacesClient innerClient, this.serviceManager = serviceManager; } + 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 @@ -63,25 +93,6 @@ public Workspace getByResourceGroup(String resourceGroupName, String workspaceNa } } - 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 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 skip, Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, skip, context); - return ResourceManagerUtils.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) { @@ -92,9 +103,9 @@ public DiagnoseResponseResult diagnose(String resourceGroupName, String workspac } public DiagnoseResponseResult diagnose(String resourceGroupName, String workspaceName, - DiagnoseWorkspaceParameters parameters, Context context) { + DiagnoseWorkspaceParameters body, Context context) { DiagnoseResponseResultInner inner - = this.serviceClient().diagnose(resourceGroupName, workspaceName, parameters, context); + = this.serviceClient().diagnose(resourceGroupName, workspaceName, body, context); if (inner != null) { return new DiagnoseResponseResultImpl(inner, this.manager()); } else { @@ -123,24 +134,6 @@ 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 ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); - } - - public PagedIterable list(String skip, Context context) { - PagedIterable inner = this.serviceClient().list(skip, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); - } - public Response listNotebookAccessTokenWithResponse(String resourceGroupName, String workspaceName, Context context) { Response inner @@ -163,20 +156,22 @@ 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; } @@ -204,50 +199,56 @@ 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())); + 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 = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { 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 index b9a569dc66e59..7819e2764f518 100644 --- 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 @@ -25,16 +25,6 @@ public final class AadAuthTypeWorkspaceConnectionProperties extends WorkspaceCon */ private ConnectionAuthType authType = ConnectionAuthType.AAD; - /* - * The createdByWorkspaceArmId property. - */ - private String createdByWorkspaceArmId; - - /* - * Group based on connection category - */ - private ConnectionGroup group; - /** * Creates an instance of AadAuthTypeWorkspaceConnectionProperties class. */ @@ -52,31 +42,29 @@ public ConnectionAuthType authType() { } /** - * Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. - * - * @return the createdByWorkspaceArmId value. + * {@inheritDoc} */ @Override - public String createdByWorkspaceArmId() { - return this.createdByWorkspaceArmId; + public AadAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { + super.withCategory(category); + return this; } /** - * Get the group property: Group based on connection category. - * - * @return the group value. + * {@inheritDoc} */ @Override - public ConnectionGroup group() { - return this.group; + public AadAuthTypeWorkspaceConnectionProperties withError(String error) { + super.withError(error); + return this; } /** * {@inheritDoc} */ @Override - public AadAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); + public AadAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { + super.withExpiryTime(expiryTime); return this; } @@ -84,8 +72,8 @@ public AadAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory * {@inheritDoc} */ @Override - public AadAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { - super.withExpiryTime(expiryTime); + public AadAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { + super.withIsSharedToAll(isSharedToAll); return this; } @@ -93,8 +81,8 @@ public AadAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime ex * {@inheritDoc} */ @Override - public AadAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { - super.withIsSharedToAll(isSharedToAll); + public AadAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { + super.withMetadata(metadata); return this; } @@ -102,8 +90,8 @@ public AadAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isShar * {@inheritDoc} */ @Override - public AadAuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); + public AadAuthTypeWorkspaceConnectionProperties withPeRequirement(ManagedPERequirement peRequirement) { + super.withPeRequirement(peRequirement); return this; } @@ -111,8 +99,8 @@ public AadAuthTypeWorkspaceConnectionProperties withTarget(String target) { * {@inheritDoc} */ @Override - public AadAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { - super.withMetadata(metadata); + public AadAuthTypeWorkspaceConnectionProperties withPeStatus(ManagedPEStatus peStatus) { + super.withPeStatus(peStatus); return this; } @@ -129,8 +117,8 @@ public AadAuthTypeWorkspaceConnectionProperties withSharedUserList(List * {@inheritDoc} */ @Override - public AadAuthTypeWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); + public AadAuthTypeWorkspaceConnectionProperties withTarget(String target) { + super.withTarget(target); return this; } @@ -138,8 +126,9 @@ public AadAuthTypeWorkspaceConnectionProperties withValue(String value) { * {@inheritDoc} */ @Override - public AadAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); + public AadAuthTypeWorkspaceConnectionProperties + withUseWorkspaceManagedIdentity(Boolean useWorkspaceManagedIdentity) { + super.withUseWorkspaceManagedIdentity(useWorkspaceManagedIdentity); return this; } @@ -150,7 +139,6 @@ public AadAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valu */ @Override public void validate() { - super.validate(); } /** @@ -160,15 +148,17 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("category", category() == null ? null : category().toString()); + jsonWriter.writeStringField("error", error()); jsonWriter.writeStringField("expiryTime", expiryTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(expiryTime())); jsonWriter.writeBooleanField("isSharedToAll", isSharedToAll()); - jsonWriter.writeStringField("target", target()); jsonWriter.writeMapField("metadata", metadata(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("peRequirement", peRequirement() == null ? null : peRequirement().toString()); + jsonWriter.writeStringField("peStatus", peStatus() == null ? null : peStatus().toString()); jsonWriter.writeArrayField("sharedUserList", sharedUserList(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", value()); - jsonWriter.writeStringField("valueFormat", valueFormat() == null ? null : valueFormat().toString()); + jsonWriter.writeStringField("target", target()); + jsonWriter.writeBooleanField("useWorkspaceManagedIdentity", useWorkspaceManagedIdentity()); jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); return jsonWriter.writeEndObject(); } @@ -193,29 +183,36 @@ public static AadAuthTypeWorkspaceConnectionProperties fromJson(JsonReader jsonR deserializedAadAuthTypeWorkspaceConnectionProperties .withCategory(ConnectionCategory.fromString(reader.getString())); } else if ("createdByWorkspaceArmId".equals(fieldName)) { - deserializedAadAuthTypeWorkspaceConnectionProperties.createdByWorkspaceArmId = reader.getString(); + deserializedAadAuthTypeWorkspaceConnectionProperties + .withCreatedByWorkspaceArmId(reader.getString()); + } else if ("error".equals(fieldName)) { + deserializedAadAuthTypeWorkspaceConnectionProperties.withError(reader.getString()); } else if ("expiryTime".equals(fieldName)) { deserializedAadAuthTypeWorkspaceConnectionProperties.withExpiryTime(reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("group".equals(fieldName)) { - deserializedAadAuthTypeWorkspaceConnectionProperties.group - = ConnectionGroup.fromString(reader.getString()); + deserializedAadAuthTypeWorkspaceConnectionProperties + .withGroup(ConnectionGroup.fromString(reader.getString())); } else if ("isSharedToAll".equals(fieldName)) { deserializedAadAuthTypeWorkspaceConnectionProperties .withIsSharedToAll(reader.getNullable(JsonReader::getBoolean)); - } else if ("target".equals(fieldName)) { - deserializedAadAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); } else if ("metadata".equals(fieldName)) { Map metadata = reader.readMap(reader1 -> reader1.getString()); deserializedAadAuthTypeWorkspaceConnectionProperties.withMetadata(metadata); + } else if ("peRequirement".equals(fieldName)) { + deserializedAadAuthTypeWorkspaceConnectionProperties + .withPeRequirement(ManagedPERequirement.fromString(reader.getString())); + } else if ("peStatus".equals(fieldName)) { + deserializedAadAuthTypeWorkspaceConnectionProperties + .withPeStatus(ManagedPEStatus.fromString(reader.getString())); } else if ("sharedUserList".equals(fieldName)) { List sharedUserList = reader.readArray(reader1 -> reader1.getString()); deserializedAadAuthTypeWorkspaceConnectionProperties.withSharedUserList(sharedUserList); - } else if ("value".equals(fieldName)) { - deserializedAadAuthTypeWorkspaceConnectionProperties.withValue(reader.getString()); - } else if ("valueFormat".equals(fieldName)) { + } else if ("target".equals(fieldName)) { + deserializedAadAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); + } else if ("useWorkspaceManagedIdentity".equals(fieldName)) { deserializedAadAuthTypeWorkspaceConnectionProperties - .withValueFormat(ValueFormat.fromString(reader.getString())); + .withUseWorkspaceManagedIdentity(reader.getNullable(JsonReader::getBoolean)); } else if ("authType".equals(fieldName)) { deserializedAadAuthTypeWorkspaceConnectionProperties.authType = ConnectionAuthType.fromString(reader.getString()); 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 index 7e2fcbcf6ffb3..fea4578bf1627 100644 --- 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 @@ -30,16 +30,6 @@ public final class AccessKeyAuthTypeWorkspaceConnectionProperties extends Worksp */ private WorkspaceConnectionAccessKey credentials; - /* - * The createdByWorkspaceArmId property. - */ - private String createdByWorkspaceArmId; - - /* - * Group based on connection category - */ - private ConnectionGroup group; - /** * Creates an instance of AccessKeyAuthTypeWorkspaceConnectionProperties class. */ @@ -77,31 +67,29 @@ public AccessKeyAuthTypeWorkspaceConnectionProperties withCredentials(WorkspaceC } /** - * Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. - * - * @return the createdByWorkspaceArmId value. + * {@inheritDoc} */ @Override - public String createdByWorkspaceArmId() { - return this.createdByWorkspaceArmId; + public AccessKeyAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { + super.withCategory(category); + return this; } /** - * Get the group property: Group based on connection category. - * - * @return the group value. + * {@inheritDoc} */ @Override - public ConnectionGroup group() { - return this.group; + public AccessKeyAuthTypeWorkspaceConnectionProperties withError(String error) { + super.withError(error); + return this; } /** * {@inheritDoc} */ @Override - public AccessKeyAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); + public AccessKeyAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { + super.withExpiryTime(expiryTime); return this; } @@ -109,8 +97,8 @@ public AccessKeyAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCat * {@inheritDoc} */ @Override - public AccessKeyAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { - super.withExpiryTime(expiryTime); + public AccessKeyAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { + super.withIsSharedToAll(isSharedToAll); return this; } @@ -118,8 +106,8 @@ public AccessKeyAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateT * {@inheritDoc} */ @Override - public AccessKeyAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { - super.withIsSharedToAll(isSharedToAll); + public AccessKeyAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { + super.withMetadata(metadata); return this; } @@ -127,8 +115,8 @@ public AccessKeyAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean * {@inheritDoc} */ @Override - public AccessKeyAuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); + public AccessKeyAuthTypeWorkspaceConnectionProperties withPeRequirement(ManagedPERequirement peRequirement) { + super.withPeRequirement(peRequirement); return this; } @@ -136,8 +124,8 @@ public AccessKeyAuthTypeWorkspaceConnectionProperties withTarget(String target) * {@inheritDoc} */ @Override - public AccessKeyAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { - super.withMetadata(metadata); + public AccessKeyAuthTypeWorkspaceConnectionProperties withPeStatus(ManagedPEStatus peStatus) { + super.withPeStatus(peStatus); return this; } @@ -154,8 +142,8 @@ public AccessKeyAuthTypeWorkspaceConnectionProperties withSharedUserList(List writer.writeString(element)); + jsonWriter.writeStringField("peRequirement", peRequirement() == null ? null : peRequirement().toString()); + jsonWriter.writeStringField("peStatus", peStatus() == null ? null : peStatus().toString()); jsonWriter.writeArrayField("sharedUserList", sharedUserList(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", value()); - jsonWriter.writeStringField("valueFormat", valueFormat() == null ? null : valueFormat().toString()); + jsonWriter.writeStringField("target", target()); + jsonWriter.writeBooleanField("useWorkspaceManagedIdentity", useWorkspaceManagedIdentity()); jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); jsonWriter.writeJsonField("credentials", this.credentials); return jsonWriter.writeEndObject(); @@ -222,30 +212,36 @@ public static AccessKeyAuthTypeWorkspaceConnectionProperties fromJson(JsonReader deserializedAccessKeyAuthTypeWorkspaceConnectionProperties .withCategory(ConnectionCategory.fromString(reader.getString())); } else if ("createdByWorkspaceArmId".equals(fieldName)) { - deserializedAccessKeyAuthTypeWorkspaceConnectionProperties.createdByWorkspaceArmId - = reader.getString(); + deserializedAccessKeyAuthTypeWorkspaceConnectionProperties + .withCreatedByWorkspaceArmId(reader.getString()); + } else if ("error".equals(fieldName)) { + deserializedAccessKeyAuthTypeWorkspaceConnectionProperties.withError(reader.getString()); } else if ("expiryTime".equals(fieldName)) { deserializedAccessKeyAuthTypeWorkspaceConnectionProperties.withExpiryTime(reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("group".equals(fieldName)) { - deserializedAccessKeyAuthTypeWorkspaceConnectionProperties.group - = ConnectionGroup.fromString(reader.getString()); + deserializedAccessKeyAuthTypeWorkspaceConnectionProperties + .withGroup(ConnectionGroup.fromString(reader.getString())); } else if ("isSharedToAll".equals(fieldName)) { deserializedAccessKeyAuthTypeWorkspaceConnectionProperties .withIsSharedToAll(reader.getNullable(JsonReader::getBoolean)); - } else if ("target".equals(fieldName)) { - deserializedAccessKeyAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); } else if ("metadata".equals(fieldName)) { Map metadata = reader.readMap(reader1 -> reader1.getString()); deserializedAccessKeyAuthTypeWorkspaceConnectionProperties.withMetadata(metadata); + } else if ("peRequirement".equals(fieldName)) { + deserializedAccessKeyAuthTypeWorkspaceConnectionProperties + .withPeRequirement(ManagedPERequirement.fromString(reader.getString())); + } else if ("peStatus".equals(fieldName)) { + deserializedAccessKeyAuthTypeWorkspaceConnectionProperties + .withPeStatus(ManagedPEStatus.fromString(reader.getString())); } else if ("sharedUserList".equals(fieldName)) { List sharedUserList = reader.readArray(reader1 -> reader1.getString()); deserializedAccessKeyAuthTypeWorkspaceConnectionProperties.withSharedUserList(sharedUserList); - } else if ("value".equals(fieldName)) { - deserializedAccessKeyAuthTypeWorkspaceConnectionProperties.withValue(reader.getString()); - } else if ("valueFormat".equals(fieldName)) { + } else if ("target".equals(fieldName)) { + deserializedAccessKeyAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); + } else if ("useWorkspaceManagedIdentity".equals(fieldName)) { deserializedAccessKeyAuthTypeWorkspaceConnectionProperties - .withValueFormat(ValueFormat.fromString(reader.getString())); + .withUseWorkspaceManagedIdentity(reader.getNullable(JsonReader::getBoolean)); } else if ("authType".equals(fieldName)) { deserializedAccessKeyAuthTypeWorkspaceConnectionProperties.authType = ConnectionAuthType.fromString(reader.getString()); 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 index 47bc7db396dd6..f95d4d6a044c7 100644 --- 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 @@ -26,20 +26,10 @@ public final class AccountKeyAuthTypeWorkspaceConnectionProperties extends Works private ConnectionAuthType authType = ConnectionAuthType.ACCOUNT_KEY; /* - * The credentials property. + * Account key object for workspace connection credential. */ private WorkspaceConnectionAccountKey credentials; - /* - * The createdByWorkspaceArmId property. - */ - private String createdByWorkspaceArmId; - - /* - * Group based on connection category - */ - private ConnectionGroup group; - /** * Creates an instance of AccountKeyAuthTypeWorkspaceConnectionProperties class. */ @@ -57,7 +47,7 @@ public ConnectionAuthType authType() { } /** - * Get the credentials property: The credentials property. + * Get the credentials property: Account key object for workspace connection credential. * * @return the credentials value. */ @@ -66,7 +56,7 @@ public WorkspaceConnectionAccountKey credentials() { } /** - * Set the credentials property: The credentials property. + * Set the credentials property: Account key object for workspace connection credential. * * @param credentials the credentials value to set. * @return the AccountKeyAuthTypeWorkspaceConnectionProperties object itself. @@ -77,31 +67,29 @@ public AccountKeyAuthTypeWorkspaceConnectionProperties withCredentials(Workspace } /** - * Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. - * - * @return the createdByWorkspaceArmId value. + * {@inheritDoc} */ @Override - public String createdByWorkspaceArmId() { - return this.createdByWorkspaceArmId; + public AccountKeyAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { + super.withCategory(category); + return this; } /** - * Get the group property: Group based on connection category. - * - * @return the group value. + * {@inheritDoc} */ @Override - public ConnectionGroup group() { - return this.group; + public AccountKeyAuthTypeWorkspaceConnectionProperties withError(String error) { + super.withError(error); + return this; } /** * {@inheritDoc} */ @Override - public AccountKeyAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); + public AccountKeyAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { + super.withExpiryTime(expiryTime); return this; } @@ -109,8 +97,8 @@ public AccountKeyAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCa * {@inheritDoc} */ @Override - public AccountKeyAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { - super.withExpiryTime(expiryTime); + public AccountKeyAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { + super.withIsSharedToAll(isSharedToAll); return this; } @@ -118,8 +106,8 @@ public AccountKeyAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDate * {@inheritDoc} */ @Override - public AccountKeyAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { - super.withIsSharedToAll(isSharedToAll); + public AccountKeyAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { + super.withMetadata(metadata); return this; } @@ -127,8 +115,8 @@ public AccountKeyAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean * {@inheritDoc} */ @Override - public AccountKeyAuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); + public AccountKeyAuthTypeWorkspaceConnectionProperties withPeRequirement(ManagedPERequirement peRequirement) { + super.withPeRequirement(peRequirement); return this; } @@ -136,8 +124,8 @@ public AccountKeyAuthTypeWorkspaceConnectionProperties withTarget(String target) * {@inheritDoc} */ @Override - public AccountKeyAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { - super.withMetadata(metadata); + public AccountKeyAuthTypeWorkspaceConnectionProperties withPeStatus(ManagedPEStatus peStatus) { + super.withPeStatus(peStatus); return this; } @@ -154,8 +142,8 @@ public AccountKeyAuthTypeWorkspaceConnectionProperties withSharedUserList(List writer.writeString(element)); + jsonWriter.writeStringField("peRequirement", peRequirement() == null ? null : peRequirement().toString()); + jsonWriter.writeStringField("peStatus", peStatus() == null ? null : peStatus().toString()); jsonWriter.writeArrayField("sharedUserList", sharedUserList(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", value()); - jsonWriter.writeStringField("valueFormat", valueFormat() == null ? null : valueFormat().toString()); + jsonWriter.writeStringField("target", target()); + jsonWriter.writeBooleanField("useWorkspaceManagedIdentity", useWorkspaceManagedIdentity()); jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); jsonWriter.writeJsonField("credentials", this.credentials); return jsonWriter.writeEndObject(); @@ -222,30 +212,36 @@ public static AccountKeyAuthTypeWorkspaceConnectionProperties fromJson(JsonReade deserializedAccountKeyAuthTypeWorkspaceConnectionProperties .withCategory(ConnectionCategory.fromString(reader.getString())); } else if ("createdByWorkspaceArmId".equals(fieldName)) { - deserializedAccountKeyAuthTypeWorkspaceConnectionProperties.createdByWorkspaceArmId - = reader.getString(); + deserializedAccountKeyAuthTypeWorkspaceConnectionProperties + .withCreatedByWorkspaceArmId(reader.getString()); + } else if ("error".equals(fieldName)) { + deserializedAccountKeyAuthTypeWorkspaceConnectionProperties.withError(reader.getString()); } else if ("expiryTime".equals(fieldName)) { deserializedAccountKeyAuthTypeWorkspaceConnectionProperties.withExpiryTime(reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("group".equals(fieldName)) { - deserializedAccountKeyAuthTypeWorkspaceConnectionProperties.group - = ConnectionGroup.fromString(reader.getString()); + deserializedAccountKeyAuthTypeWorkspaceConnectionProperties + .withGroup(ConnectionGroup.fromString(reader.getString())); } else if ("isSharedToAll".equals(fieldName)) { deserializedAccountKeyAuthTypeWorkspaceConnectionProperties .withIsSharedToAll(reader.getNullable(JsonReader::getBoolean)); - } else if ("target".equals(fieldName)) { - deserializedAccountKeyAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); } else if ("metadata".equals(fieldName)) { Map metadata = reader.readMap(reader1 -> reader1.getString()); deserializedAccountKeyAuthTypeWorkspaceConnectionProperties.withMetadata(metadata); + } else if ("peRequirement".equals(fieldName)) { + deserializedAccountKeyAuthTypeWorkspaceConnectionProperties + .withPeRequirement(ManagedPERequirement.fromString(reader.getString())); + } else if ("peStatus".equals(fieldName)) { + deserializedAccountKeyAuthTypeWorkspaceConnectionProperties + .withPeStatus(ManagedPEStatus.fromString(reader.getString())); } else if ("sharedUserList".equals(fieldName)) { List sharedUserList = reader.readArray(reader1 -> reader1.getString()); deserializedAccountKeyAuthTypeWorkspaceConnectionProperties.withSharedUserList(sharedUserList); - } else if ("value".equals(fieldName)) { - deserializedAccountKeyAuthTypeWorkspaceConnectionProperties.withValue(reader.getString()); - } else if ("valueFormat".equals(fieldName)) { + } else if ("target".equals(fieldName)) { + deserializedAccountKeyAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); + } else if ("useWorkspaceManagedIdentity".equals(fieldName)) { deserializedAccountKeyAuthTypeWorkspaceConnectionProperties - .withValueFormat(ValueFormat.fromString(reader.getString())); + .withUseWorkspaceManagedIdentity(reader.getNullable(JsonReader::getBoolean)); } else if ("authType".equals(fieldName)) { deserializedAccountKeyAuthTypeWorkspaceConnectionProperties.authType = ConnectionAuthType.fromString(reader.getString()); 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 765b496c3b61c..49ad2b2f603f4 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 @@ -69,7 +69,6 @@ public AccountKeyDatastoreCredentials withSecrets(AccountKeyDatastoreSecrets sec */ @Override public void validate() { - super.validate(); if (secrets() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( 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 f1920d6966646..75844e5c3aaec 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 @@ -69,7 +69,6 @@ public AccountKeyDatastoreSecrets withKey(String key) { */ @Override public void validate() { - super.validate(); } /** 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..d891178f85dd1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ActualCapacityInfo.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.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The ActualCapacityInfo model. + */ +@Fluent +public final class ActualCapacityInfo implements JsonSerializable { + /* + * Gets or sets the total number of instances (scale units) regardless of provisioning state or whether current + * group payload version matches the target group payload. + */ + private Integer total; + + /* + * Gets or sets the number of instances (scale units) which have Succeeded provisioning state and target group + * payload. + */ + private Integer succeeded; + + /* + * Gets or sets the number of instances (scale units) which have Failed provisioning state and have target group + * payload. + */ + private Integer failed; + + /* + * Gets or sets the number of instances (scale units) which have Succeeded provisioning state but do not have target + * group payload. + */ + private Integer outdatedSucceeded; + + /* + * Gets or sets the number of instances (scale units) which have Failed provisioning state but do not have target + * group payload. + */ + private Integer outdatedFailed; + + /** + * Creates an instance of ActualCapacityInfo class. + */ + public ActualCapacityInfo() { + } + + /** + * Get the total property: Gets or sets the total number of instances (scale units) regardless of provisioning state + * or whether current group payload version matches the target group payload. + * + * @return the total value. + */ + public Integer total() { + return this.total; + } + + /** + * Set the total property: Gets or sets the total number of instances (scale units) regardless of provisioning state + * or whether current group payload version matches the target group payload. + * + * @param total the total value to set. + * @return the ActualCapacityInfo object itself. + */ + public ActualCapacityInfo withTotal(Integer total) { + this.total = total; + return this; + } + + /** + * Get the succeeded property: Gets or sets the number of instances (scale units) which have Succeeded provisioning + * state and target group payload. + * + * @return the succeeded value. + */ + public Integer succeeded() { + return this.succeeded; + } + + /** + * Set the succeeded property: Gets or sets the number of instances (scale units) which have Succeeded provisioning + * state and target group payload. + * + * @param succeeded the succeeded value to set. + * @return the ActualCapacityInfo object itself. + */ + public ActualCapacityInfo withSucceeded(Integer succeeded) { + this.succeeded = succeeded; + return this; + } + + /** + * Get the failed property: Gets or sets the number of instances (scale units) which have Failed provisioning state + * and have target group payload. + * + * @return the failed value. + */ + public Integer failed() { + return this.failed; + } + + /** + * Set the failed property: Gets or sets the number of instances (scale units) which have Failed provisioning state + * and have target group payload. + * + * @param failed the failed value to set. + * @return the ActualCapacityInfo object itself. + */ + public ActualCapacityInfo withFailed(Integer failed) { + this.failed = failed; + return this; + } + + /** + * Get the outdatedSucceeded property: Gets or sets the number of instances (scale units) which have Succeeded + * provisioning state but do not have target group payload. + * + * @return the outdatedSucceeded value. + */ + public Integer outdatedSucceeded() { + return this.outdatedSucceeded; + } + + /** + * Set the outdatedSucceeded property: Gets or sets the number of instances (scale units) which have Succeeded + * provisioning state but do not have target group payload. + * + * @param outdatedSucceeded the outdatedSucceeded value to set. + * @return the ActualCapacityInfo object itself. + */ + public ActualCapacityInfo withOutdatedSucceeded(Integer outdatedSucceeded) { + this.outdatedSucceeded = outdatedSucceeded; + return this; + } + + /** + * Get the outdatedFailed property: Gets or sets the number of instances (scale units) which have Failed + * provisioning state but do not have target group payload. + * + * @return the outdatedFailed value. + */ + public Integer outdatedFailed() { + return this.outdatedFailed; + } + + /** + * Set the outdatedFailed property: Gets or sets the number of instances (scale units) which have Failed + * provisioning state but do not have target group payload. + * + * @param outdatedFailed the outdatedFailed value to set. + * @return the ActualCapacityInfo object itself. + */ + public ActualCapacityInfo withOutdatedFailed(Integer outdatedFailed) { + this.outdatedFailed = outdatedFailed; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("total", this.total); + jsonWriter.writeNumberField("succeeded", this.succeeded); + jsonWriter.writeNumberField("failed", this.failed); + jsonWriter.writeNumberField("outdatedSucceeded", this.outdatedSucceeded); + jsonWriter.writeNumberField("outdatedFailed", this.outdatedFailed); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ActualCapacityInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ActualCapacityInfo if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ActualCapacityInfo. + */ + public static ActualCapacityInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ActualCapacityInfo deserializedActualCapacityInfo = new ActualCapacityInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("total".equals(fieldName)) { + deserializedActualCapacityInfo.total = reader.getNullable(JsonReader::getInt); + } else if ("succeeded".equals(fieldName)) { + deserializedActualCapacityInfo.succeeded = reader.getNullable(JsonReader::getInt); + } else if ("failed".equals(fieldName)) { + deserializedActualCapacityInfo.failed = reader.getNullable(JsonReader::getInt); + } else if ("outdatedSucceeded".equals(fieldName)) { + deserializedActualCapacityInfo.outdatedSucceeded = reader.getNullable(JsonReader::getInt); + } else if ("outdatedFailed".equals(fieldName)) { + deserializedActualCapacityInfo.outdatedFailed = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedActualCapacityInfo; + }); + } +} 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 76d48c600bfe4..ca1467eb6c076 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 @@ -11,7 +11,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.time.OffsetDateTime; import java.util.List; /** @@ -29,32 +28,6 @@ public final class Aks extends Compute { */ private AksSchemaProperties properties; - /* - * The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - */ - private ProvisioningState provisioningState; - - /* - * The time at which the compute was created. - */ - private OffsetDateTime createdOn; - - /* - * The time at which the compute was last modified. - */ - private OffsetDateTime modifiedOn; - - /* - * Errors during provisioning - */ - private List provisioningErrors; - - /* - * Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning - * service provisioned it if false. - */ - private Boolean isAttachedCompute; - /** * Creates an instance of Aks class. */ @@ -91,58 +64,6 @@ public Aks withProperties(AksSchemaProperties properties) { return this; } - /** - * Get the provisioningState property: The provision state of the cluster. Valid values are Unknown, Updating, - * Provisioning, Succeeded, and Failed. - * - * @return the provisioningState value. - */ - @Override - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the createdOn property: The time at which the compute was created. - * - * @return the createdOn value. - */ - @Override - public OffsetDateTime createdOn() { - return this.createdOn; - } - - /** - * Get the modifiedOn property: The time at which the compute was last modified. - * - * @return the modifiedOn value. - */ - @Override - public OffsetDateTime modifiedOn() { - return this.modifiedOn; - } - - /** - * Get the provisioningErrors property: Errors during provisioning. - * - * @return the provisioningErrors value. - */ - @Override - public List provisioningErrors() { - return this.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. - */ - @Override - public Boolean isAttachedCompute() { - return this.isAttachedCompute; - } - /** * {@inheritDoc} */ @@ -186,7 +107,6 @@ public Aks withDisableLocalAuth(Boolean disableLocalAuth) { */ @Override public void validate() { - super.validate(); if (properties() != null) { properties().validate(); } @@ -225,23 +145,23 @@ public static Aks fromJson(JsonReader jsonReader) throws IOException { if ("computeLocation".equals(fieldName)) { deserializedAks.withComputeLocation(reader.getString()); } else if ("provisioningState".equals(fieldName)) { - deserializedAks.provisioningState = ProvisioningState.fromString(reader.getString()); + deserializedAks.withProvisioningState(ProvisioningState.fromString(reader.getString())); } else if ("description".equals(fieldName)) { deserializedAks.withDescription(reader.getString()); } else if ("createdOn".equals(fieldName)) { - deserializedAks.createdOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedAks.withCreatedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("modifiedOn".equals(fieldName)) { - deserializedAks.modifiedOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedAks.withModifiedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("resourceId".equals(fieldName)) { deserializedAks.withResourceId(reader.getString()); } else if ("provisioningErrors".equals(fieldName)) { List provisioningErrors = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); - deserializedAks.provisioningErrors = provisioningErrors; + deserializedAks.withProvisioningErrors(provisioningErrors); } else if ("isAttachedCompute".equals(fieldName)) { - deserializedAks.isAttachedCompute = reader.getNullable(JsonReader::getBoolean); + deserializedAks.withIsAttachedCompute(reader.getNullable(JsonReader::getBoolean)); } else if ("disableLocalAuth".equals(fieldName)) { deserializedAks.withDisableLocalAuth(reader.getNullable(JsonReader::getBoolean)); } else if ("computeType".equals(fieldName)) { 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 8a4bda318ec92..2942a7c4c192e 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 @@ -123,7 +123,6 @@ public AksComputeSecrets withImagePullSecretName(String imagePullSecretName) { */ @Override public void validate() { - super.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 index 89e05a4ea432f..125d03053a7f7 100644 --- 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 @@ -44,7 +44,6 @@ public MonitoringFeatureFilterType filterType() { */ @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 index 2b729b4a09b0e..578362e9a6163 100644 --- 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 @@ -43,7 +43,6 @@ public NodesValueType nodesValueType() { */ @Override public void validate() { - super.validate(); } /** diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllowedContentLevel.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllowedContentLevel.java new file mode 100644 index 0000000000000..603b2ba2577c7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllowedContentLevel.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Level at which content is filtered. + */ +public final class AllowedContentLevel extends ExpandableStringEnum { + /** + * Static value Low for AllowedContentLevel. + */ + public static final AllowedContentLevel LOW = fromString("Low"); + + /** + * Static value Medium for AllowedContentLevel. + */ + public static final AllowedContentLevel MEDIUM = fromString("Medium"); + + /** + * Static value High for AllowedContentLevel. + */ + public static final AllowedContentLevel HIGH = fromString("High"); + + /** + * Creates a new instance of AllowedContentLevel value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AllowedContentLevel() { + } + + /** + * Creates or finds a AllowedContentLevel from its string representation. + * + * @param name a name to look for. + * @return the corresponding AllowedContentLevel. + */ + public static AllowedContentLevel fromString(String name) { + return fromString(name, AllowedContentLevel.class); + } + + /** + * Gets known AllowedContentLevel values. + * + * @return known AllowedContentLevel values. + */ + public static Collection values() { + return values(AllowedContentLevel.class); + } +} 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 25b3ad2c53f7a..b8e5d0b70f027 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 @@ -11,7 +11,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.time.OffsetDateTime; import java.util.List; /** @@ -29,32 +28,6 @@ public final class AmlCompute extends Compute { */ private AmlComputeProperties properties; - /* - * The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - */ - private ProvisioningState provisioningState; - - /* - * The time at which the compute was created. - */ - private OffsetDateTime createdOn; - - /* - * The time at which the compute was last modified. - */ - private OffsetDateTime modifiedOn; - - /* - * Errors during provisioning - */ - private List provisioningErrors; - - /* - * Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning - * service provisioned it if false. - */ - private Boolean isAttachedCompute; - /** * Creates an instance of AmlCompute class. */ @@ -91,58 +64,6 @@ public AmlCompute withProperties(AmlComputeProperties properties) { return this; } - /** - * Get the provisioningState property: The provision state of the cluster. Valid values are Unknown, Updating, - * Provisioning, Succeeded, and Failed. - * - * @return the provisioningState value. - */ - @Override - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the createdOn property: The time at which the compute was created. - * - * @return the createdOn value. - */ - @Override - public OffsetDateTime createdOn() { - return this.createdOn; - } - - /** - * Get the modifiedOn property: The time at which the compute was last modified. - * - * @return the modifiedOn value. - */ - @Override - public OffsetDateTime modifiedOn() { - return this.modifiedOn; - } - - /** - * Get the provisioningErrors property: Errors during provisioning. - * - * @return the provisioningErrors value. - */ - @Override - public List provisioningErrors() { - return this.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. - */ - @Override - public Boolean isAttachedCompute() { - return this.isAttachedCompute; - } - /** * {@inheritDoc} */ @@ -186,7 +107,6 @@ public AmlCompute withDisableLocalAuth(Boolean disableLocalAuth) { */ @Override public void validate() { - super.validate(); if (properties() != null) { properties().validate(); } @@ -225,23 +145,23 @@ public static AmlCompute fromJson(JsonReader jsonReader) throws IOException { if ("computeLocation".equals(fieldName)) { deserializedAmlCompute.withComputeLocation(reader.getString()); } else if ("provisioningState".equals(fieldName)) { - deserializedAmlCompute.provisioningState = ProvisioningState.fromString(reader.getString()); + deserializedAmlCompute.withProvisioningState(ProvisioningState.fromString(reader.getString())); } else if ("description".equals(fieldName)) { deserializedAmlCompute.withDescription(reader.getString()); } else if ("createdOn".equals(fieldName)) { - deserializedAmlCompute.createdOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedAmlCompute.withCreatedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("modifiedOn".equals(fieldName)) { - deserializedAmlCompute.modifiedOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedAmlCompute.withModifiedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("resourceId".equals(fieldName)) { deserializedAmlCompute.withResourceId(reader.getString()); } else if ("provisioningErrors".equals(fieldName)) { List provisioningErrors = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); - deserializedAmlCompute.provisioningErrors = provisioningErrors; + deserializedAmlCompute.withProvisioningErrors(provisioningErrors); } else if ("isAttachedCompute".equals(fieldName)) { - deserializedAmlCompute.isAttachedCompute = reader.getNullable(JsonReader::getBoolean); + deserializedAmlCompute.withIsAttachedCompute(reader.getNullable(JsonReader::getBoolean)); } else if ("disableLocalAuth".equals(fieldName)) { deserializedAmlCompute.withDisableLocalAuth(reader.getNullable(JsonReader::getBoolean)); } else if ("computeType".equals(fieldName)) { 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 daa2130aeb64d..3b6557ad83a68 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 @@ -43,7 +43,6 @@ public IdentityConfigurationType identityType() { */ @Override public void validate() { - super.validate(); } /** diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlTokenComputeIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlTokenComputeIdentity.java index 4e321bb69e323..3af8f4865620e 100644 --- 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 @@ -44,7 +44,6 @@ public MonitorComputeIdentityType computeIdentityType() { */ @Override public void validate() { - super.validate(); } /** diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AnonymousAccessCredential.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AnonymousAccessCredential.java index 062a8ec3b1797..aeb23cda987e9 100644 --- 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 @@ -43,7 +43,6 @@ public DataReferenceCredentialType credentialType() { */ @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 index cab43ca41a15c..0a1e9b2f2e027 100644 --- 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 @@ -49,16 +49,6 @@ public final class ApiKeyAuthWorkspaceConnectionProperties extends WorkspaceConn */ private WorkspaceConnectionApiKey credentials; - /* - * The createdByWorkspaceArmId property. - */ - private String createdByWorkspaceArmId; - - /* - * Group based on connection category - */ - private ConnectionGroup group; - /** * Creates an instance of ApiKeyAuthWorkspaceConnectionProperties class. */ @@ -96,31 +86,29 @@ public ApiKeyAuthWorkspaceConnectionProperties withCredentials(WorkspaceConnecti } /** - * Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. - * - * @return the createdByWorkspaceArmId value. + * {@inheritDoc} */ @Override - public String createdByWorkspaceArmId() { - return this.createdByWorkspaceArmId; + public ApiKeyAuthWorkspaceConnectionProperties withCategory(ConnectionCategory category) { + super.withCategory(category); + return this; } /** - * Get the group property: Group based on connection category. - * - * @return the group value. + * {@inheritDoc} */ @Override - public ConnectionGroup group() { - return this.group; + public ApiKeyAuthWorkspaceConnectionProperties withError(String error) { + super.withError(error); + return this; } /** * {@inheritDoc} */ @Override - public ApiKeyAuthWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); + public ApiKeyAuthWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { + super.withExpiryTime(expiryTime); return this; } @@ -128,8 +116,8 @@ public ApiKeyAuthWorkspaceConnectionProperties withCategory(ConnectionCategory c * {@inheritDoc} */ @Override - public ApiKeyAuthWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { - super.withExpiryTime(expiryTime); + public ApiKeyAuthWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { + super.withIsSharedToAll(isSharedToAll); return this; } @@ -137,8 +125,8 @@ public ApiKeyAuthWorkspaceConnectionProperties withExpiryTime(OffsetDateTime exp * {@inheritDoc} */ @Override - public ApiKeyAuthWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { - super.withIsSharedToAll(isSharedToAll); + public ApiKeyAuthWorkspaceConnectionProperties withMetadata(Map metadata) { + super.withMetadata(metadata); return this; } @@ -146,8 +134,8 @@ public ApiKeyAuthWorkspaceConnectionProperties withIsSharedToAll(Boolean isShare * {@inheritDoc} */ @Override - public ApiKeyAuthWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); + public ApiKeyAuthWorkspaceConnectionProperties withPeRequirement(ManagedPERequirement peRequirement) { + super.withPeRequirement(peRequirement); return this; } @@ -155,8 +143,8 @@ public ApiKeyAuthWorkspaceConnectionProperties withTarget(String target) { * {@inheritDoc} */ @Override - public ApiKeyAuthWorkspaceConnectionProperties withMetadata(Map metadata) { - super.withMetadata(metadata); + public ApiKeyAuthWorkspaceConnectionProperties withPeStatus(ManagedPEStatus peStatus) { + super.withPeStatus(peStatus); return this; } @@ -173,8 +161,8 @@ public ApiKeyAuthWorkspaceConnectionProperties withSharedUserList(List s * {@inheritDoc} */ @Override - public ApiKeyAuthWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); + public ApiKeyAuthWorkspaceConnectionProperties withTarget(String target) { + super.withTarget(target); return this; } @@ -182,8 +170,9 @@ public ApiKeyAuthWorkspaceConnectionProperties withValue(String value) { * {@inheritDoc} */ @Override - public ApiKeyAuthWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); + public ApiKeyAuthWorkspaceConnectionProperties + withUseWorkspaceManagedIdentity(Boolean useWorkspaceManagedIdentity) { + super.withUseWorkspaceManagedIdentity(useWorkspaceManagedIdentity); return this; } @@ -194,7 +183,6 @@ public ApiKeyAuthWorkspaceConnectionProperties withValueFormat(ValueFormat value */ @Override public void validate() { - super.validate(); if (credentials() != null) { credentials().validate(); } @@ -207,15 +195,17 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("category", category() == null ? null : category().toString()); + jsonWriter.writeStringField("error", error()); jsonWriter.writeStringField("expiryTime", expiryTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(expiryTime())); jsonWriter.writeBooleanField("isSharedToAll", isSharedToAll()); - jsonWriter.writeStringField("target", target()); jsonWriter.writeMapField("metadata", metadata(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("peRequirement", peRequirement() == null ? null : peRequirement().toString()); + jsonWriter.writeStringField("peStatus", peStatus() == null ? null : peStatus().toString()); jsonWriter.writeArrayField("sharedUserList", sharedUserList(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", value()); - jsonWriter.writeStringField("valueFormat", valueFormat() == null ? null : valueFormat().toString()); + jsonWriter.writeStringField("target", target()); + jsonWriter.writeBooleanField("useWorkspaceManagedIdentity", useWorkspaceManagedIdentity()); jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); jsonWriter.writeJsonField("credentials", this.credentials); return jsonWriter.writeEndObject(); @@ -241,29 +231,35 @@ public static ApiKeyAuthWorkspaceConnectionProperties fromJson(JsonReader jsonRe deserializedApiKeyAuthWorkspaceConnectionProperties .withCategory(ConnectionCategory.fromString(reader.getString())); } else if ("createdByWorkspaceArmId".equals(fieldName)) { - deserializedApiKeyAuthWorkspaceConnectionProperties.createdByWorkspaceArmId = reader.getString(); + deserializedApiKeyAuthWorkspaceConnectionProperties.withCreatedByWorkspaceArmId(reader.getString()); + } else if ("error".equals(fieldName)) { + deserializedApiKeyAuthWorkspaceConnectionProperties.withError(reader.getString()); } else if ("expiryTime".equals(fieldName)) { deserializedApiKeyAuthWorkspaceConnectionProperties.withExpiryTime(reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("group".equals(fieldName)) { - deserializedApiKeyAuthWorkspaceConnectionProperties.group - = ConnectionGroup.fromString(reader.getString()); + deserializedApiKeyAuthWorkspaceConnectionProperties + .withGroup(ConnectionGroup.fromString(reader.getString())); } else if ("isSharedToAll".equals(fieldName)) { deserializedApiKeyAuthWorkspaceConnectionProperties .withIsSharedToAll(reader.getNullable(JsonReader::getBoolean)); - } else if ("target".equals(fieldName)) { - deserializedApiKeyAuthWorkspaceConnectionProperties.withTarget(reader.getString()); } else if ("metadata".equals(fieldName)) { Map metadata = reader.readMap(reader1 -> reader1.getString()); deserializedApiKeyAuthWorkspaceConnectionProperties.withMetadata(metadata); + } else if ("peRequirement".equals(fieldName)) { + deserializedApiKeyAuthWorkspaceConnectionProperties + .withPeRequirement(ManagedPERequirement.fromString(reader.getString())); + } else if ("peStatus".equals(fieldName)) { + deserializedApiKeyAuthWorkspaceConnectionProperties + .withPeStatus(ManagedPEStatus.fromString(reader.getString())); } else if ("sharedUserList".equals(fieldName)) { List sharedUserList = reader.readArray(reader1 -> reader1.getString()); deserializedApiKeyAuthWorkspaceConnectionProperties.withSharedUserList(sharedUserList); - } else if ("value".equals(fieldName)) { - deserializedApiKeyAuthWorkspaceConnectionProperties.withValue(reader.getString()); - } else if ("valueFormat".equals(fieldName)) { + } else if ("target".equals(fieldName)) { + deserializedApiKeyAuthWorkspaceConnectionProperties.withTarget(reader.getString()); + } else if ("useWorkspaceManagedIdentity".equals(fieldName)) { deserializedApiKeyAuthWorkspaceConnectionProperties - .withValueFormat(ValueFormat.fromString(reader.getString())); + .withUseWorkspaceManagedIdentity(reader.getNullable(JsonReader::getBoolean)); } else if ("authType".equals(fieldName)) { deserializedApiKeyAuthWorkspaceConnectionProperties.authType = ConnectionAuthType.fromString(reader.getString()); 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 40f0a0158c4f2..f31fc7ccc85fd 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 @@ -17,14 +17,14 @@ @Fluent public class AssetBase extends ResourceBase { /* - * Is the asset archived? + * If the name version are system generated (anonymous registration). */ - private Boolean isArchived; + private Boolean isAnonymous; /* - * If the name version are system generated (anonymous registration). + * Is the asset archived? */ - private Boolean isAnonymous; + private Boolean isArchived; /** * Creates an instance of AssetBase class. @@ -33,42 +33,42 @@ public AssetBase() { } /** - * Get the isArchived property: Is the asset archived?. + * Get the isAnonymous property: If the name version are system generated (anonymous registration). * - * @return the isArchived value. + * @return the isAnonymous value. */ - public Boolean isArchived() { - return this.isArchived; + public Boolean isAnonymous() { + return this.isAnonymous; } /** - * Set the isArchived property: Is the asset archived?. + * Set the isAnonymous property: If the name version are system generated (anonymous registration). * - * @param isArchived the isArchived value to set. + * @param isAnonymous the isAnonymous value to set. * @return the AssetBase object itself. */ - public AssetBase withIsArchived(Boolean isArchived) { - this.isArchived = isArchived; + public AssetBase withIsAnonymous(Boolean isAnonymous) { + this.isAnonymous = isAnonymous; return this; } /** - * Get the isAnonymous property: If the name version are system generated (anonymous registration). + * Get the isArchived property: Is the asset archived?. * - * @return the isAnonymous value. + * @return the isArchived value. */ - public Boolean isAnonymous() { - return this.isAnonymous; + public Boolean isArchived() { + return this.isArchived; } /** - * Set the isAnonymous property: If the name version are system generated (anonymous registration). + * Set the isArchived property: Is the asset archived?. * - * @param isAnonymous the isAnonymous value to set. + * @param isArchived the isArchived value to set. * @return the AssetBase object itself. */ - public AssetBase withIsAnonymous(Boolean isAnonymous) { - this.isAnonymous = isAnonymous; + public AssetBase withIsArchived(Boolean isArchived) { + this.isArchived = isArchived; return this; } @@ -85,8 +85,8 @@ public AssetBase withDescription(String description) { * {@inheritDoc} */ @Override - public AssetBase withTags(Map tags) { - super.withTags(tags); + public AssetBase withProperties(Map properties) { + super.withProperties(properties); return this; } @@ -94,8 +94,8 @@ public AssetBase withTags(Map tags) { * {@inheritDoc} */ @Override - public AssetBase withProperties(Map properties) { - super.withProperties(properties); + public AssetBase withTags(Map tags) { + super.withTags(tags); return this; } @@ -106,7 +106,6 @@ public AssetBase withProperties(Map properties) { */ @Override public void validate() { - super.validate(); } /** @@ -116,10 +115,10 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", this.isArchived); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isAnonymous", this.isAnonymous); + jsonWriter.writeBooleanField("isArchived", this.isArchived); return jsonWriter.writeEndObject(); } @@ -140,16 +139,16 @@ public static AssetBase fromJson(JsonReader jsonReader) throws IOException { if ("description".equals(fieldName)) { deserializedAssetBase.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedAssetBase.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedAssetBase.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedAssetBase.isArchived = reader.getNullable(JsonReader::getBoolean); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedAssetBase.withTags(tags); } else if ("isAnonymous".equals(fieldName)) { deserializedAssetBase.isAnonymous = reader.getNullable(JsonReader::getBoolean); + } else if ("isArchived".equals(fieldName)) { + deserializedAssetBase.isArchived = reader.getNullable(JsonReader::getBoolean); } else { reader.skipChildren(); } 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 3361874f3160a..94b7236825599 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 @@ -110,8 +110,8 @@ public AssetContainer withDescription(String description) { * {@inheritDoc} */ @Override - public AssetContainer withTags(Map tags) { - super.withTags(tags); + public AssetContainer withProperties(Map properties) { + super.withProperties(properties); return this; } @@ -119,8 +119,8 @@ public AssetContainer withTags(Map tags) { * {@inheritDoc} */ @Override - public AssetContainer withProperties(Map properties) { - super.withProperties(properties); + public AssetContainer withTags(Map tags) { + super.withTags(tags); return this; } @@ -131,7 +131,6 @@ public AssetContainer withProperties(Map properties) { */ @Override public void validate() { - super.validate(); } /** @@ -141,8 +140,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isArchived", this.isArchived); return jsonWriter.writeEndObject(); } @@ -164,12 +163,12 @@ public static AssetContainer fromJson(JsonReader jsonReader) throws IOException if ("description".equals(fieldName)) { deserializedAssetContainer.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedAssetContainer.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedAssetContainer.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedAssetContainer.withTags(tags); } else if ("isArchived".equals(fieldName)) { deserializedAssetContainer.isArchived = reader.getNullable(JsonReader::getBoolean); } else if ("latestVersion".equals(fieldName)) { 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 3f22adaf3d73d..fd821b884c269 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 @@ -18,14 +18,14 @@ @Fluent public class AssetJobInput implements JsonSerializable { /* - * [Required] Input Asset URI. + * Input Asset Delivery Mode. */ - private String uri; + private InputDeliveryMode mode; /* - * Input Asset Delivery Mode. + * [Required] Input Asset URI. */ - private InputDeliveryMode mode; + private String uri; /** * Creates an instance of AssetJobInput class. @@ -34,42 +34,42 @@ public AssetJobInput() { } /** - * Get the uri property: [Required] Input Asset URI. + * Get the mode property: Input Asset Delivery Mode. * - * @return the uri value. + * @return the mode value. */ - public String uri() { - return this.uri; + public InputDeliveryMode mode() { + return this.mode; } /** - * Set the uri property: [Required] Input Asset URI. + * Set the mode property: Input Asset Delivery Mode. * - * @param uri the uri value to set. + * @param mode the mode value to set. * @return the AssetJobInput object itself. */ - public AssetJobInput withUri(String uri) { - this.uri = uri; + public AssetJobInput withMode(InputDeliveryMode mode) { + this.mode = mode; return this; } /** - * Get the mode property: Input Asset Delivery Mode. + * Get the uri property: [Required] Input Asset URI. * - * @return the mode value. + * @return the uri value. */ - public InputDeliveryMode mode() { - return this.mode; + public String uri() { + return this.uri; } /** - * Set the mode property: Input Asset Delivery Mode. + * Set the uri property: [Required] Input Asset URI. * - * @param mode the mode value to set. + * @param uri the uri value to set. * @return the AssetJobInput object itself. */ - public AssetJobInput withMode(InputDeliveryMode mode) { - this.mode = mode; + public AssetJobInput withUri(String uri) { + this.uri = uri; return this; } 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 777d853f2ca61..3ec282ffc3f97 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 @@ -17,15 +17,20 @@ @Fluent public class AssetJobOutput implements JsonSerializable { /* - * Output Asset URI. + * Output Asset Name. */ - private String uri; + private String assetName; /* * Output Asset Delivery Mode. */ private OutputDeliveryMode mode; + /* + * Output Asset URI. + */ + private String uri; + /** * Creates an instance of AssetJobOutput class. */ @@ -33,22 +38,22 @@ public AssetJobOutput() { } /** - * Get the uri property: Output Asset URI. + * Get the assetName property: Output Asset Name. * - * @return the uri value. + * @return the assetName value. */ - public String uri() { - return this.uri; + public String assetName() { + return this.assetName; } /** - * Set the uri property: Output Asset URI. + * Set the assetName property: Output Asset Name. * - * @param uri the uri value to set. + * @param assetName the assetName value to set. * @return the AssetJobOutput object itself. */ - public AssetJobOutput withUri(String uri) { - this.uri = uri; + public AssetJobOutput withAssetName(String assetName) { + this.assetName = assetName; return this; } @@ -72,6 +77,26 @@ public AssetJobOutput withMode(OutputDeliveryMode mode) { return this; } + /** + * Get the uri property: Output Asset URI. + * + * @return the uri value. + */ + public String uri() { + return this.uri; + } + + /** + * Set the uri property: Output Asset URI. + * + * @param uri the uri value to set. + * @return the AssetJobOutput object itself. + */ + public AssetJobOutput withUri(String uri) { + this.uri = uri; + return this; + } + /** * Validates the instance. * @@ -86,8 +111,9 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("uri", this.uri); + jsonWriter.writeStringField("assetName", this.assetName); jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + jsonWriter.writeStringField("uri", this.uri); return jsonWriter.writeEndObject(); } @@ -106,10 +132,12 @@ public static AssetJobOutput fromJson(JsonReader jsonReader) throws IOException String fieldName = reader.getFieldName(); reader.nextToken(); - if ("uri".equals(fieldName)) { - deserializedAssetJobOutput.uri = reader.getString(); + if ("assetName".equals(fieldName)) { + deserializedAssetJobOutput.assetName = reader.getString(); } else if ("mode".equals(fieldName)) { deserializedAssetJobOutput.mode = OutputDeliveryMode.fromString(reader.getString()); + } else if ("uri".equals(fieldName)) { + deserializedAssetJobOutput.uri = reader.getString(); } else { reader.skipChildren(); } 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..29b664b3a1ce0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AuthMode.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.util.ExpandableStringEnum; +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. + */ + 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/AutoForecastHorizon.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoForecastHorizon.java index 3a85d223e13da..be28893ee9b0a 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 @@ -43,7 +43,6 @@ public ForecastHorizonMode mode() { */ @Override public void validate() { - super.validate(); } /** 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 f616e29568747..5901629459390 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 @@ -24,11 +24,6 @@ public final class AutoMLJob extends JobBaseProperties { */ private JobType jobType = JobType.AUTO_ML; - /* - * Compute Resource configuration for the job. - */ - private JobResourceConfiguration resources; - /* * 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 @@ -41,11 +36,6 @@ public final class AutoMLJob extends JobBaseProperties { */ private Map environmentVariables; - /* - * [Required] This represents scenario which can be one of Tables/NLP/Image - */ - private AutoMLVertical taskDetails; - /* * Mapping of output data bindings used in the job. */ @@ -57,9 +47,14 @@ public final class AutoMLJob extends JobBaseProperties { private QueueSettings queueSettings; /* - * Status of the job. + * Compute Resource configuration for the job. */ - private JobStatus status; + private JobResourceConfiguration resources; + + /* + * [Required] This represents scenario which can be one of Tables/NLP/Image + */ + private AutoMLVertical taskDetails; /** * Creates an instance of AutoMLJob class. @@ -77,26 +72,6 @@ public JobType jobType() { return this.jobType; } - /** - * 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 AutoMLJob object itself. - */ - public AutoMLJob withResources(JobResourceConfiguration resources) { - this.resources = resources; - return this; - } - /** * 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 @@ -141,26 +116,6 @@ public AutoMLJob withEnvironmentVariables(Map environmentVariabl return this; } - /** - * Get the taskDetails property: [Required] This represents scenario which can be one of Tables/NLP/Image. - * - * @return the taskDetails value. - */ - public AutoMLVertical taskDetails() { - return this.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. - */ - public AutoMLJob withTaskDetails(AutoMLVertical taskDetails) { - this.taskDetails = taskDetails; - return this; - } - /** * Get the outputs property: Mapping of output data bindings used in the job. * @@ -202,21 +157,60 @@ public AutoMLJob withQueueSettings(QueueSettings queueSettings) { } /** - * Get the status property: Status of the job. + * 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 AutoMLJob object itself. + */ + public AutoMLJob withResources(JobResourceConfiguration resources) { + this.resources = resources; + return this; + } + + /** + * Get the taskDetails property: [Required] This represents scenario which can be one of Tables/NLP/Image. + * + * @return the taskDetails value. + */ + public AutoMLVertical taskDetails() { + return this.taskDetails; + } + + /** + * Set the taskDetails property: [Required] This represents scenario which can be one of Tables/NLP/Image. * - * @return the status value. + * @param taskDetails the taskDetails value to set. + * @return the AutoMLJob object itself. + */ + public AutoMLJob withTaskDetails(AutoMLVertical taskDetails) { + this.taskDetails = taskDetails; + return this; + } + + /** + * {@inheritDoc} */ @Override - public JobStatus status() { - return this.status; + public AutoMLJob withComponentId(String componentId) { + super.withComponentId(componentId); + return this; } /** * {@inheritDoc} */ @Override - public AutoMLJob withDisplayName(String displayName) { - super.withDisplayName(displayName); + public AutoMLJob withComputeId(String computeId) { + super.withComputeId(computeId); return this; } @@ -224,8 +218,8 @@ public AutoMLJob withDisplayName(String displayName) { * {@inheritDoc} */ @Override - public AutoMLJob withExperimentName(String experimentName) { - super.withExperimentName(experimentName); + public AutoMLJob withDisplayName(String displayName) { + super.withDisplayName(displayName); return this; } @@ -233,8 +227,8 @@ public AutoMLJob withExperimentName(String experimentName) { * {@inheritDoc} */ @Override - public AutoMLJob withServices(Map services) { - super.withServices(services); + public AutoMLJob withExperimentName(String experimentName) { + super.withExperimentName(experimentName); return this; } @@ -242,8 +236,8 @@ public AutoMLJob withServices(Map services) { * {@inheritDoc} */ @Override - public AutoMLJob withComputeId(String computeId) { - super.withComputeId(computeId); + public AutoMLJob withIdentity(IdentityConfiguration identity) { + super.withIdentity(identity); return this; } @@ -260,8 +254,8 @@ public AutoMLJob withIsArchived(Boolean isArchived) { * {@inheritDoc} */ @Override - public AutoMLJob withIdentity(IdentityConfiguration identity) { - super.withIdentity(identity); + public AutoMLJob withNotificationSetting(NotificationSetting notificationSetting) { + super.withNotificationSetting(notificationSetting); return this; } @@ -269,8 +263,8 @@ public AutoMLJob withIdentity(IdentityConfiguration identity) { * {@inheritDoc} */ @Override - public AutoMLJob withComponentId(String componentId) { - super.withComponentId(componentId); + public AutoMLJob withParentJobName(String parentJobName) { + super.withParentJobName(parentJobName); return this; } @@ -278,8 +272,8 @@ public AutoMLJob withComponentId(String componentId) { * {@inheritDoc} */ @Override - public AutoMLJob withNotificationSetting(NotificationSetting notificationSetting) { - super.withNotificationSetting(notificationSetting); + public AutoMLJob withServices(Map services) { + super.withServices(services); return this; } @@ -296,8 +290,8 @@ public AutoMLJob withDescription(String description) { * {@inheritDoc} */ @Override - public AutoMLJob withTags(Map tags) { - super.withTags(tags); + public AutoMLJob withProperties(Map properties) { + super.withProperties(properties); return this; } @@ -305,8 +299,8 @@ public AutoMLJob withTags(Map tags) { * {@inheritDoc} */ @Override - public AutoMLJob withProperties(Map properties) { - super.withProperties(properties); + public AutoMLJob withTags(Map tags) { + super.withTags(tags); return this; } @@ -317,7 +311,16 @@ public AutoMLJob withProperties(Map properties) { */ @Override public void validate() { - super.validate(); + if (outputs() != null) { + outputs().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); + } + if (queueSettings() != null) { + queueSettings().validate(); + } if (resources() != null) { resources().validate(); } @@ -327,16 +330,19 @@ public void validate() { } else { taskDetails().validate(); } - if (outputs() != null) { - outputs().values().forEach(e -> { + if (identity() != null) { + identity().validate(); + } + if (notificationSetting() != null) { + notificationSetting().validate(); + } + if (services() != null) { + services().values().forEach(e -> { if (e != null) { e.validate(); } }); } - if (queueSettings() != null) { - queueSettings().validate(); - } } private static final ClientLogger LOGGER = new ClientLogger(AutoMLJob.class); @@ -348,24 +354,25 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("componentId", componentId()); + jsonWriter.writeStringField("computeId", computeId()); jsonWriter.writeStringField("displayName", displayName()); jsonWriter.writeStringField("experimentName", experimentName()); - jsonWriter.writeMapField("services", services(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("computeId", computeId()); - jsonWriter.writeBooleanField("isArchived", isArchived()); jsonWriter.writeJsonField("identity", identity()); - jsonWriter.writeStringField("componentId", componentId()); + jsonWriter.writeBooleanField("isArchived", isArchived()); jsonWriter.writeJsonField("notificationSetting", notificationSetting()); + jsonWriter.writeStringField("parentJobName", parentJobName()); + jsonWriter.writeMapField("services", services(), (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("taskDetails", this.taskDetails); jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); - jsonWriter.writeJsonField("resources", this.resources); jsonWriter.writeStringField("environmentId", this.environmentId); jsonWriter.writeMapField("environmentVariables", this.environmentVariables, (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("outputs", this.outputs, (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("queueSettings", this.queueSettings); + jsonWriter.writeJsonField("resources", this.resources); return jsonWriter.writeEndObject(); } @@ -387,37 +394,37 @@ public static AutoMLJob fromJson(JsonReader jsonReader) throws IOException { if ("description".equals(fieldName)) { deserializedAutoMLJob.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedAutoMLJob.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedAutoMLJob.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedAutoMLJob.withTags(tags); + } else if ("componentId".equals(fieldName)) { + deserializedAutoMLJob.withComponentId(reader.getString()); + } else if ("computeId".equals(fieldName)) { + deserializedAutoMLJob.withComputeId(reader.getString()); } else if ("displayName".equals(fieldName)) { deserializedAutoMLJob.withDisplayName(reader.getString()); - } else if ("status".equals(fieldName)) { - deserializedAutoMLJob.status = JobStatus.fromString(reader.getString()); } else if ("experimentName".equals(fieldName)) { deserializedAutoMLJob.withExperimentName(reader.getString()); - } else if ("services".equals(fieldName)) { - Map services = reader.readMap(reader1 -> JobService.fromJson(reader1)); - deserializedAutoMLJob.withServices(services); - } else if ("computeId".equals(fieldName)) { - deserializedAutoMLJob.withComputeId(reader.getString()); - } else if ("isArchived".equals(fieldName)) { - deserializedAutoMLJob.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("identity".equals(fieldName)) { deserializedAutoMLJob.withIdentity(IdentityConfiguration.fromJson(reader)); - } else if ("componentId".equals(fieldName)) { - deserializedAutoMLJob.withComponentId(reader.getString()); + } else if ("isArchived".equals(fieldName)) { + deserializedAutoMLJob.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("notificationSetting".equals(fieldName)) { deserializedAutoMLJob.withNotificationSetting(NotificationSetting.fromJson(reader)); + } else if ("parentJobName".equals(fieldName)) { + deserializedAutoMLJob.withParentJobName(reader.getString()); + } else if ("services".equals(fieldName)) { + Map services = reader.readMap(reader1 -> JobService.fromJson(reader1)); + deserializedAutoMLJob.withServices(services); + } else if ("status".equals(fieldName)) { + deserializedAutoMLJob.withStatus(JobStatus.fromString(reader.getString())); } else if ("taskDetails".equals(fieldName)) { deserializedAutoMLJob.taskDetails = AutoMLVertical.fromJson(reader); } else if ("jobType".equals(fieldName)) { deserializedAutoMLJob.jobType = JobType.fromString(reader.getString()); - } else if ("resources".equals(fieldName)) { - deserializedAutoMLJob.resources = JobResourceConfiguration.fromJson(reader); } else if ("environmentId".equals(fieldName)) { deserializedAutoMLJob.environmentId = reader.getString(); } else if ("environmentVariables".equals(fieldName)) { @@ -428,6 +435,8 @@ public static AutoMLJob fromJson(JsonReader jsonReader) throws IOException { deserializedAutoMLJob.outputs = outputs; } else if ("queueSettings".equals(fieldName)) { deserializedAutoMLJob.queueSettings = QueueSettings.fromJson(reader); + } else if ("resources".equals(fieldName)) { + deserializedAutoMLJob.resources = JobResourceConfiguration.fromJson(reader); } else { reader.skipChildren(); } 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 322da20d956b3..02ac07f9cec8b 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 @@ -28,17 +28,17 @@ public class AutoMLVertical implements JsonSerializable { */ private LogVerbosity logVerbosity; - /* - * [Required] Training data input. - */ - private MLTableJobInput trainingData; - /* * Target column name: This is prediction values column. * Also known as label column name in context of classification tasks. */ private String targetColumnName; + /* + * [Required] Training data input. + */ + private MLTableJobInput trainingData; + /** * Creates an instance of AutoMLVertical class. */ @@ -75,44 +75,44 @@ public AutoMLVertical withLogVerbosity(LogVerbosity logVerbosity) { } /** - * Get the trainingData property: [Required] Training data input. + * 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 trainingData value. + * @return the targetColumnName value. */ - public MLTableJobInput trainingData() { - return this.trainingData; + public String targetColumnName() { + return this.targetColumnName; } /** - * Set the trainingData property: [Required] Training data input. + * Set the targetColumnName property: Target column name: This is prediction values column. + * Also known as label column name in context of classification tasks. * - * @param trainingData the trainingData value to set. + * @param targetColumnName the targetColumnName value to set. * @return the AutoMLVertical object itself. */ - public AutoMLVertical withTrainingData(MLTableJobInput trainingData) { - this.trainingData = trainingData; + public AutoMLVertical withTargetColumnName(String targetColumnName) { + this.targetColumnName = targetColumnName; return this; } /** - * 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 trainingData property: [Required] Training data input. * - * @return the targetColumnName value. + * @return the trainingData value. */ - public String targetColumnName() { - return this.targetColumnName; + public MLTableJobInput trainingData() { + return this.trainingData; } /** - * 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 trainingData property: [Required] Training data input. * - * @param targetColumnName the targetColumnName value to set. + * @param trainingData the trainingData value to set. * @return the AutoMLVertical object itself. */ - public AutoMLVertical withTargetColumnName(String targetColumnName) { - this.targetColumnName = targetColumnName; + public AutoMLVertical withTrainingData(MLTableJobInput trainingData) { + this.trainingData = trainingData; return this; } 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 ee03326107830..911d558f98397 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 @@ -43,7 +43,6 @@ public NCrossValidationsMode mode() { */ @Override public void validate() { - super.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 4964bfdf4740f..1de6a2697e7c7 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 @@ -43,7 +43,6 @@ public SeasonalityMode mode() { */ @Override public void validate() { - super.validate(); } /** 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 db38b2851e9c7..40f57b861f492 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 @@ -43,7 +43,6 @@ public TargetLagsMode mode() { */ @Override public void validate() { - super.validate(); } /** 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 e323336c4253f..9ae206b7c9149 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 @@ -43,7 +43,6 @@ public TargetRollingWindowSizeMode mode() { */ @Override public void validate() { - super.validate(); } /** diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AvailableQuota.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AvailableQuota.java new file mode 100644 index 0000000000000..64a6401c70a08 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AvailableQuota.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.AvailableQuotaInner; + +/** + * An immutable client-side representation of AvailableQuota. + */ +public interface AvailableQuota { + /** + * Gets the properties property: Available quota properties. + * + * @return the properties value. + */ + AvailableQuotaProperties properties(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.AvailableQuotaInner object. + * + * @return the inner object. + */ + AvailableQuotaInner innerModel(); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AvailableQuotaArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AvailableQuotaArmPaginatedResult.java new file mode 100644 index 0000000000000..255bb32662439 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AvailableQuotaArmPaginatedResult.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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.fluent.models.AvailableQuotaInner; +import java.io.IOException; +import java.util.List; + +/** + * A paginated list of AvailableQuota entities. + */ +@Fluent +public final class AvailableQuotaArmPaginatedResult implements JsonSerializable { + /* + * The link to the next page of AvailableQuota objects. If null, there are no additional pages. + */ + private String nextLink; + + /* + * An array of objects of type AvailableQuota. + */ + private List value; + + /** + * Creates an instance of AvailableQuotaArmPaginatedResult class. + */ + public AvailableQuotaArmPaginatedResult() { + } + + /** + * Get the nextLink property: The link to the next page of AvailableQuota 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 AvailableQuota objects. If null, there are no additional + * pages. + * + * @param nextLink the nextLink value to set. + * @return the AvailableQuotaArmPaginatedResult object itself. + */ + public AvailableQuotaArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Get the value property: An array of objects of type AvailableQuota. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: An array of objects of type AvailableQuota. + * + * @param value the value value to set. + * @return the AvailableQuotaArmPaginatedResult object itself. + */ + public AvailableQuotaArmPaginatedResult 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()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AvailableQuotaArmPaginatedResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AvailableQuotaArmPaginatedResult if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AvailableQuotaArmPaginatedResult. + */ + public static AvailableQuotaArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AvailableQuotaArmPaginatedResult deserializedAvailableQuotaArmPaginatedResult + = new AvailableQuotaArmPaginatedResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nextLink".equals(fieldName)) { + deserializedAvailableQuotaArmPaginatedResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> AvailableQuotaInner.fromJson(reader1)); + deserializedAvailableQuotaArmPaginatedResult.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedAvailableQuotaArmPaginatedResult; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AvailableQuotaProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AvailableQuotaProperties.java new file mode 100644 index 0000000000000..3739373fcd666 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AvailableQuotaProperties.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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The AvailableQuotaProperties model. + */ +@Fluent +public final class AvailableQuotaProperties implements JsonSerializable { + /* + * The number of available quota + */ + private Long total; + + /** + * Creates an instance of AvailableQuotaProperties class. + */ + public AvailableQuotaProperties() { + } + + /** + * Get the total property: The number of available quota. + * + * @return the total value. + */ + public Long total() { + return this.total; + } + + /** + * Set the total property: The number of available quota. + * + * @param total the total value to set. + * @return the AvailableQuotaProperties object itself. + */ + public AvailableQuotaProperties withTotal(Long total) { + this.total = total; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("total", this.total); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AvailableQuotaProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AvailableQuotaProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AvailableQuotaProperties. + */ + public static AvailableQuotaProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AvailableQuotaProperties deserializedAvailableQuotaProperties = new AvailableQuotaProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("total".equals(fieldName)) { + deserializedAvailableQuotaProperties.total = reader.getNullable(JsonReader::getLong); + } else { + reader.skipChildren(); + } + } + + return deserializedAvailableQuotaProperties; + }); + } +} 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 472b1f8d525df..36a982d35c039 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 @@ -5,6 +5,7 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -46,20 +47,15 @@ public final class AzureBlobDatastore extends DatastoreProperties { */ private ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity; - /* - * Azure Subscription Id - */ - private String subscriptionId; - /* * Azure Resource Group name */ private String resourceGroup; /* - * Readonly property to indicate if datastore is the workspace default datastore + * Azure Subscription Id */ - private Boolean isDefault; + private String subscriptionId; /** * Creates an instance of AzureBlobDatastore class. @@ -180,26 +176,6 @@ public ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity() { 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; - } - /** * Get the resourceGroup property: Azure Resource Group name. * @@ -221,13 +197,23 @@ public AzureBlobDatastore withResourceGroup(String resourceGroup) { } /** - * Get the isDefault property: Readonly property to indicate if datastore is the workspace default datastore. + * Get the subscriptionId property: Azure Subscription Id. * - * @return the isDefault value. + * @return the subscriptionId value. */ - @Override - public Boolean isDefault() { - return this.isDefault; + 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; } /** @@ -252,8 +238,8 @@ public AzureBlobDatastore withDescription(String description) { * {@inheritDoc} */ @Override - public AzureBlobDatastore withTags(Map tags) { - super.withTags(tags); + public AzureBlobDatastore withProperties(Map properties) { + super.withProperties(properties); return this; } @@ -261,8 +247,8 @@ public AzureBlobDatastore withTags(Map tags) { * {@inheritDoc} */ @Override - public AzureBlobDatastore withProperties(Map properties) { - super.withProperties(properties); + public AzureBlobDatastore withTags(Map tags) { + super.withTags(tags); return this; } @@ -273,9 +259,16 @@ public AzureBlobDatastore withProperties(Map properties) { */ @Override public void validate() { - super.validate(); + if (credentials() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property credentials in model AzureBlobDatastore")); + } else { + credentials().validate(); + } } + private static final ClientLogger LOGGER = new ClientLogger(AzureBlobDatastore.class); + /** * {@inheritDoc} */ @@ -284,8 +277,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("credentials", credentials()); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("datastoreType", this.datastoreType == null ? null : this.datastoreType.toString()); jsonWriter.writeStringField("accountName", this.accountName); jsonWriter.writeStringField("containerName", this.containerName); @@ -293,8 +286,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("protocol", this.protocol); jsonWriter.writeStringField("serviceDataAccessAuthIdentity", this.serviceDataAccessAuthIdentity == null ? null : this.serviceDataAccessAuthIdentity.toString()); - jsonWriter.writeStringField("subscriptionId", this.subscriptionId); jsonWriter.writeStringField("resourceGroup", this.resourceGroup); + jsonWriter.writeStringField("subscriptionId", this.subscriptionId); return jsonWriter.writeEndObject(); } @@ -318,14 +311,14 @@ public static AzureBlobDatastore fromJson(JsonReader jsonReader) throws IOExcept deserializedAzureBlobDatastore.withCredentials(DatastoreCredentials.fromJson(reader)); } else if ("description".equals(fieldName)) { deserializedAzureBlobDatastore.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedAzureBlobDatastore.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedAzureBlobDatastore.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedAzureBlobDatastore.withTags(tags); } else if ("isDefault".equals(fieldName)) { - deserializedAzureBlobDatastore.isDefault = reader.getNullable(JsonReader::getBoolean); + deserializedAzureBlobDatastore.withIsDefault(reader.getNullable(JsonReader::getBoolean)); } else if ("datastoreType".equals(fieldName)) { deserializedAzureBlobDatastore.datastoreType = DatastoreType.fromString(reader.getString()); } else if ("accountName".equals(fieldName)) { @@ -339,10 +332,10 @@ public static AzureBlobDatastore fromJson(JsonReader jsonReader) throws IOExcept } else if ("serviceDataAccessAuthIdentity".equals(fieldName)) { deserializedAzureBlobDatastore.serviceDataAccessAuthIdentity = ServiceDataAccessAuthIdentity.fromString(reader.getString()); - } else if ("subscriptionId".equals(fieldName)) { - deserializedAzureBlobDatastore.subscriptionId = reader.getString(); } else if ("resourceGroup".equals(fieldName)) { deserializedAzureBlobDatastore.resourceGroup = reader.getString(); + } else if ("subscriptionId".equals(fieldName)) { + deserializedAzureBlobDatastore.subscriptionId = reader.getString(); } else { reader.skipChildren(); } 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 1c46952a1c497..ef6edd68b90fe 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 @@ -22,20 +22,15 @@ public final class AzureDataLakeGen1Datastore extends DatastoreProperties { */ private DatastoreType datastoreType = DatastoreType.AZURE_DATA_LAKE_GEN1; - /* - * [Required] Azure Data Lake store name. - */ - private String storeName; - /* * Indicates which identity to use to authenticate service data access to customer's storage. */ private ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity; /* - * Azure Subscription Id + * [Required] Azure Data Lake store name. */ - private String subscriptionId; + private String storeName; /* * Azure Resource Group name @@ -43,9 +38,9 @@ public final class AzureDataLakeGen1Datastore extends DatastoreProperties { private String resourceGroup; /* - * Readonly property to indicate if datastore is the workspace default datastore + * Azure Subscription Id */ - private Boolean isDefault; + private String subscriptionId; /** * Creates an instance of AzureDataLakeGen1Datastore class. @@ -63,26 +58,6 @@ public DatastoreType datastoreType() { return this.datastoreType; } - /** - * Get the storeName property: [Required] Azure Data Lake store name. - * - * @return the storeName value. - */ - public String storeName() { - return this.storeName; - } - - /** - * Set the storeName property: [Required] Azure Data Lake store name. - * - * @param storeName the storeName value to set. - * @return the AzureDataLakeGen1Datastore object itself. - */ - public AzureDataLakeGen1Datastore withStoreName(String storeName) { - this.storeName = storeName; - return this; - } - /** * Get the serviceDataAccessAuthIdentity property: Indicates which identity to use to authenticate service data * access to customer's storage. @@ -107,22 +82,22 @@ public ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity() { } /** - * Get the subscriptionId property: Azure Subscription Id. + * Get the storeName property: [Required] Azure Data Lake store name. * - * @return the subscriptionId value. + * @return the storeName value. */ - public String subscriptionId() { - return this.subscriptionId; + public String storeName() { + return this.storeName; } /** - * Set the subscriptionId property: Azure Subscription Id. + * Set the storeName property: [Required] Azure Data Lake store name. * - * @param subscriptionId the subscriptionId value to set. + * @param storeName the storeName value to set. * @return the AzureDataLakeGen1Datastore object itself. */ - public AzureDataLakeGen1Datastore withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; + public AzureDataLakeGen1Datastore withStoreName(String storeName) { + this.storeName = storeName; return this; } @@ -147,13 +122,23 @@ public AzureDataLakeGen1Datastore withResourceGroup(String resourceGroup) { } /** - * Get the isDefault property: Readonly property to indicate if datastore is the workspace default datastore. + * Get the subscriptionId property: Azure Subscription Id. * - * @return the isDefault value. + * @return the subscriptionId value. */ - @Override - public Boolean isDefault() { - return this.isDefault; + 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; } /** @@ -178,8 +163,8 @@ public AzureDataLakeGen1Datastore withDescription(String description) { * {@inheritDoc} */ @Override - public AzureDataLakeGen1Datastore withTags(Map tags) { - super.withTags(tags); + public AzureDataLakeGen1Datastore withProperties(Map properties) { + super.withProperties(properties); return this; } @@ -187,8 +172,8 @@ public AzureDataLakeGen1Datastore withTags(Map tags) { * {@inheritDoc} */ @Override - public AzureDataLakeGen1Datastore withProperties(Map properties) { - super.withProperties(properties); + public AzureDataLakeGen1Datastore withTags(Map tags) { + super.withTags(tags); return this; } @@ -199,12 +184,18 @@ public AzureDataLakeGen1Datastore withProperties(Map properties) */ @Override public void validate() { - super.validate(); if (storeName() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( "Missing required property storeName in model AzureDataLakeGen1Datastore")); } + if (credentials() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property credentials in model AzureDataLakeGen1Datastore")); + } else { + credentials().validate(); + } } private static final ClientLogger LOGGER = new ClientLogger(AzureDataLakeGen1Datastore.class); @@ -217,14 +208,14 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("credentials", credentials()); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("storeName", this.storeName); jsonWriter.writeStringField("datastoreType", this.datastoreType == null ? null : this.datastoreType.toString()); jsonWriter.writeStringField("serviceDataAccessAuthIdentity", this.serviceDataAccessAuthIdentity == null ? null : this.serviceDataAccessAuthIdentity.toString()); - jsonWriter.writeStringField("subscriptionId", this.subscriptionId); jsonWriter.writeStringField("resourceGroup", this.resourceGroup); + jsonWriter.writeStringField("subscriptionId", this.subscriptionId); return jsonWriter.writeEndObject(); } @@ -248,14 +239,14 @@ public static AzureDataLakeGen1Datastore fromJson(JsonReader jsonReader) throws deserializedAzureDataLakeGen1Datastore.withCredentials(DatastoreCredentials.fromJson(reader)); } else if ("description".equals(fieldName)) { deserializedAzureDataLakeGen1Datastore.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedAzureDataLakeGen1Datastore.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedAzureDataLakeGen1Datastore.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedAzureDataLakeGen1Datastore.withTags(tags); } else if ("isDefault".equals(fieldName)) { - deserializedAzureDataLakeGen1Datastore.isDefault = reader.getNullable(JsonReader::getBoolean); + deserializedAzureDataLakeGen1Datastore.withIsDefault(reader.getNullable(JsonReader::getBoolean)); } else if ("storeName".equals(fieldName)) { deserializedAzureDataLakeGen1Datastore.storeName = reader.getString(); } else if ("datastoreType".equals(fieldName)) { @@ -263,10 +254,10 @@ public static AzureDataLakeGen1Datastore fromJson(JsonReader jsonReader) throws } else if ("serviceDataAccessAuthIdentity".equals(fieldName)) { deserializedAzureDataLakeGen1Datastore.serviceDataAccessAuthIdentity = ServiceDataAccessAuthIdentity.fromString(reader.getString()); - } else if ("subscriptionId".equals(fieldName)) { - deserializedAzureDataLakeGen1Datastore.subscriptionId = reader.getString(); } else if ("resourceGroup".equals(fieldName)) { deserializedAzureDataLakeGen1Datastore.resourceGroup = reader.getString(); + } else if ("subscriptionId".equals(fieldName)) { + deserializedAzureDataLakeGen1Datastore.subscriptionId = reader.getString(); } else { reader.skipChildren(); } 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 cdf22c3f8a1cd..995be213e8d9a 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 @@ -22,11 +22,6 @@ public final class AzureDataLakeGen2Datastore extends DatastoreProperties { */ private DatastoreType datastoreType = DatastoreType.AZURE_DATA_LAKE_GEN2; - /* - * [Required] The name of the Data Lake Gen2 filesystem. - */ - private String filesystem; - /* * [Required] Storage account name. */ @@ -37,6 +32,11 @@ public final class AzureDataLakeGen2Datastore extends DatastoreProperties { */ private String endpoint; + /* + * [Required] The name of the Data Lake Gen2 filesystem. + */ + private String filesystem; + /* * Protocol used to communicate with the storage account. */ @@ -47,20 +47,15 @@ public final class AzureDataLakeGen2Datastore extends DatastoreProperties { */ private ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity; - /* - * Azure Subscription Id - */ - private String subscriptionId; - /* * Azure Resource Group name */ private String resourceGroup; /* - * Readonly property to indicate if datastore is the workspace default datastore + * Azure Subscription Id */ - private Boolean isDefault; + private String subscriptionId; /** * Creates an instance of AzureDataLakeGen2Datastore class. @@ -78,26 +73,6 @@ public DatastoreType datastoreType() { return this.datastoreType; } - /** - * Get the filesystem property: [Required] The name of the Data Lake Gen2 filesystem. - * - * @return the filesystem value. - */ - public String filesystem() { - return this.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. - */ - public AzureDataLakeGen2Datastore withFilesystem(String filesystem) { - this.filesystem = filesystem; - return this; - } - /** * Get the accountName property: [Required] Storage account name. * @@ -138,6 +113,26 @@ public AzureDataLakeGen2Datastore withEndpoint(String endpoint) { return this; } + /** + * Get the filesystem property: [Required] The name of the Data Lake Gen2 filesystem. + * + * @return the filesystem value. + */ + public String filesystem() { + return this.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. + */ + public AzureDataLakeGen2Datastore withFilesystem(String filesystem) { + this.filesystem = filesystem; + return this; + } + /** * Get the protocol property: Protocol used to communicate with the storage account. * @@ -181,26 +176,6 @@ public ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity() { 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; - } - /** * Get the resourceGroup property: Azure Resource Group name. * @@ -222,13 +197,23 @@ public AzureDataLakeGen2Datastore withResourceGroup(String resourceGroup) { } /** - * Get the isDefault property: Readonly property to indicate if datastore is the workspace default datastore. + * Get the subscriptionId property: Azure Subscription Id. * - * @return the isDefault value. + * @return the subscriptionId value. */ - @Override - public Boolean isDefault() { - return this.isDefault; + 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; } /** @@ -253,8 +238,8 @@ public AzureDataLakeGen2Datastore withDescription(String description) { * {@inheritDoc} */ @Override - public AzureDataLakeGen2Datastore withTags(Map tags) { - super.withTags(tags); + public AzureDataLakeGen2Datastore withProperties(Map properties) { + super.withProperties(properties); return this; } @@ -262,8 +247,8 @@ public AzureDataLakeGen2Datastore withTags(Map tags) { * {@inheritDoc} */ @Override - public AzureDataLakeGen2Datastore withProperties(Map properties) { - super.withProperties(properties); + public AzureDataLakeGen2Datastore withTags(Map tags) { + super.withTags(tags); return this; } @@ -274,16 +259,22 @@ public AzureDataLakeGen2Datastore withProperties(Map properties) */ @Override public void validate() { - super.validate(); + if (accountName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property accountName in model AzureDataLakeGen2Datastore")); + } if (filesystem() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( "Missing required property filesystem in model AzureDataLakeGen2Datastore")); } - if (accountName() == null) { + if (credentials() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( - "Missing required property accountName in model AzureDataLakeGen2Datastore")); + "Missing required property credentials in model AzureDataLakeGen2Datastore")); + } else { + credentials().validate(); } } @@ -297,17 +288,17 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("credentials", credentials()); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("filesystem", this.filesystem); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("accountName", this.accountName); + jsonWriter.writeStringField("filesystem", this.filesystem); jsonWriter.writeStringField("datastoreType", this.datastoreType == null ? null : this.datastoreType.toString()); jsonWriter.writeStringField("endpoint", this.endpoint); jsonWriter.writeStringField("protocol", this.protocol); jsonWriter.writeStringField("serviceDataAccessAuthIdentity", this.serviceDataAccessAuthIdentity == null ? null : this.serviceDataAccessAuthIdentity.toString()); - jsonWriter.writeStringField("subscriptionId", this.subscriptionId); jsonWriter.writeStringField("resourceGroup", this.resourceGroup); + jsonWriter.writeStringField("subscriptionId", this.subscriptionId); return jsonWriter.writeEndObject(); } @@ -331,18 +322,18 @@ public static AzureDataLakeGen2Datastore fromJson(JsonReader jsonReader) throws deserializedAzureDataLakeGen2Datastore.withCredentials(DatastoreCredentials.fromJson(reader)); } else if ("description".equals(fieldName)) { deserializedAzureDataLakeGen2Datastore.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedAzureDataLakeGen2Datastore.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedAzureDataLakeGen2Datastore.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedAzureDataLakeGen2Datastore.withTags(tags); } else if ("isDefault".equals(fieldName)) { - deserializedAzureDataLakeGen2Datastore.isDefault = reader.getNullable(JsonReader::getBoolean); - } else if ("filesystem".equals(fieldName)) { - deserializedAzureDataLakeGen2Datastore.filesystem = reader.getString(); + deserializedAzureDataLakeGen2Datastore.withIsDefault(reader.getNullable(JsonReader::getBoolean)); } else if ("accountName".equals(fieldName)) { deserializedAzureDataLakeGen2Datastore.accountName = reader.getString(); + } else if ("filesystem".equals(fieldName)) { + deserializedAzureDataLakeGen2Datastore.filesystem = reader.getString(); } else if ("datastoreType".equals(fieldName)) { deserializedAzureDataLakeGen2Datastore.datastoreType = DatastoreType.fromString(reader.getString()); } else if ("endpoint".equals(fieldName)) { @@ -352,10 +343,10 @@ public static AzureDataLakeGen2Datastore fromJson(JsonReader jsonReader) throws } else if ("serviceDataAccessAuthIdentity".equals(fieldName)) { deserializedAzureDataLakeGen2Datastore.serviceDataAccessAuthIdentity = ServiceDataAccessAuthIdentity.fromString(reader.getString()); - } else if ("subscriptionId".equals(fieldName)) { - deserializedAzureDataLakeGen2Datastore.subscriptionId = reader.getString(); } else if ("resourceGroup".equals(fieldName)) { deserializedAzureDataLakeGen2Datastore.resourceGroup = reader.getString(); + } else if ("subscriptionId".equals(fieldName)) { + deserializedAzureDataLakeGen2Datastore.subscriptionId = reader.getString(); } else { reader.skipChildren(); } 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 index f358e4ee4c357..88a1b30f48472 100644 --- 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 @@ -17,14 +17,14 @@ @Fluent public class AzureDatastore implements JsonSerializable { /* - * Azure Subscription Id + * Azure Resource Group name */ - private String subscriptionId; + private String resourceGroup; /* - * Azure Resource Group name + * Azure Subscription Id */ - private String resourceGroup; + private String subscriptionId; /** * Creates an instance of AzureDatastore class. @@ -33,42 +33,42 @@ public AzureDatastore() { } /** - * Get the subscriptionId property: Azure Subscription Id. + * Get the resourceGroup property: Azure Resource Group name. * - * @return the subscriptionId value. + * @return the resourceGroup value. */ - public String subscriptionId() { - return this.subscriptionId; + public String resourceGroup() { + return this.resourceGroup; } /** - * Set the subscriptionId property: Azure Subscription Id. + * Set the resourceGroup property: Azure Resource Group name. * - * @param subscriptionId the subscriptionId value to set. + * @param resourceGroup the resourceGroup value to set. * @return the AzureDatastore object itself. */ - public AzureDatastore withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; + public AzureDatastore withResourceGroup(String resourceGroup) { + this.resourceGroup = resourceGroup; return this; } /** - * Get the resourceGroup property: Azure Resource Group name. + * Get the subscriptionId property: Azure Subscription Id. * - * @return the resourceGroup value. + * @return the subscriptionId value. */ - public String resourceGroup() { - return this.resourceGroup; + public String subscriptionId() { + return this.subscriptionId; } /** - * Set the resourceGroup property: Azure Resource Group name. + * Set the subscriptionId property: Azure Subscription Id. * - * @param resourceGroup the resourceGroup value to set. + * @param subscriptionId the subscriptionId value to set. * @return the AzureDatastore object itself. */ - public AzureDatastore withResourceGroup(String resourceGroup) { - this.resourceGroup = resourceGroup; + public AzureDatastore withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; return this; } @@ -86,8 +86,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("subscriptionId", this.subscriptionId); jsonWriter.writeStringField("resourceGroup", this.resourceGroup); + jsonWriter.writeStringField("subscriptionId", this.subscriptionId); return jsonWriter.writeEndObject(); } @@ -106,10 +106,10 @@ public static AzureDatastore fromJson(JsonReader jsonReader) throws IOException String fieldName = reader.getFieldName(); reader.nextToken(); - if ("subscriptionId".equals(fieldName)) { - deserializedAzureDatastore.subscriptionId = reader.getString(); - } else if ("resourceGroup".equals(fieldName)) { + if ("resourceGroup".equals(fieldName)) { deserializedAzureDatastore.resourceGroup = reader.getString(); + } else if ("subscriptionId".equals(fieldName)) { + deserializedAzureDatastore.subscriptionId = reader.getString(); } else { reader.skipChildren(); } 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 index d9c92e528d79c..ddb3aff211fe6 100644 --- 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 @@ -52,7 +52,6 @@ public AzureDevOpsWebhook withEventType(String eventType) { */ @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 6896cf837ca53..a80f02edd8885 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 @@ -28,14 +28,14 @@ public final class AzureFileDatastore extends DatastoreProperties { private String accountName; /* - * [Required] The name of the Azure file share that the datastore points to. + * Azure cloud endpoint for the storage account. */ - private String fileShareName; + private String endpoint; /* - * Azure cloud endpoint for the storage account. + * [Required] The name of the Azure file share that the datastore points to. */ - private String endpoint; + private String fileShareName; /* * Protocol used to communicate with the storage account. @@ -47,20 +47,15 @@ public final class AzureFileDatastore extends DatastoreProperties { */ private ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity; - /* - * Azure Subscription Id - */ - private String subscriptionId; - /* * Azure Resource Group name */ private String resourceGroup; /* - * Readonly property to indicate if datastore is the workspace default datastore + * Azure Subscription Id */ - private Boolean isDefault; + private String subscriptionId; /** * Creates an instance of AzureFileDatastore class. @@ -99,42 +94,42 @@ public AzureFileDatastore withAccountName(String accountName) { } /** - * Get the fileShareName property: [Required] The name of the Azure file share that the datastore points to. + * Get the endpoint property: Azure cloud endpoint for the storage account. * - * @return the fileShareName value. + * @return the endpoint value. */ - public String fileShareName() { - return this.fileShareName; + public String endpoint() { + return this.endpoint; } /** - * Set the fileShareName property: [Required] The name of the Azure file share that the datastore points to. + * Set the endpoint property: Azure cloud endpoint for the storage account. * - * @param fileShareName the fileShareName value to set. + * @param endpoint the endpoint value to set. * @return the AzureFileDatastore object itself. */ - public AzureFileDatastore withFileShareName(String fileShareName) { - this.fileShareName = fileShareName; + public AzureFileDatastore withEndpoint(String endpoint) { + this.endpoint = endpoint; return this; } /** - * Get the endpoint property: Azure cloud endpoint for the storage account. + * Get the fileShareName property: [Required] The name of the Azure file share that the datastore points to. * - * @return the endpoint value. + * @return the fileShareName value. */ - public String endpoint() { - return this.endpoint; + public String fileShareName() { + return this.fileShareName; } /** - * Set the endpoint property: Azure cloud endpoint for the storage account. + * Set the fileShareName property: [Required] The name of the Azure file share that the datastore points to. * - * @param endpoint the endpoint value to set. + * @param fileShareName the fileShareName value to set. * @return the AzureFileDatastore object itself. */ - public AzureFileDatastore withEndpoint(String endpoint) { - this.endpoint = endpoint; + public AzureFileDatastore withFileShareName(String fileShareName) { + this.fileShareName = fileShareName; return this; } @@ -181,26 +176,6 @@ public ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity() { 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; - } - /** * Get the resourceGroup property: Azure Resource Group name. * @@ -222,13 +197,23 @@ public AzureFileDatastore withResourceGroup(String resourceGroup) { } /** - * Get the isDefault property: Readonly property to indicate if datastore is the workspace default datastore. + * Get the subscriptionId property: Azure Subscription Id. * - * @return the isDefault value. + * @return the subscriptionId value. */ - @Override - public Boolean isDefault() { - return this.isDefault; + 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; } /** @@ -253,8 +238,8 @@ public AzureFileDatastore withDescription(String description) { * {@inheritDoc} */ @Override - public AzureFileDatastore withTags(Map tags) { - super.withTags(tags); + public AzureFileDatastore withProperties(Map properties) { + super.withProperties(properties); return this; } @@ -262,8 +247,8 @@ public AzureFileDatastore withTags(Map tags) { * {@inheritDoc} */ @Override - public AzureFileDatastore withProperties(Map properties) { - super.withProperties(properties); + public AzureFileDatastore withTags(Map tags) { + super.withTags(tags); return this; } @@ -274,7 +259,6 @@ public AzureFileDatastore withProperties(Map properties) { */ @Override public void validate() { - super.validate(); if (accountName() == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property accountName in model AzureFileDatastore")); @@ -284,6 +268,12 @@ public void validate() { .log(new IllegalArgumentException( "Missing required property fileShareName in model AzureFileDatastore")); } + if (credentials() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property credentials in model AzureFileDatastore")); + } else { + credentials().validate(); + } } private static final ClientLogger LOGGER = new ClientLogger(AzureFileDatastore.class); @@ -296,8 +286,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("credentials", credentials()); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("accountName", this.accountName); jsonWriter.writeStringField("fileShareName", this.fileShareName); jsonWriter.writeStringField("datastoreType", this.datastoreType == null ? null : this.datastoreType.toString()); @@ -305,8 +295,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("protocol", this.protocol); jsonWriter.writeStringField("serviceDataAccessAuthIdentity", this.serviceDataAccessAuthIdentity == null ? null : this.serviceDataAccessAuthIdentity.toString()); - jsonWriter.writeStringField("subscriptionId", this.subscriptionId); jsonWriter.writeStringField("resourceGroup", this.resourceGroup); + jsonWriter.writeStringField("subscriptionId", this.subscriptionId); return jsonWriter.writeEndObject(); } @@ -330,14 +320,14 @@ public static AzureFileDatastore fromJson(JsonReader jsonReader) throws IOExcept deserializedAzureFileDatastore.withCredentials(DatastoreCredentials.fromJson(reader)); } else if ("description".equals(fieldName)) { deserializedAzureFileDatastore.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedAzureFileDatastore.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedAzureFileDatastore.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedAzureFileDatastore.withTags(tags); } else if ("isDefault".equals(fieldName)) { - deserializedAzureFileDatastore.isDefault = reader.getNullable(JsonReader::getBoolean); + deserializedAzureFileDatastore.withIsDefault(reader.getNullable(JsonReader::getBoolean)); } else if ("accountName".equals(fieldName)) { deserializedAzureFileDatastore.accountName = reader.getString(); } else if ("fileShareName".equals(fieldName)) { @@ -351,10 +341,10 @@ public static AzureFileDatastore fromJson(JsonReader jsonReader) throws IOExcept } else if ("serviceDataAccessAuthIdentity".equals(fieldName)) { deserializedAzureFileDatastore.serviceDataAccessAuthIdentity = ServiceDataAccessAuthIdentity.fromString(reader.getString()); - } else if ("subscriptionId".equals(fieldName)) { - deserializedAzureFileDatastore.subscriptionId = reader.getString(); } else if ("resourceGroup".equals(fieldName)) { deserializedAzureFileDatastore.resourceGroup = reader.getString(); + } else if ("subscriptionId".equals(fieldName)) { + deserializedAzureFileDatastore.subscriptionId = reader.getString(); } else { reader.skipChildren(); } 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..a3f1ac962c9aa --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureOpenAiFineTuning.java @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The AzureOpenAiFineTuning model. + */ +@Fluent +public final class AzureOpenAiFineTuning extends FineTuningVertical { + /* + * [Required] Enum to determine the type of fine tuning. + */ + private ModelProvider modelProvider = ModelProvider.AZURE_OPEN_AI; + + /* + * HyperParameters for fine tuning Azure Open AI model. + */ + private AzureOpenAiHyperParameters hyperParameters; + + /** + * Creates an instance of AzureOpenAiFineTuning class. + */ + public AzureOpenAiFineTuning() { + } + + /** + * Get the modelProvider property: [Required] Enum to determine the type of fine tuning. + * + * @return the modelProvider value. + */ + @Override + public ModelProvider modelProvider() { + return this.modelProvider; + } + + /** + * 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(JobInput 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() { + if (hyperParameters() != null) { + hyperParameters().validate(); + } + if (model() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property model in model AzureOpenAiFineTuning")); + } else { + model().validate(); + } + if (taskType() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property taskType in model AzureOpenAiFineTuning")); + } + if (trainingData() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property trainingData in model AzureOpenAiFineTuning")); + } else { + trainingData().validate(); + } + if (validationData() != null) { + validationData().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AzureOpenAiFineTuning.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("model", model()); + jsonWriter.writeStringField("taskType", taskType() == null ? null : taskType().toString()); + jsonWriter.writeJsonField("trainingData", trainingData()); + jsonWriter.writeJsonField("validationData", validationData()); + jsonWriter.writeStringField("modelProvider", this.modelProvider == null ? null : this.modelProvider.toString()); + jsonWriter.writeJsonField("hyperParameters", this.hyperParameters); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AzureOpenAiFineTuning from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AzureOpenAiFineTuning if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the AzureOpenAiFineTuning. + */ + public static AzureOpenAiFineTuning fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AzureOpenAiFineTuning deserializedAzureOpenAiFineTuning = new AzureOpenAiFineTuning(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("model".equals(fieldName)) { + deserializedAzureOpenAiFineTuning.withModel(JobInput.fromJson(reader)); + } else if ("taskType".equals(fieldName)) { + deserializedAzureOpenAiFineTuning.withTaskType(FineTuningTaskType.fromString(reader.getString())); + } else if ("trainingData".equals(fieldName)) { + deserializedAzureOpenAiFineTuning.withTrainingData(JobInput.fromJson(reader)); + } else if ("validationData".equals(fieldName)) { + deserializedAzureOpenAiFineTuning.withValidationData(JobInput.fromJson(reader)); + } else if ("modelProvider".equals(fieldName)) { + deserializedAzureOpenAiFineTuning.modelProvider = ModelProvider.fromString(reader.getString()); + } else if ("hyperParameters".equals(fieldName)) { + deserializedAzureOpenAiFineTuning.hyperParameters = AzureOpenAiHyperParameters.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedAzureOpenAiFineTuning; + }); + } +} 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..96accac5b652b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureOpenAiHyperParameters.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Azure Open AI hyperparameters for fine tuning. + */ +@Fluent +public final class AzureOpenAiHyperParameters implements JsonSerializable { + /* + * Number of examples in each batch. A larger batch size means that model parameters are updated less frequently, + * but with lower variance. + */ + private Integer batchSize; + + /* + * Scaling factor for the learning rate. A smaller learning rate may be useful to avoid over fitting. + */ + private Double learningRateMultiplier; + + /* + * The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset. + */ + 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() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("batchSize", this.batchSize); + jsonWriter.writeNumberField("learningRateMultiplier", this.learningRateMultiplier); + jsonWriter.writeNumberField("nEpochs", this.nEpochs); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AzureOpenAiHyperParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AzureOpenAiHyperParameters if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AzureOpenAiHyperParameters. + */ + public static AzureOpenAiHyperParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AzureOpenAiHyperParameters deserializedAzureOpenAiHyperParameters = new AzureOpenAiHyperParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("batchSize".equals(fieldName)) { + deserializedAzureOpenAiHyperParameters.batchSize = reader.getNullable(JsonReader::getInt); + } else if ("learningRateMultiplier".equals(fieldName)) { + deserializedAzureOpenAiHyperParameters.learningRateMultiplier + = reader.getNullable(JsonReader::getDouble); + } else if ("nEpochs".equals(fieldName)) { + deserializedAzureOpenAiHyperParameters.nEpochs = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedAzureOpenAiHyperParameters; + }); + } +} 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 a1a49af990d97..1a2a99524175c 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 @@ -21,14 +21,14 @@ public final class BanditPolicy extends EarlyTerminationPolicy { private EarlyTerminationPolicyType policyType = EarlyTerminationPolicyType.BANDIT; /* - * Ratio of the allowed distance from the best performing run. + * Absolute distance allowed from the best performing run. */ - private Float slackFactor; + private Float slackAmount; /* - * Absolute distance allowed from the best performing run. + * Ratio of the allowed distance from the best performing run. */ - private Float slackAmount; + private Float slackFactor; /** * Creates an instance of BanditPolicy class. @@ -47,42 +47,42 @@ public EarlyTerminationPolicyType policyType() { } /** - * Get the slackFactor property: Ratio of the allowed distance from the best performing run. + * Get the slackAmount property: Absolute distance allowed from the best performing run. * - * @return the slackFactor value. + * @return the slackAmount value. */ - public Float slackFactor() { - return this.slackFactor; + public Float slackAmount() { + return this.slackAmount; } /** - * Set the slackFactor property: Ratio of the allowed distance from the best performing run. + * Set the slackAmount property: Absolute distance allowed from the best performing run. * - * @param slackFactor the slackFactor value to set. + * @param slackAmount the slackAmount value to set. * @return the BanditPolicy object itself. */ - public BanditPolicy withSlackFactor(Float slackFactor) { - this.slackFactor = slackFactor; + public BanditPolicy withSlackAmount(Float slackAmount) { + this.slackAmount = slackAmount; return this; } /** - * Get the slackAmount property: Absolute distance allowed from the best performing run. + * Get the slackFactor property: Ratio of the allowed distance from the best performing run. * - * @return the slackAmount value. + * @return the slackFactor value. */ - public Float slackAmount() { - return this.slackAmount; + public Float slackFactor() { + return this.slackFactor; } /** - * Set the slackAmount property: Absolute distance allowed from the best performing run. + * Set the slackFactor property: Ratio of the allowed distance from the best performing run. * - * @param slackAmount the slackAmount value to set. + * @param slackFactor the slackFactor value to set. * @return the BanditPolicy object itself. */ - public BanditPolicy withSlackAmount(Float slackAmount) { - this.slackAmount = slackAmount; + public BanditPolicy withSlackFactor(Float slackFactor) { + this.slackFactor = slackFactor; return this; } @@ -90,8 +90,8 @@ public BanditPolicy withSlackAmount(Float slackAmount) { * {@inheritDoc} */ @Override - public BanditPolicy withEvaluationInterval(Integer evaluationInterval) { - super.withEvaluationInterval(evaluationInterval); + public BanditPolicy withDelayEvaluation(Integer delayEvaluation) { + super.withDelayEvaluation(delayEvaluation); return this; } @@ -99,8 +99,8 @@ public BanditPolicy withEvaluationInterval(Integer evaluationInterval) { * {@inheritDoc} */ @Override - public BanditPolicy withDelayEvaluation(Integer delayEvaluation) { - super.withDelayEvaluation(delayEvaluation); + public BanditPolicy withEvaluationInterval(Integer evaluationInterval) { + super.withEvaluationInterval(evaluationInterval); return this; } @@ -111,7 +111,6 @@ public BanditPolicy withDelayEvaluation(Integer delayEvaluation) { */ @Override public void validate() { - super.validate(); } /** @@ -120,11 +119,11 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("evaluationInterval", evaluationInterval()); jsonWriter.writeNumberField("delayEvaluation", delayEvaluation()); + jsonWriter.writeNumberField("evaluationInterval", evaluationInterval()); jsonWriter.writeStringField("policyType", this.policyType == null ? null : this.policyType.toString()); - jsonWriter.writeNumberField("slackFactor", this.slackFactor); jsonWriter.writeNumberField("slackAmount", this.slackAmount); + jsonWriter.writeNumberField("slackFactor", this.slackFactor); return jsonWriter.writeEndObject(); } @@ -143,16 +142,16 @@ public static BanditPolicy fromJson(JsonReader jsonReader) throws IOException { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("evaluationInterval".equals(fieldName)) { - deserializedBanditPolicy.withEvaluationInterval(reader.getNullable(JsonReader::getInt)); - } else if ("delayEvaluation".equals(fieldName)) { + if ("delayEvaluation".equals(fieldName)) { deserializedBanditPolicy.withDelayEvaluation(reader.getNullable(JsonReader::getInt)); + } else if ("evaluationInterval".equals(fieldName)) { + deserializedBanditPolicy.withEvaluationInterval(reader.getNullable(JsonReader::getInt)); } else if ("policyType".equals(fieldName)) { deserializedBanditPolicy.policyType = EarlyTerminationPolicyType.fromString(reader.getString()); - } else if ("slackFactor".equals(fieldName)) { - deserializedBanditPolicy.slackFactor = reader.getNullable(JsonReader::getFloat); } else if ("slackAmount".equals(fieldName)) { deserializedBanditPolicy.slackAmount = reader.getNullable(JsonReader::getFloat); + } else if ("slackFactor".equals(fieldName)) { + deserializedBanditPolicy.slackFactor = reader.getNullable(JsonReader::getFloat); } else { reader.skipChildren(); } 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 b79d166cd256c..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 @@ -50,11 +50,11 @@ public interface BatchDeployment { Map tags(); /** - * Gets the properties property: [Required] Additional attributes of the entity. + * Gets the identity property: Managed service identity (system assigned and/or user assigned identities). * - * @return the properties value. + * @return the identity value. */ - BatchDeploymentProperties properties(); + ManagedServiceIdentity identity(); /** * Gets the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of @@ -65,11 +65,11 @@ public interface BatchDeployment { String kind(); /** - * Gets the identity property: Managed service identity (system assigned and/or user assigned identities). + * Gets the properties property: [Required] Additional attributes of the entity. * - * @return the identity value. + * @return the properties value. */ - ManagedServiceIdentity identity(); + BatchDeploymentProperties properties(); /** * Gets the sku property: Sku details required for ARM contract for Autoscaling. @@ -184,8 +184,8 @@ interface WithProperties { * 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.WithKind, - DefinitionStages.WithIdentity, DefinitionStages.WithSku { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, + DefinitionStages.WithKind, DefinitionStages.WithSku { /** * Executes the create request. * @@ -216,32 +216,32 @@ interface WithTags { } /** - * The stage of the BatchDeployment definition allowing to specify kind. + * The stage of the BatchDeployment definition allowing to specify identity. */ - interface WithKind { + interface WithIdentity { /** - * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for - * resources of the same type.. + * Specifies the identity property: Managed service identity (system assigned and/or user assigned + * identities). * - * @param kind Metadata used by portal/tooling/etc to render different UX experiences for resources of the - * same type. + * @param identity Managed service identity (system assigned and/or user assigned identities). * @return the next definition stage. */ - WithCreate withKind(String kind); + WithCreate withIdentity(ManagedServiceIdentity identity); } /** - * The stage of the BatchDeployment definition allowing to specify identity. + * The stage of the BatchDeployment definition allowing to specify kind. */ - interface WithIdentity { + interface WithKind { /** - * Specifies the identity property: Managed service identity (system assigned and/or user assigned - * identities). + * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for + * resources of the same type.. * - * @param identity Managed service identity (system assigned and/or user assigned identities). + * @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 withIdentity(ManagedServiceIdentity identity); + WithCreate withKind(String kind); } /** 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 c42c99f95b9cd..37b6e2da31916 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 @@ -36,10 +36,14 @@ public final class BatchDeploymentProperties extends EndpointDeploymentPropertie private Integer errorThreshold; /* - * Retry Settings for the batch inference operation. - * If not provided, will default to the defaults defined in BatchRetrySettings. + * Logging level for batch inference operation. */ - private BatchRetrySettings retrySettings; + private BatchLoggingLevel loggingLevel; + + /* + * Indicates maximum number of parallelism per instance. + */ + private Integer maxConcurrencyPerInstance; /* * Size of the mini-batch passed to each batch invocation. @@ -48,21 +52,11 @@ public final class BatchDeploymentProperties extends EndpointDeploymentPropertie */ private Long miniBatchSize; - /* - * Logging level for batch inference operation. - */ - private BatchLoggingLevel loggingLevel; - /* * Reference to the model asset for the endpoint deployment. */ private AssetReferenceBase model; - /* - * Indicates maximum number of parallelism per instance. - */ - private Integer maxConcurrencyPerInstance; - /* * Indicates how the output will be organized. */ @@ -73,6 +67,11 @@ public final class BatchDeploymentProperties extends EndpointDeploymentPropertie */ private String outputFileName; + /* + * Provisioning state for the endpoint deployment. + */ + private DeploymentProvisioningState provisioningState; + /* * Indicates compute configuration for the job. * If not provided, will default to the defaults defined in ResourceConfiguration. @@ -80,9 +79,10 @@ public final class BatchDeploymentProperties extends EndpointDeploymentPropertie private DeploymentResourceConfiguration resources; /* - * Provisioning state for the endpoint deployment. + * Retry Settings for the batch inference operation. + * If not provided, will default to the defaults defined in BatchRetrySettings. */ - private DeploymentProvisioningState provisioningState; + private BatchRetrySettings retrySettings; /** * Creates an instance of BatchDeploymentProperties class. @@ -159,68 +159,66 @@ public BatchDeploymentProperties withErrorThreshold(Integer errorThreshold) { } /** - * Get the retrySettings property: Retry Settings for the batch inference operation. - * If not provided, will default to the defaults defined in BatchRetrySettings. + * Get the loggingLevel property: Logging level for batch inference operation. * - * @return the retrySettings value. + * @return the loggingLevel value. */ - public BatchRetrySettings retrySettings() { - return this.retrySettings; + public BatchLoggingLevel loggingLevel() { + return this.loggingLevel; } /** - * Set the retrySettings property: Retry Settings for the batch inference operation. - * If not provided, will default to the defaults defined in BatchRetrySettings. + * Set the loggingLevel property: Logging level for batch inference operation. * - * @param retrySettings the retrySettings value to set. + * @param loggingLevel the loggingLevel value to set. * @return the BatchDeploymentProperties object itself. */ - public BatchDeploymentProperties withRetrySettings(BatchRetrySettings retrySettings) { - this.retrySettings = retrySettings; + public BatchDeploymentProperties withLoggingLevel(BatchLoggingLevel loggingLevel) { + this.loggingLevel = loggingLevel; return this; } /** - * 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 maxConcurrencyPerInstance property: Indicates maximum number of parallelism per instance. * - * @return the miniBatchSize value. + * @return the maxConcurrencyPerInstance value. */ - public Long miniBatchSize() { - return this.miniBatchSize; + public Integer maxConcurrencyPerInstance() { + return this.maxConcurrencyPerInstance; } /** - * 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 maxConcurrencyPerInstance property: Indicates maximum number of parallelism per instance. * - * @param miniBatchSize the miniBatchSize value to set. + * @param maxConcurrencyPerInstance the maxConcurrencyPerInstance value to set. * @return the BatchDeploymentProperties object itself. */ - public BatchDeploymentProperties withMiniBatchSize(Long miniBatchSize) { - this.miniBatchSize = miniBatchSize; + public BatchDeploymentProperties withMaxConcurrencyPerInstance(Integer maxConcurrencyPerInstance) { + this.maxConcurrencyPerInstance = maxConcurrencyPerInstance; return this; } /** - * Get the loggingLevel property: Logging level for batch inference operation. + * 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 loggingLevel value. + * @return the miniBatchSize value. */ - public BatchLoggingLevel loggingLevel() { - return this.loggingLevel; + public Long miniBatchSize() { + return this.miniBatchSize; } /** - * Set the loggingLevel property: Logging level for batch inference operation. + * 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 loggingLevel the loggingLevel value to set. + * @param miniBatchSize the miniBatchSize value to set. * @return the BatchDeploymentProperties object itself. */ - public BatchDeploymentProperties withLoggingLevel(BatchLoggingLevel loggingLevel) { - this.loggingLevel = loggingLevel; + public BatchDeploymentProperties withMiniBatchSize(Long miniBatchSize) { + this.miniBatchSize = miniBatchSize; return this; } @@ -244,26 +242,6 @@ public BatchDeploymentProperties withModel(AssetReferenceBase model) { return this; } - /** - * Get the maxConcurrencyPerInstance property: Indicates maximum number of parallelism per instance. - * - * @return the maxConcurrencyPerInstance value. - */ - public Integer maxConcurrencyPerInstance() { - return this.maxConcurrencyPerInstance; - } - - /** - * Set the maxConcurrencyPerInstance property: Indicates maximum number of parallelism per instance. - * - * @param maxConcurrencyPerInstance the maxConcurrencyPerInstance value to set. - * @return the BatchDeploymentProperties object itself. - */ - public BatchDeploymentProperties withMaxConcurrencyPerInstance(Integer maxConcurrencyPerInstance) { - this.maxConcurrencyPerInstance = maxConcurrencyPerInstance; - return this; - } - /** * Get the outputAction property: Indicates how the output will be organized. * @@ -304,6 +282,15 @@ public BatchDeploymentProperties withOutputFileName(String outputFileName) { return this; } + /** + * Get the provisioningState property: Provisioning state for the endpoint deployment. + * + * @return the provisioningState value. + */ + public DeploymentProvisioningState provisioningState() { + return this.provisioningState; + } + /** * Get the resources property: Indicates compute configuration for the job. * If not provided, will default to the defaults defined in ResourceConfiguration. @@ -327,20 +314,24 @@ public BatchDeploymentProperties withResources(DeploymentResourceConfiguration r } /** - * Get the provisioningState property: Provisioning state for the endpoint deployment. + * Get the retrySettings property: Retry Settings for the batch inference operation. + * If not provided, will default to the defaults defined in BatchRetrySettings. * - * @return the provisioningState value. + * @return the retrySettings value. */ - public DeploymentProvisioningState provisioningState() { - return this.provisioningState; + public BatchRetrySettings retrySettings() { + return this.retrySettings; } /** - * {@inheritDoc} + * 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. */ - @Override - public BatchDeploymentProperties withDescription(String description) { - super.withDescription(description); + public BatchDeploymentProperties withRetrySettings(BatchRetrySettings retrySettings) { + this.retrySettings = retrySettings; return this; } @@ -348,8 +339,8 @@ public BatchDeploymentProperties withDescription(String description) { * {@inheritDoc} */ @Override - public BatchDeploymentProperties withProperties(Map properties) { - super.withProperties(properties); + public BatchDeploymentProperties withCodeConfiguration(CodeConfiguration codeConfiguration) { + super.withCodeConfiguration(codeConfiguration); return this; } @@ -357,8 +348,8 @@ public BatchDeploymentProperties withProperties(Map properties) * {@inheritDoc} */ @Override - public BatchDeploymentProperties withCodeConfiguration(CodeConfiguration codeConfiguration) { - super.withCodeConfiguration(codeConfiguration); + public BatchDeploymentProperties withDescription(String description) { + super.withDescription(description); return this; } @@ -380,6 +371,15 @@ public BatchDeploymentProperties withEnvironmentVariables(Map en return this; } + /** + * {@inheritDoc} + */ + @Override + public BatchDeploymentProperties withProperties(Map properties) { + super.withProperties(properties); + return this; + } + /** * Validates the instance. * @@ -387,19 +387,21 @@ public BatchDeploymentProperties withEnvironmentVariables(Map en */ @Override public void validate() { - super.validate(); if (deploymentConfiguration() != null) { deploymentConfiguration().validate(); } - if (retrySettings() != null) { - retrySettings().validate(); - } if (model() != null) { model().validate(); } if (resources() != null) { resources().validate(); } + if (retrySettings() != null) { + retrySettings().validate(); + } + if (codeConfiguration() != null) { + codeConfiguration().validate(); + } } /** @@ -408,23 +410,23 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("codeConfiguration", codeConfiguration()); + jsonWriter.writeStringField("description", description()); jsonWriter.writeStringField("environmentId", environmentId()); jsonWriter.writeMapField("environmentVariables", environmentVariables(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("compute", this.compute); jsonWriter.writeJsonField("deploymentConfiguration", this.deploymentConfiguration); jsonWriter.writeNumberField("errorThreshold", this.errorThreshold); - jsonWriter.writeJsonField("retrySettings", this.retrySettings); - jsonWriter.writeNumberField("miniBatchSize", this.miniBatchSize); jsonWriter.writeStringField("loggingLevel", this.loggingLevel == null ? null : this.loggingLevel.toString()); - jsonWriter.writeJsonField("model", this.model); jsonWriter.writeNumberField("maxConcurrencyPerInstance", this.maxConcurrencyPerInstance); + jsonWriter.writeNumberField("miniBatchSize", this.miniBatchSize); + jsonWriter.writeJsonField("model", this.model); jsonWriter.writeStringField("outputAction", this.outputAction == null ? null : this.outputAction.toString()); jsonWriter.writeStringField("outputFileName", this.outputFileName); jsonWriter.writeJsonField("resources", this.resources); + jsonWriter.writeJsonField("retrySettings", this.retrySettings); return jsonWriter.writeEndObject(); } @@ -443,18 +445,18 @@ public static BatchDeploymentProperties fromJson(JsonReader jsonReader) throws I String fieldName = reader.getFieldName(); reader.nextToken(); - if ("description".equals(fieldName)) { - deserializedBatchDeploymentProperties.withDescription(reader.getString()); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedBatchDeploymentProperties.withProperties(properties); - } else if ("codeConfiguration".equals(fieldName)) { + if ("codeConfiguration".equals(fieldName)) { deserializedBatchDeploymentProperties.withCodeConfiguration(CodeConfiguration.fromJson(reader)); + } else if ("description".equals(fieldName)) { + deserializedBatchDeploymentProperties.withDescription(reader.getString()); } else if ("environmentId".equals(fieldName)) { deserializedBatchDeploymentProperties.withEnvironmentId(reader.getString()); } else if ("environmentVariables".equals(fieldName)) { Map environmentVariables = reader.readMap(reader1 -> reader1.getString()); deserializedBatchDeploymentProperties.withEnvironmentVariables(environmentVariables); + } else if ("properties".equals(fieldName)) { + Map properties = reader.readMap(reader1 -> reader1.getString()); + deserializedBatchDeploymentProperties.withProperties(properties); } else if ("compute".equals(fieldName)) { deserializedBatchDeploymentProperties.compute = reader.getString(); } else if ("deploymentConfiguration".equals(fieldName)) { @@ -462,28 +464,28 @@ public static BatchDeploymentProperties fromJson(JsonReader jsonReader) throws I = BatchDeploymentConfiguration.fromJson(reader); } else if ("errorThreshold".equals(fieldName)) { deserializedBatchDeploymentProperties.errorThreshold = reader.getNullable(JsonReader::getInt); - } else if ("retrySettings".equals(fieldName)) { - deserializedBatchDeploymentProperties.retrySettings = BatchRetrySettings.fromJson(reader); - } else if ("miniBatchSize".equals(fieldName)) { - deserializedBatchDeploymentProperties.miniBatchSize = reader.getNullable(JsonReader::getLong); } else if ("loggingLevel".equals(fieldName)) { deserializedBatchDeploymentProperties.loggingLevel = BatchLoggingLevel.fromString(reader.getString()); - } else if ("model".equals(fieldName)) { - deserializedBatchDeploymentProperties.model = AssetReferenceBase.fromJson(reader); } else if ("maxConcurrencyPerInstance".equals(fieldName)) { deserializedBatchDeploymentProperties.maxConcurrencyPerInstance = reader.getNullable(JsonReader::getInt); + } else if ("miniBatchSize".equals(fieldName)) { + deserializedBatchDeploymentProperties.miniBatchSize = reader.getNullable(JsonReader::getLong); + } else if ("model".equals(fieldName)) { + deserializedBatchDeploymentProperties.model = AssetReferenceBase.fromJson(reader); } else if ("outputAction".equals(fieldName)) { deserializedBatchDeploymentProperties.outputAction = BatchOutputAction.fromString(reader.getString()); } else if ("outputFileName".equals(fieldName)) { deserializedBatchDeploymentProperties.outputFileName = reader.getString(); - } else if ("resources".equals(fieldName)) { - deserializedBatchDeploymentProperties.resources = DeploymentResourceConfiguration.fromJson(reader); } else if ("provisioningState".equals(fieldName)) { deserializedBatchDeploymentProperties.provisioningState = DeploymentProvisioningState.fromString(reader.getString()); + } else if ("resources".equals(fieldName)) { + deserializedBatchDeploymentProperties.resources = DeploymentResourceConfiguration.fromJson(reader); + } else if ("retrySettings".equals(fieldName)) { + deserializedBatchDeploymentProperties.retrySettings = BatchRetrySettings.fromJson(reader); } else { reader.skipChildren(); } 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 e51a5f0a57485..717749f548855 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 @@ -20,14 +20,14 @@ public final class BatchDeploymentTrackedResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type BatchDeployment. + * The link to the next page of BatchDeployment objects. If null, there are no additional pages. */ - private List value; + private String nextLink; /* - * The link to the next page of BatchDeployment objects. If null, there are no additional pages. + * An array of objects of type BatchDeployment. */ - private String nextLink; + private List value; /** * Creates an instance of BatchDeploymentTrackedResourceArmPaginatedResult class. @@ -36,44 +36,44 @@ public BatchDeploymentTrackedResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type BatchDeployment. + * Get the nextLink property: The link to the next page of BatchDeployment objects. If null, there are no additional + * pages. * - * @return the value value. + * @return the nextLink value. */ - public List value() { - return this.value; + public String nextLink() { + return this.nextLink; } /** - * Set the value property: An array of objects of type BatchDeployment. + * Set the nextLink property: The link to the next page of BatchDeployment objects. If null, there are no additional + * pages. * - * @param value the value value to set. + * @param nextLink the nextLink value to set. * @return the BatchDeploymentTrackedResourceArmPaginatedResult object itself. */ - public BatchDeploymentTrackedResourceArmPaginatedResult withValue(List value) { - this.value = value; + public BatchDeploymentTrackedResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; return this; } /** - * Get the nextLink property: The link to the next page of BatchDeployment objects. If null, there are no additional - * pages. + * Get the value property: An array of objects of type BatchDeployment. * - * @return the nextLink value. + * @return the value value. */ - public String nextLink() { - return this.nextLink; + public List value() { + return this.value; } /** - * Set the nextLink property: The link to the next page of BatchDeployment objects. If null, there are no additional - * pages. + * Set the value property: An array of objects of type BatchDeployment. * - * @param nextLink the nextLink value to set. + * @param value the value value to set. * @return the BatchDeploymentTrackedResourceArmPaginatedResult object itself. */ - public BatchDeploymentTrackedResourceArmPaginatedResult withNextLink(String nextLink) { - this.nextLink = nextLink; + public BatchDeploymentTrackedResourceArmPaginatedResult withValue(List value) { + this.value = value; return this; } @@ -94,8 +94,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -115,12 +115,12 @@ public static BatchDeploymentTrackedResourceArmPaginatedResult fromJson(JsonRead String fieldName = reader.getFieldName(); reader.nextToken(); - if ("value".equals(fieldName)) { + if ("nextLink".equals(fieldName)) { + deserializedBatchDeploymentTrackedResourceArmPaginatedResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> BatchDeploymentInner.fromJson(reader1)); deserializedBatchDeploymentTrackedResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedBatchDeploymentTrackedResourceArmPaginatedResult.nextLink = reader.getString(); } else { reader.skipChildren(); } 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 33ce2fff6eaac..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 @@ -51,11 +51,11 @@ public interface BatchEndpoint { Map tags(); /** - * Gets the properties property: [Required] Additional attributes of the entity. + * Gets the identity property: Managed service identity (system assigned and/or user assigned identities). * - * @return the properties value. + * @return the identity value. */ - BatchEndpointProperties properties(); + ManagedServiceIdentity identity(); /** * Gets the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of @@ -66,11 +66,11 @@ public interface BatchEndpoint { String kind(); /** - * Gets the identity property: Managed service identity (system assigned and/or user assigned identities). + * Gets the properties property: [Required] Additional attributes of the entity. * - * @return the identity value. + * @return the properties value. */ - ManagedServiceIdentity identity(); + BatchEndpointProperties properties(); /** * Gets the sku property: Sku details required for ARM contract for Autoscaling. @@ -183,8 +183,8 @@ interface WithProperties { * 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.WithKind, - DefinitionStages.WithIdentity, DefinitionStages.WithSku { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, + DefinitionStages.WithKind, DefinitionStages.WithSku { /** * Executes the create request. * @@ -215,32 +215,32 @@ interface WithTags { } /** - * The stage of the BatchEndpoint definition allowing to specify kind. + * The stage of the BatchEndpoint definition allowing to specify identity. */ - interface WithKind { + interface WithIdentity { /** - * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for - * resources of the same type.. + * Specifies the identity property: Managed service identity (system assigned and/or user assigned + * identities). * - * @param kind Metadata used by portal/tooling/etc to render different UX experiences for resources of the - * same type. + * @param identity Managed service identity (system assigned and/or user assigned identities). * @return the next definition stage. */ - WithCreate withKind(String kind); + WithCreate withIdentity(ManagedServiceIdentity identity); } /** - * The stage of the BatchEndpoint definition allowing to specify identity. + * The stage of the BatchEndpoint definition allowing to specify kind. */ - interface WithIdentity { + interface WithKind { /** - * Specifies the identity property: Managed service identity (system assigned and/or user assigned - * identities). + * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for + * resources of the same type.. * - * @param identity Managed service identity (system assigned and/or user assigned identities). + * @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 withIdentity(ManagedServiceIdentity identity); + WithCreate withKind(String kind); } /** 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 db17ddd4397bd..f2e4611869a7d 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 @@ -5,6 +5,7 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -29,14 +30,14 @@ public final class BatchEndpointProperties extends EndpointPropertiesBaseInner { private EndpointProvisioningState provisioningState; /* - * Endpoint URI. + * Endpoint Swagger URI. */ - private String scoringUri; + private String swaggerUri; /* - * Endpoint Swagger URI. + * Endpoint URI. */ - private String swaggerUri; + private String scoringUri; /** * Creates an instance of BatchEndpointProperties class. @@ -74,31 +75,31 @@ public EndpointProvisioningState provisioningState() { } /** - * Get the scoringUri property: Endpoint URI. + * Get the swaggerUri property: Endpoint Swagger URI. * - * @return the scoringUri value. + * @return the swaggerUri value. */ @Override - public String scoringUri() { - return this.scoringUri; + public String swaggerUri() { + return this.swaggerUri; } /** - * Get the swaggerUri property: Endpoint Swagger URI. + * Get the scoringUri property: Endpoint URI. * - * @return the swaggerUri value. + * @return the scoringUri value. */ @Override - public String swaggerUri() { - return this.swaggerUri; + public String scoringUri() { + return this.scoringUri; } /** * {@inheritDoc} */ @Override - public BatchEndpointProperties withDescription(String description) { - super.withDescription(description); + public BatchEndpointProperties withAuthMode(EndpointAuthMode authMode) { + super.withAuthMode(authMode); return this; } @@ -106,8 +107,8 @@ public BatchEndpointProperties withDescription(String description) { * {@inheritDoc} */ @Override - public BatchEndpointProperties withProperties(Map properties) { - super.withProperties(properties); + public BatchEndpointProperties withDescription(String description) { + super.withDescription(description); return this; } @@ -115,8 +116,8 @@ public BatchEndpointProperties withProperties(Map properties) { * {@inheritDoc} */ @Override - public BatchEndpointProperties withAuthMode(EndpointAuthMode authMode) { - super.withAuthMode(authMode); + public BatchEndpointProperties withKeys(EndpointAuthKeysInner keys) { + super.withKeys(keys); return this; } @@ -124,8 +125,8 @@ public BatchEndpointProperties withAuthMode(EndpointAuthMode authMode) { * {@inheritDoc} */ @Override - public BatchEndpointProperties withKeys(EndpointAuthKeysInner keys) { - super.withKeys(keys); + public BatchEndpointProperties withProperties(Map properties) { + super.withProperties(properties); return this; } @@ -136,12 +137,21 @@ public BatchEndpointProperties withKeys(EndpointAuthKeysInner keys) { */ @Override public void validate() { - super.validate(); if (defaults() != null) { defaults().validate(); } + if (authMode() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property authMode in model BatchEndpointProperties")); + } + if (keys() != null) { + keys().validate(); + } } + private static final ClientLogger LOGGER = new ClientLogger(BatchEndpointProperties.class); + /** * {@inheritDoc} */ @@ -150,8 +160,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("authMode", authMode() == null ? null : authMode().toString()); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("keys", keys()); + jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("defaults", this.defaults); return jsonWriter.writeEndObject(); } @@ -176,6 +186,8 @@ public static BatchEndpointProperties fromJson(JsonReader jsonReader) throws IOE deserializedBatchEndpointProperties.withAuthMode(EndpointAuthMode.fromString(reader.getString())); } else if ("description".equals(fieldName)) { deserializedBatchEndpointProperties.withDescription(reader.getString()); + } else if ("keys".equals(fieldName)) { + deserializedBatchEndpointProperties.withKeys(EndpointAuthKeysInner.fromJson(reader)); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedBatchEndpointProperties.withProperties(properties); @@ -183,8 +195,6 @@ public static BatchEndpointProperties fromJson(JsonReader jsonReader) throws IOE deserializedBatchEndpointProperties.scoringUri = reader.getString(); } else if ("swaggerUri".equals(fieldName)) { deserializedBatchEndpointProperties.swaggerUri = reader.getString(); - } else if ("keys".equals(fieldName)) { - deserializedBatchEndpointProperties.withKeys(EndpointAuthKeysInner.fromJson(reader)); } else if ("defaults".equals(fieldName)) { deserializedBatchEndpointProperties.defaults = BatchEndpointDefaults.fromJson(reader); } else if ("provisioningState".equals(fieldName)) { 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 14d9c1bc8b600..14ad65c6b3211 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 @@ -20,14 +20,14 @@ public final class BatchEndpointTrackedResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type BatchEndpoint. + * The link to the next page of BatchEndpoint objects. If null, there are no additional pages. */ - private List value; + private String nextLink; /* - * The link to the next page of BatchEndpoint objects. If null, there are no additional pages. + * An array of objects of type BatchEndpoint. */ - private String nextLink; + private List value; /** * Creates an instance of BatchEndpointTrackedResourceArmPaginatedResult class. @@ -36,44 +36,44 @@ public BatchEndpointTrackedResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type BatchEndpoint. + * Get the nextLink property: The link to the next page of BatchEndpoint objects. If null, there are no additional + * pages. * - * @return the value value. + * @return the nextLink value. */ - public List value() { - return this.value; + public String nextLink() { + return this.nextLink; } /** - * Set the value property: An array of objects of type BatchEndpoint. + * Set the nextLink property: The link to the next page of BatchEndpoint objects. If null, there are no additional + * pages. * - * @param value the value value to set. + * @param nextLink the nextLink value to set. * @return the BatchEndpointTrackedResourceArmPaginatedResult object itself. */ - public BatchEndpointTrackedResourceArmPaginatedResult withValue(List value) { - this.value = value; + public BatchEndpointTrackedResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; return this; } /** - * Get the nextLink property: The link to the next page of BatchEndpoint objects. If null, there are no additional - * pages. + * Get the value property: An array of objects of type BatchEndpoint. * - * @return the nextLink value. + * @return the value value. */ - public String nextLink() { - return this.nextLink; + public List value() { + return this.value; } /** - * Set the nextLink property: The link to the next page of BatchEndpoint objects. If null, there are no additional - * pages. + * Set the value property: An array of objects of type BatchEndpoint. * - * @param nextLink the nextLink value to set. + * @param value the value value to set. * @return the BatchEndpointTrackedResourceArmPaginatedResult object itself. */ - public BatchEndpointTrackedResourceArmPaginatedResult withNextLink(String nextLink) { - this.nextLink = nextLink; + public BatchEndpointTrackedResourceArmPaginatedResult withValue(List value) { + this.value = value; return this; } @@ -94,8 +94,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -115,11 +115,11 @@ public static BatchEndpointTrackedResourceArmPaginatedResult fromJson(JsonReader String fieldName = reader.getFieldName(); reader.nextToken(); - if ("value".equals(fieldName)) { + if ("nextLink".equals(fieldName)) { + deserializedBatchEndpointTrackedResourceArmPaginatedResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> BatchEndpointInner.fromJson(reader1)); deserializedBatchEndpointTrackedResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedBatchEndpointTrackedResourceArmPaginatedResult.nextLink = reader.getString(); } else { reader.skipChildren(); } 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 index 0f9049644ad90..9976f187fd4bc 100644 --- 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 @@ -145,7 +145,6 @@ public BatchPipelineComponentDeploymentConfiguration withTags(Map { 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 index 5da4b053005d2..ad0dc35c844ba 100644 --- 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 @@ -23,14 +23,14 @@ public final class BlobReferenceForConsumptionDto implements JsonSerializable { + /** + * Static value Agents for CapabilityHostKind. + */ + public static final CapabilityHostKind AGENTS = fromString("Agents"); + + /** + * Creates a new instance of CapabilityHostKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CapabilityHostKind() { + } + + /** + * Creates or finds a CapabilityHostKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding CapabilityHostKind. + */ + public static CapabilityHostKind fromString(String name) { + return fromString(name, CapabilityHostKind.class); + } + + /** + * Gets known CapabilityHostKind values. + * + * @return known CapabilityHostKind values. + */ + public static Collection values() { + return values(CapabilityHostKind.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHostProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHostProperties.java new file mode 100644 index 0000000000000..4341e806ff3e5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHostProperties.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.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * The CapabilityHostProperties model. + */ +@Fluent +public final class CapabilityHostProperties extends ResourceBase { + /* + * List of AI services connections. + */ + private List aiServicesConnections; + + /* + * Kind of this capability host. + */ + private CapabilityHostKind capabilityHostKind; + + /* + * Customer subnet info to help set up this capability host. + */ + private String customerSubnet; + + /* + * Provisioning state for the CapabilityHost. + */ + private CapabilityHostProvisioningState provisioningState; + + /* + * List of Storage connections. + */ + private List storageConnections; + + /* + * List of VectorStore connections. + */ + private List vectorStoreConnections; + + /** + * Creates an instance of CapabilityHostProperties class. + */ + public CapabilityHostProperties() { + } + + /** + * Get the aiServicesConnections property: List of AI services connections. + * + * @return the aiServicesConnections value. + */ + public List aiServicesConnections() { + return this.aiServicesConnections; + } + + /** + * Set the aiServicesConnections property: List of AI services connections. + * + * @param aiServicesConnections the aiServicesConnections value to set. + * @return the CapabilityHostProperties object itself. + */ + public CapabilityHostProperties withAiServicesConnections(List aiServicesConnections) { + this.aiServicesConnections = aiServicesConnections; + return this; + } + + /** + * Get the capabilityHostKind property: Kind of this capability host. + * + * @return the capabilityHostKind value. + */ + public CapabilityHostKind capabilityHostKind() { + return this.capabilityHostKind; + } + + /** + * Set the capabilityHostKind property: Kind of this capability host. + * + * @param capabilityHostKind the capabilityHostKind value to set. + * @return the CapabilityHostProperties object itself. + */ + public CapabilityHostProperties withCapabilityHostKind(CapabilityHostKind capabilityHostKind) { + this.capabilityHostKind = capabilityHostKind; + return this; + } + + /** + * Get the customerSubnet property: Customer subnet info to help set up this capability host. + * + * @return the customerSubnet value. + */ + public String customerSubnet() { + return this.customerSubnet; + } + + /** + * Set the customerSubnet property: Customer subnet info to help set up this capability host. + * + * @param customerSubnet the customerSubnet value to set. + * @return the CapabilityHostProperties object itself. + */ + public CapabilityHostProperties withCustomerSubnet(String customerSubnet) { + this.customerSubnet = customerSubnet; + return this; + } + + /** + * Get the provisioningState property: Provisioning state for the CapabilityHost. + * + * @return the provisioningState value. + */ + public CapabilityHostProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the storageConnections property: List of Storage connections. + * + * @return the storageConnections value. + */ + public List storageConnections() { + return this.storageConnections; + } + + /** + * Set the storageConnections property: List of Storage connections. + * + * @param storageConnections the storageConnections value to set. + * @return the CapabilityHostProperties object itself. + */ + public CapabilityHostProperties withStorageConnections(List storageConnections) { + this.storageConnections = storageConnections; + return this; + } + + /** + * Get the vectorStoreConnections property: List of VectorStore connections. + * + * @return the vectorStoreConnections value. + */ + public List vectorStoreConnections() { + return this.vectorStoreConnections; + } + + /** + * Set the vectorStoreConnections property: List of VectorStore connections. + * + * @param vectorStoreConnections the vectorStoreConnections value to set. + * @return the CapabilityHostProperties object itself. + */ + public CapabilityHostProperties withVectorStoreConnections(List vectorStoreConnections) { + this.vectorStoreConnections = vectorStoreConnections; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public CapabilityHostProperties withDescription(String description) { + super.withDescription(description); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public CapabilityHostProperties withProperties(Map properties) { + super.withProperties(properties); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public CapabilityHostProperties withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("description", description()); + jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("aiServicesConnections", this.aiServicesConnections, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("capabilityHostKind", + this.capabilityHostKind == null ? null : this.capabilityHostKind.toString()); + jsonWriter.writeStringField("customerSubnet", this.customerSubnet); + jsonWriter.writeArrayField("storageConnections", this.storageConnections, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("vectorStoreConnections", this.vectorStoreConnections, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CapabilityHostProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CapabilityHostProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the CapabilityHostProperties. + */ + public static CapabilityHostProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CapabilityHostProperties deserializedCapabilityHostProperties = new CapabilityHostProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("description".equals(fieldName)) { + deserializedCapabilityHostProperties.withDescription(reader.getString()); + } else if ("properties".equals(fieldName)) { + Map properties = reader.readMap(reader1 -> reader1.getString()); + deserializedCapabilityHostProperties.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedCapabilityHostProperties.withTags(tags); + } else if ("aiServicesConnections".equals(fieldName)) { + List aiServicesConnections = reader.readArray(reader1 -> reader1.getString()); + deserializedCapabilityHostProperties.aiServicesConnections = aiServicesConnections; + } else if ("capabilityHostKind".equals(fieldName)) { + deserializedCapabilityHostProperties.capabilityHostKind + = CapabilityHostKind.fromString(reader.getString()); + } else if ("customerSubnet".equals(fieldName)) { + deserializedCapabilityHostProperties.customerSubnet = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedCapabilityHostProperties.provisioningState + = CapabilityHostProvisioningState.fromString(reader.getString()); + } else if ("storageConnections".equals(fieldName)) { + List storageConnections = reader.readArray(reader1 -> reader1.getString()); + deserializedCapabilityHostProperties.storageConnections = storageConnections; + } else if ("vectorStoreConnections".equals(fieldName)) { + List vectorStoreConnections = reader.readArray(reader1 -> reader1.getString()); + deserializedCapabilityHostProperties.vectorStoreConnections = vectorStoreConnections; + } else { + reader.skipChildren(); + } + } + + return deserializedCapabilityHostProperties; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHostProvisioningState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHostProvisioningState.java new file mode 100644 index 0000000000000..d90e28f897034 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHostProvisioningState.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.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Provisioning state of capability host. + */ +public final class CapabilityHostProvisioningState extends ExpandableStringEnum { + /** + * Static value Succeeded for CapabilityHostProvisioningState. + */ + public static final CapabilityHostProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for CapabilityHostProvisioningState. + */ + public static final CapabilityHostProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for CapabilityHostProvisioningState. + */ + public static final CapabilityHostProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Creating for CapabilityHostProvisioningState. + */ + public static final CapabilityHostProvisioningState CREATING = fromString("Creating"); + + /** + * Static value Updating for CapabilityHostProvisioningState. + */ + public static final CapabilityHostProvisioningState UPDATING = fromString("Updating"); + + /** + * Static value Deleting for CapabilityHostProvisioningState. + */ + public static final CapabilityHostProvisioningState DELETING = fromString("Deleting"); + + /** + * Creates a new instance of CapabilityHostProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CapabilityHostProvisioningState() { + } + + /** + * Creates or finds a CapabilityHostProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding CapabilityHostProvisioningState. + */ + public static CapabilityHostProvisioningState fromString(String name) { + return fromString(name, CapabilityHostProvisioningState.class); + } + + /** + * Gets known CapabilityHostProvisioningState values. + * + * @return known CapabilityHostProvisioningState values. + */ + public static Collection values() { + return values(CapabilityHostProvisioningState.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHosts.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHosts.java new file mode 100644 index 0000000000000..49657bf0ca14e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CapabilityHosts.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of CapabilityHosts. + */ +public interface CapabilityHosts { + /** + * Delete capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost 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 capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost 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 capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost 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 capabilityHost along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String workspaceName, String name, + Context context); + + /** + * Get capabilityHost. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName Name of Azure Machine Learning workspace. + * @param name CapabilityHost 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 capabilityHost. + */ + CapabilityHost get(String resourceGroupName, String workspaceName, String name); + + /** + * Get capabilityHost. + * + * @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 capabilityHost along with {@link Response}. + */ + CapabilityHost getById(String id); + + /** + * Get capabilityHost. + * + * @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 capabilityHost along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete capabilityHost. + * + * @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 capabilityHost. + * + * @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 CapabilityHost resource. + * + * @param name resource name. + * @return the first stage of the new CapabilityHost definition. + */ + CapabilityHost.DefinitionStages.Blank define(String name); +} 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 index 2e1427398f0f6..ee7dc0c1e3349 100644 --- 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 @@ -78,12 +78,14 @@ public CategoricalDataDriftMetricThreshold withThreshold(MonitoringThreshold thr */ @Override public void validate() { - super.validate(); if (metric() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( "Missing required property metric in model CategoricalDataDriftMetricThreshold")); } + if (threshold() != null) { + threshold().validate(); + } } 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/CategoricalDataQualityMetricThreshold.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalDataQualityMetricThreshold.java index 4862103be229a..3387c1c9dca1f 100644 --- 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 @@ -78,12 +78,14 @@ public CategoricalDataQualityMetricThreshold withThreshold(MonitoringThreshold t */ @Override public void validate() { - super.validate(); if (metric() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( "Missing required property metric in model CategoricalDataQualityMetricThreshold")); } + if (threshold() != null) { + threshold().validate(); + } } 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/CategoricalPredictionDriftMetricThreshold.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CategoricalPredictionDriftMetricThreshold.java index aa10da87d9dfd..d3100fb50c5d0 100644 --- 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 @@ -78,12 +78,14 @@ public CategoricalPredictionDriftMetricThreshold withThreshold(MonitoringThresho */ @Override public void validate() { - super.validate(); if (metric() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( "Missing required property metric in model CategoricalPredictionDriftMetricThreshold")); } + if (threshold() != null) { + threshold().validate(); + } } 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 e8526b485cec0..cb93a21f41bbd 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 @@ -28,31 +28,31 @@ public final class CertificateDatastoreCredentials extends DatastoreCredentials */ private String authorityUrl; + /* + * [Required] Service principal client ID. + */ + private UUID clientId; + /* * Resource the service principal has access to. */ private String resourceUrl; /* - * [Required] ID of the tenant to which the service principal belongs. + * [Required] Service principal secrets. */ - private UUID tenantId; + private CertificateDatastoreSecrets secrets; /* - * [Required] Service principal client ID. + * [Required] ID of the tenant to which the service principal belongs. */ - private UUID clientId; + private UUID tenantId; /* * [Required] Thumbprint of the certificate used for authentication. */ private String thumbprint; - /* - * [Required] Service principal secrets. - */ - private CertificateDatastoreSecrets secrets; - /** * Creates an instance of CertificateDatastoreCredentials class. */ @@ -89,6 +89,26 @@ public CertificateDatastoreCredentials withAuthorityUrl(String authorityUrl) { return this; } + /** + * Get the clientId property: [Required] Service principal client ID. + * + * @return the clientId value. + */ + public UUID clientId() { + return this.clientId; + } + + /** + * Set the clientId property: [Required] Service principal client ID. + * + * @param clientId the clientId value to set. + * @return the CertificateDatastoreCredentials object itself. + */ + public CertificateDatastoreCredentials withClientId(UUID clientId) { + this.clientId = clientId; + return this; + } + /** * Get the resourceUrl property: Resource the service principal has access to. * @@ -110,42 +130,42 @@ public CertificateDatastoreCredentials withResourceUrl(String resourceUrl) { } /** - * Get the tenantId property: [Required] ID of the tenant to which the service principal belongs. + * Get the secrets property: [Required] Service principal secrets. * - * @return the tenantId value. + * @return the secrets value. */ - public UUID tenantId() { - return this.tenantId; + public CertificateDatastoreSecrets secrets() { + return this.secrets; } /** - * Set the tenantId property: [Required] ID of the tenant to which the service principal belongs. + * Set the secrets property: [Required] Service principal secrets. * - * @param tenantId the tenantId value to set. + * @param secrets the secrets value to set. * @return the CertificateDatastoreCredentials object itself. */ - public CertificateDatastoreCredentials withTenantId(UUID tenantId) { - this.tenantId = tenantId; + public CertificateDatastoreCredentials withSecrets(CertificateDatastoreSecrets secrets) { + this.secrets = secrets; return this; } /** - * Get the clientId property: [Required] Service principal client ID. + * Get the tenantId property: [Required] ID of the tenant to which the service principal belongs. * - * @return the clientId value. + * @return the tenantId value. */ - public UUID clientId() { - return this.clientId; + public UUID tenantId() { + return this.tenantId; } /** - * Set the clientId property: [Required] Service principal client ID. + * Set the tenantId property: [Required] ID of the tenant to which the service principal belongs. * - * @param clientId the clientId value to set. + * @param tenantId the tenantId value to set. * @return the CertificateDatastoreCredentials object itself. */ - public CertificateDatastoreCredentials withClientId(UUID clientId) { - this.clientId = clientId; + public CertificateDatastoreCredentials withTenantId(UUID tenantId) { + this.tenantId = tenantId; return this; } @@ -169,26 +189,6 @@ public CertificateDatastoreCredentials withThumbprint(String thumbprint) { return this; } - /** - * Get the secrets property: [Required] Service principal secrets. - * - * @return the secrets value. - */ - public CertificateDatastoreSecrets secrets() { - return this.secrets; - } - - /** - * Set the secrets property: [Required] Service principal secrets. - * - * @param secrets the secrets value to set. - * @return the CertificateDatastoreCredentials object itself. - */ - public CertificateDatastoreCredentials withSecrets(CertificateDatastoreSecrets secrets) { - this.secrets = secrets; - return this; - } - /** * Validates the instance. * @@ -196,22 +196,11 @@ public CertificateDatastoreCredentials withSecrets(CertificateDatastoreSecrets s */ @Override public void validate() { - super.validate(); - if (tenantId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property tenantId in model CertificateDatastoreCredentials")); - } if (clientId() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( "Missing required property clientId in model CertificateDatastoreCredentials")); } - if (thumbprint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property thumbprint in model CertificateDatastoreCredentials")); - } if (secrets() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -219,6 +208,16 @@ public void validate() { } else { secrets().validate(); } + if (tenantId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property tenantId in model CertificateDatastoreCredentials")); + } + if (thumbprint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property thumbprint in model CertificateDatastoreCredentials")); + } } private static final ClientLogger LOGGER = new ClientLogger(CertificateDatastoreCredentials.class); @@ -229,10 +228,10 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("tenantId", Objects.toString(this.tenantId, null)); jsonWriter.writeStringField("clientId", Objects.toString(this.clientId, null)); - jsonWriter.writeStringField("thumbprint", this.thumbprint); jsonWriter.writeJsonField("secrets", this.secrets); + jsonWriter.writeStringField("tenantId", Objects.toString(this.tenantId, null)); + jsonWriter.writeStringField("thumbprint", this.thumbprint); jsonWriter.writeStringField("credentialsType", this.credentialsType == null ? null : this.credentialsType.toString()); jsonWriter.writeStringField("authorityUrl", this.authorityUrl); @@ -257,16 +256,16 @@ public static CertificateDatastoreCredentials fromJson(JsonReader jsonReader) th String fieldName = reader.getFieldName(); reader.nextToken(); - if ("tenantId".equals(fieldName)) { - deserializedCertificateDatastoreCredentials.tenantId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); - } else if ("clientId".equals(fieldName)) { + if ("clientId".equals(fieldName)) { deserializedCertificateDatastoreCredentials.clientId = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); - } else if ("thumbprint".equals(fieldName)) { - deserializedCertificateDatastoreCredentials.thumbprint = reader.getString(); } else if ("secrets".equals(fieldName)) { deserializedCertificateDatastoreCredentials.secrets = CertificateDatastoreSecrets.fromJson(reader); + } else if ("tenantId".equals(fieldName)) { + deserializedCertificateDatastoreCredentials.tenantId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else if ("thumbprint".equals(fieldName)) { + deserializedCertificateDatastoreCredentials.thumbprint = reader.getString(); } else if ("credentialsType".equals(fieldName)) { deserializedCertificateDatastoreCredentials.credentialsType = CredentialsType.fromString(reader.getString()); 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 5f47f4efcf8ec..42d3866dad536 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 @@ -69,7 +69,6 @@ public CertificateDatastoreSecrets withCertificate(String certificate) { */ @Override public void validate() { - super.validate(); } /** 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 9584d5fac3123..88ebbf1b6b4a4 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 @@ -5,6 +5,7 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -21,6 +22,11 @@ public final class Classification extends AutoMLVertical { */ private TaskType taskType = TaskType.CLASSIFICATION; + /* + * Positive label for binary metrics calculation. + */ + private String positiveLabel; + /* * Primary metric for the task. */ @@ -32,9 +38,14 @@ public final class Classification extends AutoMLVertical { private ClassificationTrainingSettings trainingSettings; /* - * Positive label for binary metrics calculation. + * Columns to use for CVSplit data. */ - private String positiveLabel; + private List cvSplitColumnNames; + + /* + * Featurization inputs needed for AutoML job. + */ + private TableVerticalFeaturizationSettings featurizationSettings; /* * Execution constraints for AutoMLJob. @@ -48,26 +59,22 @@ public final class Classification extends AutoMLVertical { private NCrossValidations nCrossValidations; /* - * Columns to use for CVSplit data. + * Test data input. */ - private List cvSplitColumnNames; + private MLTableJobInput testData; /* - * 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. + * 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. */ - private String weightColumnName; + private Double testDataSize; /* * Validation data inputs. */ private MLTableJobInput validationData; - /* - * Test data input. - */ - private MLTableJobInput testData; - /* * The fraction of training dataset that needs to be set aside for validation purpose. * Values between (0.0 , 1.0) @@ -76,16 +83,10 @@ public final class Classification extends AutoMLVertical { private Double validationDataSize; /* - * 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. - */ - private Double testDataSize; - - /* - * Featurization inputs needed for AutoML job. + * 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. */ - private TableVerticalFeaturizationSettings featurizationSettings; + private String weightColumnName; /** * Creates an instance of Classification class. @@ -103,6 +104,26 @@ public TaskType taskType() { return this.taskType; } + /** + * Get the positiveLabel property: Positive label for binary metrics calculation. + * + * @return the positiveLabel value. + */ + public String positiveLabel() { + return this.positiveLabel; + } + + /** + * Set the positiveLabel property: Positive label for binary metrics calculation. + * + * @param positiveLabel the positiveLabel value to set. + * @return the Classification object itself. + */ + public Classification withPositiveLabel(String positiveLabel) { + this.positiveLabel = positiveLabel; + return this; + } + /** * Get the primaryMetric property: Primary metric for the task. * @@ -144,22 +165,42 @@ public Classification withTrainingSettings(ClassificationTrainingSettings traini } /** - * Get the positiveLabel property: Positive label for binary metrics calculation. + * Get the cvSplitColumnNames property: Columns to use for CVSplit data. * - * @return the positiveLabel value. + * @return the cvSplitColumnNames value. */ - public String positiveLabel() { - return this.positiveLabel; + public List cvSplitColumnNames() { + return this.cvSplitColumnNames; } /** - * Set the positiveLabel property: Positive label for binary metrics calculation. + * Set the cvSplitColumnNames property: Columns to use for CVSplit data. * - * @param positiveLabel the positiveLabel value to set. + * @param cvSplitColumnNames the cvSplitColumnNames value to set. * @return the Classification object itself. */ - public Classification withPositiveLabel(String positiveLabel) { - this.positiveLabel = positiveLabel; + public Classification withCvSplitColumnNames(List cvSplitColumnNames) { + this.cvSplitColumnNames = cvSplitColumnNames; + return this; + } + + /** + * Get the featurizationSettings property: Featurization inputs needed for AutoML job. + * + * @return the featurizationSettings value. + */ + public TableVerticalFeaturizationSettings featurizationSettings() { + return this.featurizationSettings; + } + + /** + * Set the featurizationSettings property: Featurization inputs needed for AutoML job. + * + * @param featurizationSettings the featurizationSettings value to set. + * @return the Classification object itself. + */ + public Classification withFeaturizationSettings(TableVerticalFeaturizationSettings featurizationSettings) { + this.featurizationSettings = featurizationSettings; return this; } @@ -206,44 +247,46 @@ public Classification withNCrossValidations(NCrossValidations nCrossValidations) } /** - * Get the cvSplitColumnNames property: Columns to use for CVSplit data. + * Get the testData property: Test data input. * - * @return the cvSplitColumnNames value. + * @return the testData value. */ - public List cvSplitColumnNames() { - return this.cvSplitColumnNames; + public MLTableJobInput testData() { + return this.testData; } /** - * Set the cvSplitColumnNames property: Columns to use for CVSplit data. + * Set the testData property: Test data input. * - * @param cvSplitColumnNames the cvSplitColumnNames value to set. + * @param testData the testData value to set. * @return the Classification object itself. */ - public Classification withCvSplitColumnNames(List cvSplitColumnNames) { - this.cvSplitColumnNames = cvSplitColumnNames; + public Classification withTestData(MLTableJobInput testData) { + this.testData = testData; return this; } /** - * 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. + * 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. * - * @return the weightColumnName value. + * @return the testDataSize value. */ - public String weightColumnName() { - return this.weightColumnName; + public Double testDataSize() { + return this.testDataSize; } /** - * 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. + * 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. * - * @param weightColumnName the weightColumnName value to set. + * @param testDataSize the testDataSize value to set. * @return the Classification object itself. */ - public Classification withWeightColumnName(String weightColumnName) { - this.weightColumnName = weightColumnName; + public Classification withTestDataSize(Double testDataSize) { + this.testDataSize = testDataSize; return this; } @@ -267,26 +310,6 @@ public Classification withValidationData(MLTableJobInput validationData) { return this; } - /** - * Get the testData property: Test data input. - * - * @return the testData value. - */ - public MLTableJobInput testData() { - return this.testData; - } - - /** - * Set the testData property: Test data input. - * - * @param testData the testData value to set. - * @return the Classification object itself. - */ - public Classification withTestData(MLTableJobInput testData) { - this.testData = testData; - return this; - } - /** * Get the validationDataSize property: The fraction of training dataset that needs to be set aside for validation * purpose. @@ -314,46 +337,24 @@ public Classification withValidationDataSize(Double validationDataSize) { } /** - * 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. - * - * @return the testDataSize value. - */ - public Double testDataSize() { - return this.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. - * - * @param testDataSize the testDataSize value to set. - * @return the Classification object itself. - */ - public Classification withTestDataSize(Double testDataSize) { - this.testDataSize = testDataSize; - return this; - } - - /** - * Get the featurizationSettings property: Featurization inputs needed for AutoML job. + * 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 featurizationSettings value. + * @return the weightColumnName value. */ - public TableVerticalFeaturizationSettings featurizationSettings() { - return this.featurizationSettings; + public String weightColumnName() { + return this.weightColumnName; } /** - * Set the featurizationSettings property: Featurization inputs needed for AutoML job. + * 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 featurizationSettings the featurizationSettings value to set. + * @param weightColumnName the weightColumnName value to set. * @return the Classification object itself. */ - public Classification withFeaturizationSettings(TableVerticalFeaturizationSettings featurizationSettings) { - this.featurizationSettings = featurizationSettings; + public Classification withWeightColumnName(String weightColumnName) { + this.weightColumnName = weightColumnName; return this; } @@ -370,8 +371,8 @@ public Classification withLogVerbosity(LogVerbosity logVerbosity) { * {@inheritDoc} */ @Override - public Classification withTrainingData(MLTableJobInput trainingData) { - super.withTrainingData(trainingData); + public Classification withTargetColumnName(String targetColumnName) { + super.withTargetColumnName(targetColumnName); return this; } @@ -379,8 +380,8 @@ public Classification withTrainingData(MLTableJobInput trainingData) { * {@inheritDoc} */ @Override - public Classification withTargetColumnName(String targetColumnName) { - super.withTargetColumnName(targetColumnName); + public Classification withTrainingData(MLTableJobInput trainingData) { + super.withTrainingData(trainingData); return this; } @@ -391,27 +392,34 @@ public Classification withTargetColumnName(String targetColumnName) { */ @Override public void validate() { - super.validate(); if (trainingSettings() != null) { trainingSettings().validate(); } + if (featurizationSettings() != null) { + featurizationSettings().validate(); + } if (limitSettings() != null) { limitSettings().validate(); } if (nCrossValidations() != null) { nCrossValidations().validate(); } - if (validationData() != null) { - validationData().validate(); - } if (testData() != null) { testData().validate(); } - if (featurizationSettings() != null) { - featurizationSettings().validate(); + if (validationData() != null) { + validationData().validate(); + } + if (trainingData() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property trainingData in model Classification")); + } else { + trainingData().validate(); } } + private static final ClientLogger LOGGER = new ClientLogger(Classification.class); + /** * {@inheritDoc} */ @@ -422,19 +430,19 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("logVerbosity", logVerbosity() == null ? null : logVerbosity().toString()); jsonWriter.writeStringField("targetColumnName", targetColumnName()); jsonWriter.writeStringField("taskType", this.taskType == null ? null : this.taskType.toString()); + jsonWriter.writeStringField("positiveLabel", this.positiveLabel); jsonWriter.writeStringField("primaryMetric", this.primaryMetric == null ? null : this.primaryMetric.toString()); jsonWriter.writeJsonField("trainingSettings", this.trainingSettings); - jsonWriter.writeStringField("positiveLabel", this.positiveLabel); - jsonWriter.writeJsonField("limitSettings", this.limitSettings); - jsonWriter.writeJsonField("nCrossValidations", this.nCrossValidations); jsonWriter.writeArrayField("cvSplitColumnNames", this.cvSplitColumnNames, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("weightColumnName", this.weightColumnName); - jsonWriter.writeJsonField("validationData", this.validationData); + jsonWriter.writeJsonField("featurizationSettings", this.featurizationSettings); + jsonWriter.writeJsonField("limitSettings", this.limitSettings); + jsonWriter.writeJsonField("nCrossValidations", this.nCrossValidations); jsonWriter.writeJsonField("testData", this.testData); - jsonWriter.writeNumberField("validationDataSize", this.validationDataSize); jsonWriter.writeNumberField("testDataSize", this.testDataSize); - jsonWriter.writeJsonField("featurizationSettings", this.featurizationSettings); + jsonWriter.writeJsonField("validationData", this.validationData); + jsonWriter.writeNumberField("validationDataSize", this.validationDataSize); + jsonWriter.writeStringField("weightColumnName", this.weightColumnName); return jsonWriter.writeEndObject(); } @@ -462,33 +470,33 @@ public static Classification fromJson(JsonReader jsonReader) throws IOException deserializedClassification.withTargetColumnName(reader.getString()); } else if ("taskType".equals(fieldName)) { deserializedClassification.taskType = TaskType.fromString(reader.getString()); + } else if ("positiveLabel".equals(fieldName)) { + deserializedClassification.positiveLabel = reader.getString(); } else if ("primaryMetric".equals(fieldName)) { deserializedClassification.primaryMetric = ClassificationPrimaryMetrics.fromString(reader.getString()); } else if ("trainingSettings".equals(fieldName)) { deserializedClassification.trainingSettings = ClassificationTrainingSettings.fromJson(reader); - } else if ("positiveLabel".equals(fieldName)) { - deserializedClassification.positiveLabel = reader.getString(); + } else if ("cvSplitColumnNames".equals(fieldName)) { + List cvSplitColumnNames = reader.readArray(reader1 -> reader1.getString()); + deserializedClassification.cvSplitColumnNames = cvSplitColumnNames; + } else if ("featurizationSettings".equals(fieldName)) { + deserializedClassification.featurizationSettings + = TableVerticalFeaturizationSettings.fromJson(reader); } else if ("limitSettings".equals(fieldName)) { deserializedClassification.limitSettings = TableVerticalLimitSettings.fromJson(reader); } else if ("nCrossValidations".equals(fieldName)) { deserializedClassification.nCrossValidations = NCrossValidations.fromJson(reader); - } else if ("cvSplitColumnNames".equals(fieldName)) { - List cvSplitColumnNames = reader.readArray(reader1 -> reader1.getString()); - deserializedClassification.cvSplitColumnNames = cvSplitColumnNames; - } else if ("weightColumnName".equals(fieldName)) { - deserializedClassification.weightColumnName = reader.getString(); - } else if ("validationData".equals(fieldName)) { - deserializedClassification.validationData = MLTableJobInput.fromJson(reader); } else if ("testData".equals(fieldName)) { deserializedClassification.testData = MLTableJobInput.fromJson(reader); - } else if ("validationDataSize".equals(fieldName)) { - deserializedClassification.validationDataSize = reader.getNullable(JsonReader::getDouble); } else if ("testDataSize".equals(fieldName)) { deserializedClassification.testDataSize = reader.getNullable(JsonReader::getDouble); - } else if ("featurizationSettings".equals(fieldName)) { - deserializedClassification.featurizationSettings - = TableVerticalFeaturizationSettings.fromJson(reader); + } else if ("validationData".equals(fieldName)) { + deserializedClassification.validationData = MLTableJobInput.fromJson(reader); + } else if ("validationDataSize".equals(fieldName)) { + deserializedClassification.validationDataSize = reader.getNullable(JsonReader::getDouble); + } else if ("weightColumnName".equals(fieldName)) { + deserializedClassification.weightColumnName = reader.getString(); } else { reader.skipChildren(); } 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 3006428bbd8ee..c63a8ee853d12 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 @@ -80,8 +80,8 @@ public List blockedTrainingAlgorithms() { * {@inheritDoc} */ @Override - public ClassificationTrainingSettings withEnableOnnxCompatibleModels(Boolean enableOnnxCompatibleModels) { - super.withEnableOnnxCompatibleModels(enableOnnxCompatibleModels); + public ClassificationTrainingSettings withEnableDnnTraining(Boolean enableDnnTraining) { + super.withEnableDnnTraining(enableDnnTraining); return this; } @@ -89,8 +89,8 @@ public ClassificationTrainingSettings withEnableOnnxCompatibleModels(Boolean ena * {@inheritDoc} */ @Override - public ClassificationTrainingSettings withStackEnsembleSettings(StackEnsembleSettings stackEnsembleSettings) { - super.withStackEnsembleSettings(stackEnsembleSettings); + public ClassificationTrainingSettings withEnableModelExplainability(Boolean enableModelExplainability) { + super.withEnableModelExplainability(enableModelExplainability); return this; } @@ -98,8 +98,8 @@ public ClassificationTrainingSettings withStackEnsembleSettings(StackEnsembleSet * {@inheritDoc} */ @Override - public ClassificationTrainingSettings withEnableStackEnsemble(Boolean enableStackEnsemble) { - super.withEnableStackEnsemble(enableStackEnsemble); + public ClassificationTrainingSettings withEnableOnnxCompatibleModels(Boolean enableOnnxCompatibleModels) { + super.withEnableOnnxCompatibleModels(enableOnnxCompatibleModels); return this; } @@ -107,8 +107,8 @@ public ClassificationTrainingSettings withEnableStackEnsemble(Boolean enableStac * {@inheritDoc} */ @Override - public ClassificationTrainingSettings withEnableVoteEnsemble(Boolean enableVoteEnsemble) { - super.withEnableVoteEnsemble(enableVoteEnsemble); + public ClassificationTrainingSettings withEnableStackEnsemble(Boolean enableStackEnsemble) { + super.withEnableStackEnsemble(enableStackEnsemble); return this; } @@ -116,8 +116,8 @@ public ClassificationTrainingSettings withEnableVoteEnsemble(Boolean enableVoteE * {@inheritDoc} */ @Override - public ClassificationTrainingSettings withEnsembleModelDownloadTimeout(Duration ensembleModelDownloadTimeout) { - super.withEnsembleModelDownloadTimeout(ensembleModelDownloadTimeout); + public ClassificationTrainingSettings withEnableVoteEnsemble(Boolean enableVoteEnsemble) { + super.withEnableVoteEnsemble(enableVoteEnsemble); return this; } @@ -125,8 +125,8 @@ public ClassificationTrainingSettings withEnsembleModelDownloadTimeout(Duration * {@inheritDoc} */ @Override - public ClassificationTrainingSettings withEnableModelExplainability(Boolean enableModelExplainability) { - super.withEnableModelExplainability(enableModelExplainability); + public ClassificationTrainingSettings withEnsembleModelDownloadTimeout(Duration ensembleModelDownloadTimeout) { + super.withEnsembleModelDownloadTimeout(ensembleModelDownloadTimeout); return this; } @@ -134,8 +134,8 @@ public ClassificationTrainingSettings withEnableModelExplainability(Boolean enab * {@inheritDoc} */ @Override - public ClassificationTrainingSettings withEnableDnnTraining(Boolean enableDnnTraining) { - super.withEnableDnnTraining(enableDnnTraining); + public ClassificationTrainingSettings withStackEnsembleSettings(StackEnsembleSettings stackEnsembleSettings) { + super.withStackEnsembleSettings(stackEnsembleSettings); return this; } @@ -146,7 +146,9 @@ public ClassificationTrainingSettings withEnableDnnTraining(Boolean enableDnnTra */ @Override public void validate() { - super.validate(); + if (stackEnsembleSettings() != null) { + stackEnsembleSettings().validate(); + } } /** @@ -155,14 +157,14 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enableDnnTraining", enableDnnTraining()); + jsonWriter.writeBooleanField("enableModelExplainability", enableModelExplainability()); jsonWriter.writeBooleanField("enableOnnxCompatibleModels", enableOnnxCompatibleModels()); - jsonWriter.writeJsonField("stackEnsembleSettings", stackEnsembleSettings()); jsonWriter.writeBooleanField("enableStackEnsemble", enableStackEnsemble()); jsonWriter.writeBooleanField("enableVoteEnsemble", enableVoteEnsemble()); jsonWriter.writeStringField("ensembleModelDownloadTimeout", CoreUtils.durationToStringWithDays(ensembleModelDownloadTimeout())); - jsonWriter.writeBooleanField("enableModelExplainability", enableModelExplainability()); - jsonWriter.writeBooleanField("enableDnnTraining", enableDnnTraining()); + jsonWriter.writeJsonField("stackEnsembleSettings", stackEnsembleSettings()); jsonWriter.writeArrayField("allowedTrainingAlgorithms", this.allowedTrainingAlgorithms, (writer, element) -> writer.writeString(element == null ? null : element.toString())); jsonWriter.writeArrayField("blockedTrainingAlgorithms", this.blockedTrainingAlgorithms, @@ -186,12 +188,15 @@ public static ClassificationTrainingSettings fromJson(JsonReader jsonReader) thr String fieldName = reader.getFieldName(); reader.nextToken(); - if ("enableOnnxCompatibleModels".equals(fieldName)) { + if ("enableDnnTraining".equals(fieldName)) { deserializedClassificationTrainingSettings - .withEnableOnnxCompatibleModels(reader.getNullable(JsonReader::getBoolean)); - } else if ("stackEnsembleSettings".equals(fieldName)) { + .withEnableDnnTraining(reader.getNullable(JsonReader::getBoolean)); + } else if ("enableModelExplainability".equals(fieldName)) { deserializedClassificationTrainingSettings - .withStackEnsembleSettings(StackEnsembleSettings.fromJson(reader)); + .withEnableModelExplainability(reader.getNullable(JsonReader::getBoolean)); + } else if ("enableOnnxCompatibleModels".equals(fieldName)) { + deserializedClassificationTrainingSettings + .withEnableOnnxCompatibleModels(reader.getNullable(JsonReader::getBoolean)); } else if ("enableStackEnsemble".equals(fieldName)) { deserializedClassificationTrainingSettings .withEnableStackEnsemble(reader.getNullable(JsonReader::getBoolean)); @@ -201,12 +206,9 @@ public static ClassificationTrainingSettings fromJson(JsonReader jsonReader) thr } else if ("ensembleModelDownloadTimeout".equals(fieldName)) { deserializedClassificationTrainingSettings.withEnsembleModelDownloadTimeout( reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString()))); - } else if ("enableModelExplainability".equals(fieldName)) { - deserializedClassificationTrainingSettings - .withEnableModelExplainability(reader.getNullable(JsonReader::getBoolean)); - } else if ("enableDnnTraining".equals(fieldName)) { + } else if ("stackEnsembleSettings".equals(fieldName)) { deserializedClassificationTrainingSettings - .withEnableDnnTraining(reader.getNullable(JsonReader::getBoolean)); + .withStackEnsembleSettings(StackEnsembleSettings.fromJson(reader)); } else if ("allowedTrainingAlgorithms".equals(fieldName)) { List allowedTrainingAlgorithms = reader.readArray(reader1 -> ClassificationModels.fromString(reader1.getString())); 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 6257379a5b611..4e84fe2072f4b 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 @@ -22,14 +22,14 @@ public final class CodeContainerProperties extends AssetContainer { private AssetProvisioningState provisioningState; /* - * The latest version inside this container. + * The next auto incremental version */ - private String latestVersion; + private String nextVersion; /* - * The next auto incremental version + * The latest version inside this container. */ - private String nextVersion; + private String latestVersion; /** * Creates an instance of CodeContainerProperties class. @@ -47,23 +47,23 @@ public AssetProvisioningState provisioningState() { } /** - * Get the latestVersion property: The latest version inside this container. + * Get the nextVersion property: The next auto incremental version. * - * @return the latestVersion value. + * @return the nextVersion value. */ @Override - public String latestVersion() { - return this.latestVersion; + public String nextVersion() { + return this.nextVersion; } /** - * Get the nextVersion property: The next auto incremental version. + * Get the latestVersion property: The latest version inside this container. * - * @return the nextVersion value. + * @return the latestVersion value. */ @Override - public String nextVersion() { - return this.nextVersion; + public String latestVersion() { + return this.latestVersion; } /** @@ -88,8 +88,8 @@ public CodeContainerProperties withDescription(String description) { * {@inheritDoc} */ @Override - public CodeContainerProperties withTags(Map tags) { - super.withTags(tags); + public CodeContainerProperties withProperties(Map properties) { + super.withProperties(properties); return this; } @@ -97,8 +97,8 @@ public CodeContainerProperties withTags(Map tags) { * {@inheritDoc} */ @Override - public CodeContainerProperties withProperties(Map properties) { - super.withProperties(properties); + public CodeContainerProperties withTags(Map tags) { + super.withTags(tags); return this; } @@ -109,7 +109,6 @@ public CodeContainerProperties withProperties(Map properties) { */ @Override public void validate() { - super.validate(); } /** @@ -119,8 +118,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isArchived", isArchived()); return jsonWriter.writeEndObject(); } @@ -142,12 +141,12 @@ public static CodeContainerProperties fromJson(JsonReader jsonReader) throws IOE if ("description".equals(fieldName)) { deserializedCodeContainerProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedCodeContainerProperties.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedCodeContainerProperties.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedCodeContainerProperties.withTags(tags); } else if ("isArchived".equals(fieldName)) { deserializedCodeContainerProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("latestVersion".equals(fieldName)) { 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 fa6d0216426dd..6e1111d80ad5f 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 @@ -20,14 +20,14 @@ public final class CodeContainerResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type CodeContainer. + * The link to the next page of CodeContainer objects. If null, there are no additional pages. */ - private List value; + private String nextLink; /* - * The link to the next page of CodeContainer objects. If null, there are no additional pages. + * An array of objects of type CodeContainer. */ - private String nextLink; + private List value; /** * Creates an instance of CodeContainerResourceArmPaginatedResult class. @@ -36,44 +36,44 @@ public CodeContainerResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type CodeContainer. + * Get the nextLink property: The link to the next page of CodeContainer objects. If null, there are no additional + * pages. * - * @return the value value. + * @return the nextLink value. */ - public List value() { - return this.value; + public String nextLink() { + return this.nextLink; } /** - * Set the value property: An array of objects of type CodeContainer. + * Set the nextLink property: The link to the next page of CodeContainer objects. If null, there are no additional + * pages. * - * @param value the value value to set. + * @param nextLink the nextLink value to set. * @return the CodeContainerResourceArmPaginatedResult object itself. */ - public CodeContainerResourceArmPaginatedResult withValue(List value) { - this.value = value; + public CodeContainerResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; return this; } /** - * Get the nextLink property: The link to the next page of CodeContainer objects. If null, there are no additional - * pages. + * Get the value property: An array of objects of type CodeContainer. * - * @return the nextLink value. + * @return the value value. */ - public String nextLink() { - return this.nextLink; + public List value() { + return this.value; } /** - * Set the nextLink property: The link to the next page of CodeContainer objects. If null, there are no additional - * pages. + * Set the value property: An array of objects of type CodeContainer. * - * @param nextLink the nextLink value to set. + * @param value the value value to set. * @return the CodeContainerResourceArmPaginatedResult object itself. */ - public CodeContainerResourceArmPaginatedResult withNextLink(String nextLink) { - this.nextLink = nextLink; + public CodeContainerResourceArmPaginatedResult withValue(List value) { + this.value = value; return this; } @@ -94,8 +94,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -115,11 +115,11 @@ public static CodeContainerResourceArmPaginatedResult fromJson(JsonReader jsonRe String fieldName = reader.getFieldName(); reader.nextToken(); - if ("value".equals(fieldName)) { + if ("nextLink".equals(fieldName)) { + deserializedCodeContainerResourceArmPaginatedResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> CodeContainerInner.fromJson(reader1)); deserializedCodeContainerResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedCodeContainerResourceArmPaginatedResult.nextLink = reader.getString(); } else { reader.skipChildren(); } 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 cca06a1869e42..e0f039b763ed5 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 @@ -65,8 +65,8 @@ public AssetProvisioningState provisioningState() { * {@inheritDoc} */ @Override - public CodeVersionProperties withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); + public CodeVersionProperties withIsAnonymous(Boolean isAnonymous) { + super.withIsAnonymous(isAnonymous); return this; } @@ -74,8 +74,8 @@ public CodeVersionProperties withIsArchived(Boolean isArchived) { * {@inheritDoc} */ @Override - public CodeVersionProperties withIsAnonymous(Boolean isAnonymous) { - super.withIsAnonymous(isAnonymous); + public CodeVersionProperties withIsArchived(Boolean isArchived) { + super.withIsArchived(isArchived); return this; } @@ -92,8 +92,8 @@ public CodeVersionProperties withDescription(String description) { * {@inheritDoc} */ @Override - public CodeVersionProperties withTags(Map tags) { - super.withTags(tags); + public CodeVersionProperties withProperties(Map properties) { + super.withProperties(properties); return this; } @@ -101,8 +101,8 @@ public CodeVersionProperties withTags(Map tags) { * {@inheritDoc} */ @Override - public CodeVersionProperties withProperties(Map properties) { - super.withProperties(properties); + public CodeVersionProperties withTags(Map tags) { + super.withTags(tags); return this; } @@ -113,7 +113,6 @@ public CodeVersionProperties withProperties(Map properties) { */ @Override public void validate() { - super.validate(); } /** @@ -123,10 +122,10 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", isArchived()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isAnonymous", isAnonymous()); + jsonWriter.writeBooleanField("isArchived", isArchived()); jsonWriter.writeStringField("codeUri", this.codeUri); return jsonWriter.writeEndObject(); } @@ -148,16 +147,16 @@ public static CodeVersionProperties fromJson(JsonReader jsonReader) throws IOExc if ("description".equals(fieldName)) { deserializedCodeVersionProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedCodeVersionProperties.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedCodeVersionProperties.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedCodeVersionProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedCodeVersionProperties.withTags(tags); } else if ("isAnonymous".equals(fieldName)) { deserializedCodeVersionProperties.withIsAnonymous(reader.getNullable(JsonReader::getBoolean)); + } else if ("isArchived".equals(fieldName)) { + deserializedCodeVersionProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("codeUri".equals(fieldName)) { deserializedCodeVersionProperties.codeUri = reader.getString(); } else if ("provisioningState".equals(fieldName)) { 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 a45cfdbbf5dd0..e6db3b58ba050 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 @@ -20,14 +20,14 @@ public final class CodeVersionResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type CodeVersion. + * The link to the next page of CodeVersion objects. If null, there are no additional pages. */ - private List value; + private String nextLink; /* - * The link to the next page of CodeVersion objects. If null, there are no additional pages. + * An array of objects of type CodeVersion. */ - private String nextLink; + private List value; /** * Creates an instance of CodeVersionResourceArmPaginatedResult class. @@ -36,44 +36,44 @@ public CodeVersionResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type CodeVersion. + * Get the nextLink property: The link to the next page of CodeVersion objects. If null, there are no additional + * pages. * - * @return the value value. + * @return the nextLink value. */ - public List value() { - return this.value; + public String nextLink() { + return this.nextLink; } /** - * Set the value property: An array of objects of type CodeVersion. + * Set the nextLink property: The link to the next page of CodeVersion objects. If null, there are no additional + * pages. * - * @param value the value value to set. + * @param nextLink the nextLink value to set. * @return the CodeVersionResourceArmPaginatedResult object itself. */ - public CodeVersionResourceArmPaginatedResult withValue(List value) { - this.value = value; + public CodeVersionResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; return this; } /** - * Get the nextLink property: The link to the next page of CodeVersion objects. If null, there are no additional - * pages. + * Get the value property: An array of objects of type CodeVersion. * - * @return the nextLink value. + * @return the value value. */ - public String nextLink() { - return this.nextLink; + public List value() { + return this.value; } /** - * Set the nextLink property: The link to the next page of CodeVersion objects. If null, there are no additional - * pages. + * Set the value property: An array of objects of type CodeVersion. * - * @param nextLink the nextLink value to set. + * @param value the value value to set. * @return the CodeVersionResourceArmPaginatedResult object itself. */ - public CodeVersionResourceArmPaginatedResult withNextLink(String nextLink) { - this.nextLink = nextLink; + public CodeVersionResourceArmPaginatedResult withValue(List value) { + this.value = value; return this; } @@ -94,8 +94,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -115,11 +115,11 @@ public static CodeVersionResourceArmPaginatedResult fromJson(JsonReader jsonRead String fieldName = reader.getFieldName(); reader.nextToken(); - if ("value".equals(fieldName)) { + if ("nextLink".equals(fieldName)) { + deserializedCodeVersionResourceArmPaginatedResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> CodeVersionInner.fromJson(reader1)); deserializedCodeVersionResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedCodeVersionResourceArmPaginatedResult.nextLink = reader.getString(); } else { reader.skipChildren(); } 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..7df9691fcf2d1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CognitiveServiceEndpointDeploymentResourceProperties.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.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The CognitiveServiceEndpointDeploymentResourceProperties model. + */ +@Fluent +public class CognitiveServiceEndpointDeploymentResourceProperties + implements JsonSerializable { + /* + * Model used for the endpoint deployment. + */ + private EndpointDeploymentModel model; + + /* + * The name of RAI policy. + */ + private String raiPolicyName; + + /* + * The sku property. + */ + private CognitiveServicesSku sku; + + /* + * Deployment model version upgrade option. + */ + 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.atError() + .log(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); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("model", this.model); + jsonWriter.writeStringField("raiPolicyName", this.raiPolicyName); + jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeStringField("versionUpgradeOption", + this.versionUpgradeOption == null ? null : this.versionUpgradeOption.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CognitiveServiceEndpointDeploymentResourceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CognitiveServiceEndpointDeploymentResourceProperties if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the CognitiveServiceEndpointDeploymentResourceProperties. + */ + public static CognitiveServiceEndpointDeploymentResourceProperties fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + CognitiveServiceEndpointDeploymentResourceProperties deserializedCognitiveServiceEndpointDeploymentResourceProperties + = new CognitiveServiceEndpointDeploymentResourceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("model".equals(fieldName)) { + deserializedCognitiveServiceEndpointDeploymentResourceProperties.model + = EndpointDeploymentModel.fromJson(reader); + } else if ("raiPolicyName".equals(fieldName)) { + deserializedCognitiveServiceEndpointDeploymentResourceProperties.raiPolicyName = reader.getString(); + } else if ("sku".equals(fieldName)) { + deserializedCognitiveServiceEndpointDeploymentResourceProperties.sku + = CognitiveServicesSku.fromJson(reader); + } else if ("versionUpgradeOption".equals(fieldName)) { + deserializedCognitiveServiceEndpointDeploymentResourceProperties.versionUpgradeOption + = DeploymentModelVersionUpgradeOption.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedCognitiveServiceEndpointDeploymentResourceProperties; + }); + } +} 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..33e4f204129cf --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CognitiveServicesSku.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.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The CognitiveServicesSku model. + */ +@Fluent +public final class CognitiveServicesSku implements JsonSerializable { + /* + * The capacity property. + */ + private Integer capacity; + + /* + * The family property. + */ + private String family; + + /* + * The name property. + */ + private String name; + + /* + * The size property. + */ + private String size; + + /* + * The tier property. + */ + 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() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("capacity", this.capacity); + jsonWriter.writeStringField("family", this.family); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("size", this.size); + jsonWriter.writeStringField("tier", this.tier); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CognitiveServicesSku from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CognitiveServicesSku if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the CognitiveServicesSku. + */ + public static CognitiveServicesSku fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CognitiveServicesSku deserializedCognitiveServicesSku = new CognitiveServicesSku(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("capacity".equals(fieldName)) { + deserializedCognitiveServicesSku.capacity = reader.getNullable(JsonReader::getInt); + } else if ("family".equals(fieldName)) { + deserializedCognitiveServicesSku.family = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedCognitiveServicesSku.name = reader.getString(); + } else if ("size".equals(fieldName)) { + deserializedCognitiveServicesSku.size = reader.getString(); + } else if ("tier".equals(fieldName)) { + deserializedCognitiveServicesSku.tier = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCognitiveServicesSku; + }); + } +} 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 index 6dc7e19892609..88b958f2c6c5e 100644 --- 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 @@ -17,9 +17,10 @@ @Fluent public final class Collection implements JsonSerializable { /* - * The sampling rate for collection. Sampling rate 1.0 means we collect 100% of data by default. + * The msi client id used to collect logging to blob storage. If it's null,backend will pick a registered endpoint + * identity to auth. */ - private Double samplingRate; + private String clientId; /* * Enable or disable data collection. @@ -33,10 +34,9 @@ public final class Collection implements JsonSerializable { private String dataId; /* - * The msi client id used to collect logging to blob storage. If it's null,backend will pick a registered endpoint - * identity to auth. + * The sampling rate for collection. Sampling rate 1.0 means we collect 100% of data by default. */ - private String clientId; + private Double samplingRate; /** * Creates an instance of Collection class. @@ -45,24 +45,24 @@ public Collection() { } /** - * Get the samplingRate property: The sampling rate for collection. Sampling rate 1.0 means we collect 100% of data - * by default. + * 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 samplingRate value. + * @return the clientId value. */ - public Double samplingRate() { - return this.samplingRate; + public String clientId() { + return this.clientId; } /** - * Set the samplingRate property: The sampling rate for collection. Sampling rate 1.0 means we collect 100% of data - * by default. + * 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 samplingRate the samplingRate value to set. + * @param clientId the clientId value to set. * @return the Collection object itself. */ - public Collection withSamplingRate(Double samplingRate) { - this.samplingRate = samplingRate; + public Collection withClientId(String clientId) { + this.clientId = clientId; return this; } @@ -109,24 +109,24 @@ public Collection withDataId(String dataId) { } /** - * 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. + * Get the samplingRate property: The sampling rate for collection. Sampling rate 1.0 means we collect 100% of data + * by default. * - * @return the clientId value. + * @return the samplingRate value. */ - public String clientId() { - return this.clientId; + public Double samplingRate() { + return this.samplingRate; } /** - * 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. + * Set the samplingRate property: The sampling rate for collection. Sampling rate 1.0 means we collect 100% of data + * by default. * - * @param clientId the clientId value to set. + * @param samplingRate the samplingRate value to set. * @return the Collection object itself. */ - public Collection withClientId(String clientId) { - this.clientId = clientId; + public Collection withSamplingRate(Double samplingRate) { + this.samplingRate = samplingRate; return this; } @@ -144,11 +144,11 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("samplingRate", this.samplingRate); + jsonWriter.writeStringField("clientId", this.clientId); jsonWriter.writeStringField("dataCollectionMode", this.dataCollectionMode == null ? null : this.dataCollectionMode.toString()); jsonWriter.writeStringField("dataId", this.dataId); - jsonWriter.writeStringField("clientId", this.clientId); + jsonWriter.writeNumberField("samplingRate", this.samplingRate); return jsonWriter.writeEndObject(); } @@ -167,14 +167,14 @@ public static Collection fromJson(JsonReader jsonReader) throws IOException { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("samplingRate".equals(fieldName)) { - deserializedCollection.samplingRate = reader.getNullable(JsonReader::getDouble); + if ("clientId".equals(fieldName)) { + deserializedCollection.clientId = reader.getString(); } else if ("dataCollectionMode".equals(fieldName)) { deserializedCollection.dataCollectionMode = DataCollectionMode.fromString(reader.getString()); } else if ("dataId".equals(fieldName)) { deserializedCollection.dataId = reader.getString(); - } else if ("clientId".equals(fieldName)) { - deserializedCollection.clientId = reader.getString(); + } else if ("samplingRate".equals(fieldName)) { + deserializedCollection.samplingRate = reader.getNullable(JsonReader::getDouble); } else { reader.skipChildren(); } 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 c0bd48df854b3..9f6bc32be6b4f 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 @@ -22,11 +22,6 @@ public final class CommandJob extends JobBaseProperties { */ private JobType jobType = JobType.COMMAND; - /* - * Compute Resource configuration for the job. - */ - private JobResourceConfiguration resources; - /* * ARM resource ID of the code asset. */ @@ -38,24 +33,24 @@ public final class CommandJob extends JobBaseProperties { private String command; /* - * [Required] The ARM resource ID of the Environment specification for the job. + * Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. */ - private String environmentId; + private DistributionConfiguration distribution; /* - * Mapping of input data bindings used in the job. + * [Required] The ARM resource ID of the Environment specification for the job. */ - private Map inputs; + private String environmentId; /* - * Mapping of output data bindings used in the job. + * Environment variables included in the job. */ - private Map outputs; + private Map environmentVariables; /* - * Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. + * Mapping of input data bindings used in the job. */ - private DistributionConfiguration distribution; + private Map inputs; /* * Command Job limit. @@ -63,9 +58,9 @@ public final class CommandJob extends JobBaseProperties { private CommandJobLimits limits; /* - * Environment variables included in the job. + * Mapping of output data bindings used in the job. */ - private Map environmentVariables; + private Map outputs; /* * Input parameters. @@ -78,9 +73,9 @@ public final class CommandJob extends JobBaseProperties { private QueueSettings queueSettings; /* - * Status of the job. + * Compute Resource configuration for the job. */ - private JobStatus status; + private JobResourceConfiguration resources; /** * Creates an instance of CommandJob class. @@ -98,26 +93,6 @@ public JobType jobType() { return this.jobType; } - /** - * 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 CommandJob object itself. - */ - public CommandJob withResources(JobResourceConfiguration resources) { - this.resources = resources; - return this; - } - /** * Get the codeId property: ARM resource ID of the code asset. * @@ -159,84 +134,84 @@ public CommandJob withCommand(String command) { } /** - * Get the environmentId property: [Required] The ARM resource ID of the Environment specification for the job. + * Get the distribution property: Distribution configuration of the job. If set, this should be one of Mpi, + * Tensorflow, PyTorch, or null. * - * @return the environmentId value. + * @return the distribution value. */ - public String environmentId() { - return this.environmentId; + public DistributionConfiguration distribution() { + return this.distribution; } /** - * Set the environmentId property: [Required] The ARM resource ID of the Environment specification for the job. + * Set the distribution property: Distribution configuration of the job. If set, this should be one of Mpi, + * Tensorflow, PyTorch, or null. * - * @param environmentId the environmentId value to set. + * @param distribution the distribution value to set. * @return the CommandJob object itself. */ - public CommandJob withEnvironmentId(String environmentId) { - this.environmentId = environmentId; + public CommandJob withDistribution(DistributionConfiguration distribution) { + this.distribution = distribution; return this; } /** - * Get the inputs property: Mapping of input data bindings used in the job. + * Get the environmentId property: [Required] The ARM resource ID of the Environment specification for the job. * - * @return the inputs value. + * @return the environmentId value. */ - public Map inputs() { - return this.inputs; + public String environmentId() { + return this.environmentId; } /** - * Set the inputs property: Mapping of input data bindings used in the job. + * Set the environmentId property: [Required] The ARM resource ID of the Environment specification for the job. * - * @param inputs the inputs value to set. + * @param environmentId the environmentId value to set. * @return the CommandJob object itself. */ - public CommandJob withInputs(Map inputs) { - this.inputs = inputs; + public CommandJob withEnvironmentId(String environmentId) { + this.environmentId = environmentId; return this; } /** - * Get the outputs property: Mapping of output data bindings used in the job. + * Get the environmentVariables property: Environment variables included in the job. * - * @return the outputs value. + * @return the environmentVariables value. */ - public Map outputs() { - return this.outputs; + public Map environmentVariables() { + return this.environmentVariables; } /** - * Set the outputs property: Mapping of output data bindings used in the job. + * Set the environmentVariables property: Environment variables included in the job. * - * @param outputs the outputs value to set. + * @param environmentVariables the environmentVariables value to set. * @return the CommandJob object itself. */ - public CommandJob withOutputs(Map outputs) { - this.outputs = outputs; + public CommandJob withEnvironmentVariables(Map environmentVariables) { + this.environmentVariables = environmentVariables; return this; } /** - * Get the distribution property: Distribution configuration of the job. If set, this should be one of Mpi, - * Tensorflow, PyTorch, or null. + * Get the inputs property: Mapping of input data bindings used in the job. * - * @return the distribution value. + * @return the inputs value. */ - public DistributionConfiguration distribution() { - return this.distribution; + public Map inputs() { + return this.inputs; } /** - * Set the distribution property: Distribution configuration of the job. If set, this should be one of Mpi, - * Tensorflow, PyTorch, or null. + * Set the inputs property: Mapping of input data bindings used in the job. * - * @param distribution the distribution value to set. + * @param inputs the inputs value to set. * @return the CommandJob object itself. */ - public CommandJob withDistribution(DistributionConfiguration distribution) { - this.distribution = distribution; + public CommandJob withInputs(Map inputs) { + this.inputs = inputs; return this; } @@ -261,22 +236,22 @@ public CommandJob withLimits(CommandJobLimits limits) { } /** - * Get the environmentVariables property: Environment variables included in the job. + * Get the outputs property: Mapping of output data bindings used in the job. * - * @return the environmentVariables value. + * @return the outputs value. */ - public Map environmentVariables() { - return this.environmentVariables; + public Map outputs() { + return this.outputs; } /** - * Set the environmentVariables property: Environment variables included in the job. + * Set the outputs property: Mapping of output data bindings used in the job. * - * @param environmentVariables the environmentVariables value to set. + * @param outputs the outputs value to set. * @return the CommandJob object itself. */ - public CommandJob withEnvironmentVariables(Map environmentVariables) { - this.environmentVariables = environmentVariables; + public CommandJob withOutputs(Map outputs) { + this.outputs = outputs; return this; } @@ -310,21 +285,40 @@ public CommandJob withQueueSettings(QueueSettings queueSettings) { } /** - * Get the status property: Status of the job. + * Get the resources property: Compute Resource configuration for the job. * - * @return the status value. + * @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 CommandJob object itself. + */ + public CommandJob withResources(JobResourceConfiguration resources) { + this.resources = resources; + return this; + } + + /** + * {@inheritDoc} */ @Override - public JobStatus status() { - return this.status; + public CommandJob withComponentId(String componentId) { + super.withComponentId(componentId); + return this; } /** * {@inheritDoc} */ @Override - public CommandJob withDisplayName(String displayName) { - super.withDisplayName(displayName); + public CommandJob withComputeId(String computeId) { + super.withComputeId(computeId); return this; } @@ -332,8 +326,8 @@ public CommandJob withDisplayName(String displayName) { * {@inheritDoc} */ @Override - public CommandJob withExperimentName(String experimentName) { - super.withExperimentName(experimentName); + public CommandJob withDisplayName(String displayName) { + super.withDisplayName(displayName); return this; } @@ -341,8 +335,8 @@ public CommandJob withExperimentName(String experimentName) { * {@inheritDoc} */ @Override - public CommandJob withServices(Map services) { - super.withServices(services); + public CommandJob withExperimentName(String experimentName) { + super.withExperimentName(experimentName); return this; } @@ -350,8 +344,8 @@ public CommandJob withServices(Map services) { * {@inheritDoc} */ @Override - public CommandJob withComputeId(String computeId) { - super.withComputeId(computeId); + public CommandJob withIdentity(IdentityConfiguration identity) { + super.withIdentity(identity); return this; } @@ -368,8 +362,8 @@ public CommandJob withIsArchived(Boolean isArchived) { * {@inheritDoc} */ @Override - public CommandJob withIdentity(IdentityConfiguration identity) { - super.withIdentity(identity); + public CommandJob withNotificationSetting(NotificationSetting notificationSetting) { + super.withNotificationSetting(notificationSetting); return this; } @@ -377,8 +371,8 @@ public CommandJob withIdentity(IdentityConfiguration identity) { * {@inheritDoc} */ @Override - public CommandJob withComponentId(String componentId) { - super.withComponentId(componentId); + public CommandJob withParentJobName(String parentJobName) { + super.withParentJobName(parentJobName); return this; } @@ -386,8 +380,8 @@ public CommandJob withComponentId(String componentId) { * {@inheritDoc} */ @Override - public CommandJob withNotificationSetting(NotificationSetting notificationSetting) { - super.withNotificationSetting(notificationSetting); + public CommandJob withServices(Map services) { + super.withServices(services); return this; } @@ -404,8 +398,8 @@ public CommandJob withDescription(String description) { * {@inheritDoc} */ @Override - public CommandJob withTags(Map tags) { - super.withTags(tags); + public CommandJob withProperties(Map properties) { + super.withProperties(properties); return this; } @@ -413,8 +407,8 @@ public CommandJob withTags(Map tags) { * {@inheritDoc} */ @Override - public CommandJob withProperties(Map properties) { - super.withProperties(properties); + public CommandJob withTags(Map tags) { + super.withTags(tags); return this; } @@ -425,14 +419,13 @@ public CommandJob withProperties(Map properties) { */ @Override public void validate() { - super.validate(); - if (resources() != null) { - resources().validate(); - } if (command() == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property command in model CommandJob")); } + if (distribution() != null) { + distribution().validate(); + } if (environmentId() == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property environmentId in model CommandJob")); @@ -444,6 +437,9 @@ public void validate() { } }); } + if (limits() != null) { + limits().validate(); + } if (outputs() != null) { outputs().values().forEach(e -> { if (e != null) { @@ -451,15 +447,25 @@ public void validate() { } }); } - if (distribution() != null) { - distribution().validate(); - } - if (limits() != null) { - limits().validate(); - } if (queueSettings() != null) { queueSettings().validate(); } + if (resources() != null) { + resources().validate(); + } + if (identity() != null) { + identity().validate(); + } + if (notificationSetting() != null) { + notificationSetting().validate(); + } + if (services() != null) { + services().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); + } } private static final ClientLogger LOGGER = new ClientLogger(CommandJob.class); @@ -471,28 +477,29 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("componentId", componentId()); + jsonWriter.writeStringField("computeId", computeId()); jsonWriter.writeStringField("displayName", displayName()); jsonWriter.writeStringField("experimentName", experimentName()); - jsonWriter.writeMapField("services", services(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("computeId", computeId()); - jsonWriter.writeBooleanField("isArchived", isArchived()); jsonWriter.writeJsonField("identity", identity()); - jsonWriter.writeStringField("componentId", componentId()); + jsonWriter.writeBooleanField("isArchived", isArchived()); jsonWriter.writeJsonField("notificationSetting", notificationSetting()); + jsonWriter.writeStringField("parentJobName", parentJobName()); + jsonWriter.writeMapField("services", services(), (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("command", this.command); jsonWriter.writeStringField("environmentId", this.environmentId); jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); - jsonWriter.writeJsonField("resources", this.resources); jsonWriter.writeStringField("codeId", this.codeId); - jsonWriter.writeMapField("inputs", this.inputs, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeMapField("outputs", this.outputs, (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("distribution", this.distribution); - jsonWriter.writeJsonField("limits", this.limits); jsonWriter.writeMapField("environmentVariables", this.environmentVariables, (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("inputs", this.inputs, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("limits", this.limits); + jsonWriter.writeMapField("outputs", this.outputs, (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("queueSettings", this.queueSettings); + jsonWriter.writeJsonField("resources", this.resources); return jsonWriter.writeEndObject(); } @@ -514,58 +521,60 @@ public static CommandJob fromJson(JsonReader jsonReader) throws IOException { if ("description".equals(fieldName)) { deserializedCommandJob.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedCommandJob.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedCommandJob.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedCommandJob.withTags(tags); + } else if ("componentId".equals(fieldName)) { + deserializedCommandJob.withComponentId(reader.getString()); + } else if ("computeId".equals(fieldName)) { + deserializedCommandJob.withComputeId(reader.getString()); } else if ("displayName".equals(fieldName)) { deserializedCommandJob.withDisplayName(reader.getString()); - } else if ("status".equals(fieldName)) { - deserializedCommandJob.status = JobStatus.fromString(reader.getString()); } else if ("experimentName".equals(fieldName)) { deserializedCommandJob.withExperimentName(reader.getString()); - } else if ("services".equals(fieldName)) { - Map services = reader.readMap(reader1 -> JobService.fromJson(reader1)); - deserializedCommandJob.withServices(services); - } else if ("computeId".equals(fieldName)) { - deserializedCommandJob.withComputeId(reader.getString()); - } else if ("isArchived".equals(fieldName)) { - deserializedCommandJob.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("identity".equals(fieldName)) { deserializedCommandJob.withIdentity(IdentityConfiguration.fromJson(reader)); - } else if ("componentId".equals(fieldName)) { - deserializedCommandJob.withComponentId(reader.getString()); + } else if ("isArchived".equals(fieldName)) { + deserializedCommandJob.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("notificationSetting".equals(fieldName)) { deserializedCommandJob.withNotificationSetting(NotificationSetting.fromJson(reader)); + } else if ("parentJobName".equals(fieldName)) { + deserializedCommandJob.withParentJobName(reader.getString()); + } else if ("services".equals(fieldName)) { + Map services = reader.readMap(reader1 -> JobService.fromJson(reader1)); + deserializedCommandJob.withServices(services); + } else if ("status".equals(fieldName)) { + deserializedCommandJob.withStatus(JobStatus.fromString(reader.getString())); } else if ("command".equals(fieldName)) { deserializedCommandJob.command = reader.getString(); } else if ("environmentId".equals(fieldName)) { deserializedCommandJob.environmentId = reader.getString(); } else if ("jobType".equals(fieldName)) { deserializedCommandJob.jobType = JobType.fromString(reader.getString()); - } else if ("resources".equals(fieldName)) { - deserializedCommandJob.resources = JobResourceConfiguration.fromJson(reader); } else if ("codeId".equals(fieldName)) { deserializedCommandJob.codeId = reader.getString(); + } else if ("distribution".equals(fieldName)) { + deserializedCommandJob.distribution = DistributionConfiguration.fromJson(reader); + } else if ("environmentVariables".equals(fieldName)) { + Map environmentVariables = reader.readMap(reader1 -> reader1.getString()); + deserializedCommandJob.environmentVariables = environmentVariables; } else if ("inputs".equals(fieldName)) { Map inputs = reader.readMap(reader1 -> JobInput.fromJson(reader1)); deserializedCommandJob.inputs = inputs; + } else if ("limits".equals(fieldName)) { + deserializedCommandJob.limits = CommandJobLimits.fromJson(reader); } else if ("outputs".equals(fieldName)) { Map outputs = reader.readMap(reader1 -> JobOutput.fromJson(reader1)); deserializedCommandJob.outputs = outputs; - } else if ("distribution".equals(fieldName)) { - deserializedCommandJob.distribution = DistributionConfiguration.fromJson(reader); - } else if ("limits".equals(fieldName)) { - deserializedCommandJob.limits = CommandJobLimits.fromJson(reader); - } else if ("environmentVariables".equals(fieldName)) { - Map environmentVariables = reader.readMap(reader1 -> reader1.getString()); - deserializedCommandJob.environmentVariables = environmentVariables; } else if ("parameters".equals(fieldName)) { deserializedCommandJob.parameters = reader.readUntyped(); } else if ("queueSettings".equals(fieldName)) { deserializedCommandJob.queueSettings = QueueSettings.fromJson(reader); + } else if ("resources".equals(fieldName)) { + deserializedCommandJob.resources = JobResourceConfiguration.fromJson(reader); } else { reader.skipChildren(); } 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 a45e5518cd9b0..a0dccf2228273 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 @@ -54,7 +54,6 @@ public CommandJobLimits withTimeout(Duration timeout) { */ @Override public void validate() { - super.validate(); } /** 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 57d7926b42dd1..6a37291619ce7 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 @@ -23,14 +23,14 @@ public final class ComponentContainerProperties extends AssetContainer { private AssetProvisioningState provisioningState; /* - * The latest version inside this container. + * The next auto incremental version */ - private String latestVersion; + private String nextVersion; /* - * The next auto incremental version + * The latest version inside this container. */ - private String nextVersion; + private String latestVersion; /** * Creates an instance of ComponentContainerProperties class. @@ -48,23 +48,23 @@ public AssetProvisioningState provisioningState() { } /** - * Get the latestVersion property: The latest version inside this container. + * Get the nextVersion property: The next auto incremental version. * - * @return the latestVersion value. + * @return the nextVersion value. */ @Override - public String latestVersion() { - return this.latestVersion; + public String nextVersion() { + return this.nextVersion; } /** - * Get the nextVersion property: The next auto incremental version. + * Get the latestVersion property: The latest version inside this container. * - * @return the nextVersion value. + * @return the latestVersion value. */ @Override - public String nextVersion() { - return this.nextVersion; + public String latestVersion() { + return this.latestVersion; } /** @@ -89,8 +89,8 @@ public ComponentContainerProperties withDescription(String description) { * {@inheritDoc} */ @Override - public ComponentContainerProperties withTags(Map tags) { - super.withTags(tags); + public ComponentContainerProperties withProperties(Map properties) { + super.withProperties(properties); return this; } @@ -98,8 +98,8 @@ public ComponentContainerProperties withTags(Map tags) { * {@inheritDoc} */ @Override - public ComponentContainerProperties withProperties(Map properties) { - super.withProperties(properties); + public ComponentContainerProperties withTags(Map tags) { + super.withTags(tags); return this; } @@ -110,7 +110,6 @@ public ComponentContainerProperties withProperties(Map propertie */ @Override public void validate() { - super.validate(); } /** @@ -120,8 +119,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isArchived", isArchived()); return jsonWriter.writeEndObject(); } @@ -143,12 +142,12 @@ public static ComponentContainerProperties fromJson(JsonReader jsonReader) throw if ("description".equals(fieldName)) { deserializedComponentContainerProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedComponentContainerProperties.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedComponentContainerProperties.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedComponentContainerProperties.withTags(tags); } else if ("isArchived".equals(fieldName)) { deserializedComponentContainerProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("latestVersion".equals(fieldName)) { 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 528c4ac02a9b6..ba90af3f12312 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 @@ -20,14 +20,14 @@ public final class ComponentContainerResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type ComponentContainer. + * The link to the next page of ComponentContainer objects. If null, there are no additional pages. */ - private List value; + private String nextLink; /* - * The link to the next page of ComponentContainer objects. If null, there are no additional pages. + * An array of objects of type ComponentContainer. */ - private String nextLink; + private List value; /** * Creates an instance of ComponentContainerResourceArmPaginatedResult class. @@ -36,44 +36,44 @@ public ComponentContainerResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type ComponentContainer. + * Get the nextLink property: The link to the next page of ComponentContainer objects. If null, there are no + * additional pages. * - * @return the value value. + * @return the nextLink value. */ - public List value() { - return this.value; + public String nextLink() { + return this.nextLink; } /** - * Set the value property: An array of objects of type ComponentContainer. + * Set the nextLink property: The link to the next page of ComponentContainer objects. If null, there are no + * additional pages. * - * @param value the value value to set. + * @param nextLink the nextLink value to set. * @return the ComponentContainerResourceArmPaginatedResult object itself. */ - public ComponentContainerResourceArmPaginatedResult withValue(List value) { - this.value = value; + public ComponentContainerResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; return this; } /** - * Get the nextLink property: The link to the next page of ComponentContainer objects. If null, there are no - * additional pages. + * Get the value property: An array of objects of type ComponentContainer. * - * @return the nextLink value. + * @return the value value. */ - public String nextLink() { - return this.nextLink; + public List value() { + return this.value; } /** - * Set the nextLink property: The link to the next page of ComponentContainer objects. If null, there are no - * additional pages. + * Set the value property: An array of objects of type ComponentContainer. * - * @param nextLink the nextLink value to set. + * @param value the value value to set. * @return the ComponentContainerResourceArmPaginatedResult object itself. */ - public ComponentContainerResourceArmPaginatedResult withNextLink(String nextLink) { - this.nextLink = nextLink; + public ComponentContainerResourceArmPaginatedResult withValue(List value) { + this.value = value; return this; } @@ -94,8 +94,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -115,12 +115,12 @@ public static ComponentContainerResourceArmPaginatedResult fromJson(JsonReader j String fieldName = reader.getFieldName(); reader.nextToken(); - if ("value".equals(fieldName)) { + if ("nextLink".equals(fieldName)) { + deserializedComponentContainerResourceArmPaginatedResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> ComponentContainerInner.fromJson(reader1)); deserializedComponentContainerResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedComponentContainerResourceArmPaginatedResult.nextLink = reader.getString(); } else { reader.skipChildren(); } 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 c13b4037b1546..d4a6b5de32a7a 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 @@ -68,8 +68,8 @@ public AssetProvisioningState provisioningState() { * {@inheritDoc} */ @Override - public ComponentVersionProperties withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); + public ComponentVersionProperties withIsAnonymous(Boolean isAnonymous) { + super.withIsAnonymous(isAnonymous); return this; } @@ -77,8 +77,8 @@ public ComponentVersionProperties withIsArchived(Boolean isArchived) { * {@inheritDoc} */ @Override - public ComponentVersionProperties withIsAnonymous(Boolean isAnonymous) { - super.withIsAnonymous(isAnonymous); + public ComponentVersionProperties withIsArchived(Boolean isArchived) { + super.withIsArchived(isArchived); return this; } @@ -95,8 +95,8 @@ public ComponentVersionProperties withDescription(String description) { * {@inheritDoc} */ @Override - public ComponentVersionProperties withTags(Map tags) { - super.withTags(tags); + public ComponentVersionProperties withProperties(Map properties) { + super.withProperties(properties); return this; } @@ -104,8 +104,8 @@ public ComponentVersionProperties withTags(Map tags) { * {@inheritDoc} */ @Override - public ComponentVersionProperties withProperties(Map properties) { - super.withProperties(properties); + public ComponentVersionProperties withTags(Map tags) { + super.withTags(tags); return this; } @@ -116,7 +116,6 @@ public ComponentVersionProperties withProperties(Map properties) */ @Override public void validate() { - super.validate(); } /** @@ -126,10 +125,10 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", isArchived()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isAnonymous", isAnonymous()); + jsonWriter.writeBooleanField("isArchived", isArchived()); jsonWriter.writeUntypedField("componentSpec", this.componentSpec); return jsonWriter.writeEndObject(); } @@ -151,16 +150,16 @@ public static ComponentVersionProperties fromJson(JsonReader jsonReader) throws if ("description".equals(fieldName)) { deserializedComponentVersionProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedComponentVersionProperties.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedComponentVersionProperties.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedComponentVersionProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedComponentVersionProperties.withTags(tags); } else if ("isAnonymous".equals(fieldName)) { deserializedComponentVersionProperties.withIsAnonymous(reader.getNullable(JsonReader::getBoolean)); + } else if ("isArchived".equals(fieldName)) { + deserializedComponentVersionProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("componentSpec".equals(fieldName)) { deserializedComponentVersionProperties.componentSpec = reader.readUntyped(); } else if ("provisioningState".equals(fieldName)) { 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 f555f5ced0b0d..11a989b4a1f52 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 @@ -20,14 +20,14 @@ public final class ComponentVersionResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type ComponentVersion. + * The link to the next page of ComponentVersion objects. If null, there are no additional pages. */ - private List value; + private String nextLink; /* - * The link to the next page of ComponentVersion objects. If null, there are no additional pages. + * An array of objects of type ComponentVersion. */ - private String nextLink; + private List value; /** * Creates an instance of ComponentVersionResourceArmPaginatedResult class. @@ -36,44 +36,44 @@ public ComponentVersionResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type ComponentVersion. + * Get the nextLink property: The link to the next page of ComponentVersion objects. If null, there are no + * additional pages. * - * @return the value value. + * @return the nextLink value. */ - public List value() { - return this.value; + public String nextLink() { + return this.nextLink; } /** - * Set the value property: An array of objects of type ComponentVersion. + * Set the nextLink property: The link to the next page of ComponentVersion objects. If null, there are no + * additional pages. * - * @param value the value value to set. + * @param nextLink the nextLink value to set. * @return the ComponentVersionResourceArmPaginatedResult object itself. */ - public ComponentVersionResourceArmPaginatedResult withValue(List value) { - this.value = value; + public ComponentVersionResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; return this; } /** - * Get the nextLink property: The link to the next page of ComponentVersion objects. If null, there are no - * additional pages. + * Get the value property: An array of objects of type ComponentVersion. * - * @return the nextLink value. + * @return the value value. */ - public String nextLink() { - return this.nextLink; + public List value() { + return this.value; } /** - * Set the nextLink property: The link to the next page of ComponentVersion objects. If null, there are no - * additional pages. + * Set the value property: An array of objects of type ComponentVersion. * - * @param nextLink the nextLink value to set. + * @param value the value value to set. * @return the ComponentVersionResourceArmPaginatedResult object itself. */ - public ComponentVersionResourceArmPaginatedResult withNextLink(String nextLink) { - this.nextLink = nextLink; + public ComponentVersionResourceArmPaginatedResult withValue(List value) { + this.value = value; return this; } @@ -94,8 +94,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -115,12 +115,12 @@ public static ComponentVersionResourceArmPaginatedResult fromJson(JsonReader jso String fieldName = reader.getFieldName(); reader.nextToken(); - if ("value".equals(fieldName)) { + if ("nextLink".equals(fieldName)) { + deserializedComponentVersionResourceArmPaginatedResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> ComponentVersionInner.fromJson(reader1)); deserializedComponentVersionResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedComponentVersionResourceArmPaginatedResult.nextLink = reader.getString(); } else { reader.skipChildren(); } 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 1bfa1ed54b165..49707ad099722 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 @@ -11,7 +11,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.time.OffsetDateTime; import java.util.List; /** @@ -29,32 +28,6 @@ public final class ComputeInstance extends Compute { */ private ComputeInstanceProperties properties; - /* - * The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - */ - private ProvisioningState provisioningState; - - /* - * The time at which the compute was created. - */ - private OffsetDateTime createdOn; - - /* - * The time at which the compute was last modified. - */ - private OffsetDateTime modifiedOn; - - /* - * Errors during provisioning - */ - private List provisioningErrors; - - /* - * Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning - * service provisioned it if false. - */ - private Boolean isAttachedCompute; - /** * Creates an instance of ComputeInstance class. */ @@ -91,58 +64,6 @@ public ComputeInstance withProperties(ComputeInstanceProperties properties) { return this; } - /** - * Get the provisioningState property: The provision state of the cluster. Valid values are Unknown, Updating, - * Provisioning, Succeeded, and Failed. - * - * @return the provisioningState value. - */ - @Override - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the createdOn property: The time at which the compute was created. - * - * @return the createdOn value. - */ - @Override - public OffsetDateTime createdOn() { - return this.createdOn; - } - - /** - * Get the modifiedOn property: The time at which the compute was last modified. - * - * @return the modifiedOn value. - */ - @Override - public OffsetDateTime modifiedOn() { - return this.modifiedOn; - } - - /** - * Get the provisioningErrors property: Errors during provisioning. - * - * @return the provisioningErrors value. - */ - @Override - public List provisioningErrors() { - return this.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. - */ - @Override - public Boolean isAttachedCompute() { - return this.isAttachedCompute; - } - /** * {@inheritDoc} */ @@ -186,7 +107,6 @@ public ComputeInstance withDisableLocalAuth(Boolean disableLocalAuth) { */ @Override public void validate() { - super.validate(); if (properties() != null) { properties().validate(); } @@ -225,23 +145,23 @@ public static ComputeInstance fromJson(JsonReader jsonReader) throws IOException if ("computeLocation".equals(fieldName)) { deserializedComputeInstance.withComputeLocation(reader.getString()); } else if ("provisioningState".equals(fieldName)) { - deserializedComputeInstance.provisioningState = ProvisioningState.fromString(reader.getString()); + deserializedComputeInstance.withProvisioningState(ProvisioningState.fromString(reader.getString())); } else if ("description".equals(fieldName)) { deserializedComputeInstance.withDescription(reader.getString()); } else if ("createdOn".equals(fieldName)) { - deserializedComputeInstance.createdOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedComputeInstance.withCreatedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("modifiedOn".equals(fieldName)) { - deserializedComputeInstance.modifiedOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedComputeInstance.withModifiedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("resourceId".equals(fieldName)) { deserializedComputeInstance.withResourceId(reader.getString()); } else if ("provisioningErrors".equals(fieldName)) { List provisioningErrors = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); - deserializedComputeInstance.provisioningErrors = provisioningErrors; + deserializedComputeInstance.withProvisioningErrors(provisioningErrors); } else if ("isAttachedCompute".equals(fieldName)) { - deserializedComputeInstance.isAttachedCompute = reader.getNullable(JsonReader::getBoolean); + deserializedComputeInstance.withIsAttachedCompute(reader.getNullable(JsonReader::getBoolean)); } else if ("disableLocalAuth".equals(fieldName)) { deserializedComputeInstance.withDisableLocalAuth(reader.getNullable(JsonReader::getBoolean)); } else if ("computeType".equals(fieldName)) { 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..b18ca0fcf3379 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceAutologgerSettings.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Specifies settings for autologger. + */ +@Fluent +public final class ComputeInstanceAutologgerSettings implements JsonSerializable { + /* + * Indicates whether mlflow autologger is enabled for notebooks. + */ + 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() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("mlflowAutologger", + this.mlflowAutologger == null ? null : this.mlflowAutologger.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ComputeInstanceAutologgerSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ComputeInstanceAutologgerSettings if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ComputeInstanceAutologgerSettings. + */ + public static ComputeInstanceAutologgerSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ComputeInstanceAutologgerSettings deserializedComputeInstanceAutologgerSettings + = new ComputeInstanceAutologgerSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("mlflowAutologger".equals(fieldName)) { + deserializedComputeInstanceAutologgerSettings.mlflowAutologger + = MlflowAutologger.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedComputeInstanceAutologgerSettings; + }); + } +} 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 0dd370593ab47..142d1a936f0ee 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 @@ -39,6 +39,11 @@ public final class ComputeInstanceDataMount implements JsonSerializable writer.writeJson(element)); jsonWriter.writeStringField("computeInstanceAuthorizationType", this.computeInstanceAuthorizationType == null ? null : this.computeInstanceAuthorizationType.toString()); + jsonWriter.writeBooleanField("enableOSPatching", this.enableOSPatching); + jsonWriter.writeBooleanField("enableRootAccess", this.enableRootAccess); + jsonWriter.writeBooleanField("enableSSO", this.enableSso); + jsonWriter.writeBooleanField("releaseQuotaOnStop", this.releaseQuotaOnStop); jsonWriter.writeJsonField("personalComputeInstanceSettings", this.personalComputeInstanceSettings); jsonWriter.writeJsonField("setupScripts", this.setupScripts); jsonWriter.writeJsonField("schedules", this.schedules); + jsonWriter.writeStringField("idleTimeBeforeShutdown", this.idleTimeBeforeShutdown); jsonWriter.writeBooleanField("enableNodePublicIp", this.enableNodePublicIp); return jsonWriter.writeEndObject(); } @@ -541,6 +706,9 @@ public static ComputeInstanceProperties fromJson(JsonReader jsonReader) throws I } else if ("applicationSharingPolicy".equals(fieldName)) { deserializedComputeInstanceProperties.applicationSharingPolicy = ApplicationSharingPolicy.fromString(reader.getString()); + } else if ("autologgerSettings".equals(fieldName)) { + deserializedComputeInstanceProperties.autologgerSettings + = ComputeInstanceAutologgerSettings.fromJson(reader); } else if ("sshSettings".equals(fieldName)) { deserializedComputeInstanceProperties.sshSettings = ComputeInstanceSshSettings.fromJson(reader); } else if ("customServices".equals(fieldName)) { @@ -565,6 +733,15 @@ public static ComputeInstanceProperties fromJson(JsonReader jsonReader) throws I } else if ("computeInstanceAuthorizationType".equals(fieldName)) { deserializedComputeInstanceProperties.computeInstanceAuthorizationType = ComputeInstanceAuthorizationType.fromString(reader.getString()); + } else if ("enableOSPatching".equals(fieldName)) { + deserializedComputeInstanceProperties.enableOSPatching = reader.getNullable(JsonReader::getBoolean); + } else if ("enableRootAccess".equals(fieldName)) { + deserializedComputeInstanceProperties.enableRootAccess = reader.getNullable(JsonReader::getBoolean); + } else if ("enableSSO".equals(fieldName)) { + deserializedComputeInstanceProperties.enableSso = reader.getNullable(JsonReader::getBoolean); + } else if ("releaseQuotaOnStop".equals(fieldName)) { + deserializedComputeInstanceProperties.releaseQuotaOnStop + = reader.getNullable(JsonReader::getBoolean); } else if ("personalComputeInstanceSettings".equals(fieldName)) { deserializedComputeInstanceProperties.personalComputeInstanceSettings = PersonalComputeInstanceSettings.fromJson(reader); @@ -574,6 +751,8 @@ public static ComputeInstanceProperties fromJson(JsonReader jsonReader) throws I deserializedComputeInstanceProperties.lastOperation = ComputeInstanceLastOperation.fromJson(reader); } else if ("schedules".equals(fieldName)) { deserializedComputeInstanceProperties.schedules = ComputeSchedules.fromJson(reader); + } else if ("idleTimeBeforeShutdown".equals(fieldName)) { + deserializedComputeInstanceProperties.idleTimeBeforeShutdown = reader.getString(); } else if ("enableNodePublicIp".equals(fieldName)) { deserializedComputeInstanceProperties.enableNodePublicIp = reader.getNullable(JsonReader::getBoolean); 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 6c26b3a23bdb4..50b43fd38bd90 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 @@ -36,6 +36,11 @@ public final class ComputeInstanceState extends ExpandableStringEnum { /** 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 df09ca34c41ab..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,6 +10,7 @@ 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; /** @@ -294,6 +295,28 @@ interface WithProperties { */ 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. * @@ -337,6 +360,28 @@ interface WithProperties { */ 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. * @@ -390,4 +435,67 @@ interface WithProperties { * @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/ComputeRuntimeDto.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeRuntimeDto.java index ad32d64c5000c..d2de520911897 100644 --- 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 @@ -12,7 +12,7 @@ import java.io.IOException; /** - * Compute runtime config for feature store type workspace. + * The ComputeRuntimeDto model. */ @Fluent public final class ComputeRuntimeDto implements JsonSerializable { 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 index 3fde166513a07..7e4ae0699c2fe 100644 --- 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 @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Is the trigger type recurrence or cron. + * Defines values for ComputeTriggerType. */ public final class ComputeTriggerType extends ExpandableStringEnum { /** 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 23ed47cce1777..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,6 +7,7 @@ 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. @@ -99,6 +100,36 @@ void delete(String resourceGroupName, String workspaceName, String computeName, 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. * @@ -159,6 +190,36 @@ Response listKeysWithResponse(String resourceGroupName, String w */ 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. * @@ -234,6 +295,93 @@ Response listKeysWithResponse(String resourceGroupName, String w */ 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. 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 4de28370a2302..dbbe4d76cf371 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 @@ -76,6 +76,11 @@ public final class ConnectionCategory extends ExpandableStringEnum addBulk(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, List body); + + /** + * Add multiple blocklist items to the specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body Properties describing the custom blocklist items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of RaiBlocklistItemPropertiesBasicResource. + */ + List addBulk(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, List body, Context context); + + /** + * Delete multiple blocklist items from the specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body List of RAI Blocklist Items Names. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 deleteBulk(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + Object body); + + /** + * Delete multiple blocklist items from the specified blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param body List of RAI Blocklist Items Names. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 deleteBulk(String resourceGroupName, String workspaceName, String connectionName, String raiBlocklistName, + Object body, Context context); + + /** + * Deletes the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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, String raiBlocklistName, + String raiBlocklistItemName); + + /** + * Deletes the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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, String raiBlocklistName, + String raiBlocklistItemName, String proxyApiVersion, Context context); + + /** + * Gets the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 custom blocklist item associated with the Azure OpenAI connection along with + * {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, String raiBlocklistItemName, Context context); + + /** + * Gets the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param raiBlocklistItemName Name of the RaiBlocklist Item. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 custom blocklist item associated with the Azure OpenAI connection. + */ + RaiBlocklistItemPropertiesBasicResource get(String resourceGroupName, String workspaceName, String connectionName, + String raiBlocklistName, String raiBlocklistItemName); + + /** + * Gets the specified custom blocklist item associated with the Azure OpenAI 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 custom blocklist item associated with the Azure OpenAI connection along with + * {@link Response}. + */ + RaiBlocklistItemPropertiesBasicResource getById(String id); + + /** + * Gets the specified custom blocklist item associated with the Azure OpenAI 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 custom blocklist item associated with the Azure OpenAI connection along with + * {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes the specified custom blocklist item associated with the Azure OpenAI 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. + */ + void deleteById(String id); + + /** + * Deletes the specified custom blocklist item associated with the Azure OpenAI connection. + * + * @param id the resource ID. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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, String proxyApiVersion, Context context); + + /** + * Begins definition for a new RaiBlocklistItemPropertiesBasicResource resource. + * + * @param name resource name. + * @return the first stage of the new RaiBlocklistItemPropertiesBasicResource definition. + */ + RaiBlocklistItemPropertiesBasicResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiBlocklistItemsOperations.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiBlocklistItemsOperations.java new file mode 100644 index 0000000000000..6c7d8396d92d5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiBlocklistItemsOperations.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** + * Resource collection API of ConnectionRaiBlocklistItemsOperations. + */ +public interface ConnectionRaiBlocklistItemsOperations { + /** + * Gets the custom blocklist items associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the custom blocklist items associated with the Azure OpenAI connection as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName); + + /** + * Gets the custom blocklist items associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the custom blocklist items associated with the Azure OpenAI connection as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, String proxyApiVersion, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiBlocklistOperations.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiBlocklistOperations.java new file mode 100644 index 0000000000000..2bc6bb78f763a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiBlocklistOperations.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.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of ConnectionRaiBlocklistOperations. + */ +public interface ConnectionRaiBlocklistOperations { + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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, String raiBlocklistName); + + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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, String raiBlocklistName, + String proxyApiVersion, Context context); + + /** + * Gets the specified custom blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 custom blocklist associated with the Azure OpenAI connection along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName, Context context); + + /** + * Gets the specified custom blocklist associated with the Azure OpenAI connection. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 custom blocklist associated with the Azure OpenAI connection. + */ + RaiBlocklistPropertiesBasicResource get(String resourceGroupName, String workspaceName, String connectionName, + String raiBlocklistName); + + /** + * Gets the specified custom blocklist associated with the Azure OpenAI 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 custom blocklist associated with the Azure OpenAI connection along with {@link Response}. + */ + RaiBlocklistPropertiesBasicResource getById(String id); + + /** + * Gets the specified custom blocklist associated with the Azure OpenAI 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 custom blocklist associated with the Azure OpenAI connection along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI 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. + */ + void deleteById(String id); + + /** + * Deletes the specified custom blocklist associated with the Azure OpenAI connection. + * + * @param id the resource ID. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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, String proxyApiVersion, Context context); + + /** + * Begins definition for a new RaiBlocklistPropertiesBasicResource resource. + * + * @param name resource name. + * @return the first stage of the new RaiBlocklistPropertiesBasicResource definition. + */ + RaiBlocklistPropertiesBasicResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiBlocklists.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiBlocklists.java new file mode 100644 index 0000000000000..cb98d5a4167c8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiBlocklists.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** + * Resource collection API of ConnectionRaiBlocklists. + */ +public interface ConnectionRaiBlocklists { + /** + * Gets the custom blocklists associated with the Azure OpenAI connection. + * + * @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 custom blocklists associated with the Azure OpenAI connection as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName); + + /** + * Gets the custom blocklists associated with the Azure OpenAI connection. + * + * @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 proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the custom blocklists associated with the Azure OpenAI connection as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName, String proxyApiVersion, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiPolicies.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiPolicies.java new file mode 100644 index 0000000000000..746d62e47bc84 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiPolicies.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** + * Resource collection API of ConnectionRaiPolicies. + */ +public interface ConnectionRaiPolicies { + /** + * List the specified Content Filters associated with the Azure OpenAI connection. + * + * @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 azure OpenAI Content Filters resource list as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName); + + /** + * List the specified Content Filters associated with the Azure OpenAI connection. + * + * @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 proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource list as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, + String connectionName, String proxyApiVersion, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiPolicyOperations.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiPolicyOperations.java new file mode 100644 index 0000000000000..5e39000edb1ca --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionRaiPolicyOperations.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.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of ConnectionRaiPolicyOperations. + */ +public interface ConnectionRaiPolicyOperations { + /** + * Deletes the specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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, String raiPolicyName); + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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, String raiPolicyName, + String proxyApiVersion, Context context); + + /** + * Gets the specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 Content Filters associated with the Azure OpenAI connection along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String workspaceName, + String connectionName, String raiPolicyName, Context context); + + /** + * Gets the specified Content Filters associated with the Azure OpenAI connection. + * + * @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 raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 Content Filters associated with the Azure OpenAI connection. + */ + RaiPolicyPropertiesBasicResource get(String resourceGroupName, String workspaceName, String connectionName, + String raiPolicyName); + + /** + * Gets the specified Content Filters associated with the Azure OpenAI 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 Content Filters associated with the Azure OpenAI connection along with {@link Response}. + */ + RaiPolicyPropertiesBasicResource getById(String id); + + /** + * Gets the specified Content Filters associated with the Azure OpenAI 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 Content Filters associated with the Azure OpenAI connection along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI 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. + */ + void deleteById(String id); + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI connection. + * + * @param id the resource ID. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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, String proxyApiVersion, Context context); + + /** + * Begins definition for a new RaiPolicyPropertiesBasicResource resource. + * + * @param name resource name. + * @return the first stage of the new RaiPolicyPropertiesBasicResource definition. + */ + RaiPolicyPropertiesBasicResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Connections.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Connections.java new file mode 100644 index 0000000000000..dea8e3402840f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Connections.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.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of Connections. + */ +public interface Connections { + /** + * Get all the deployments under the Azure OpenAI connection. + * + * @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 all the deployments under the Azure OpenAI connection as paginated response with {@link PagedIterable}. + */ + PagedIterable listDeployments(String resourceGroupName, + String workspaceName, String connectionName); + + /** + * Get all the deployments under the Azure OpenAI connection. + * + * @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 proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 Azure OpenAI connection as paginated response with {@link PagedIterable}. + */ + PagedIterable listDeployments(String resourceGroupName, + String workspaceName, String connectionName, String proxyApiVersion, Context context); + + /** + * Delete Azure OpenAI connection 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 connectionName Friendly name of the workspace connection. + * @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 deleteDeployment(String resourceGroupName, String workspaceName, String connectionName, String deploymentName); + + /** + * Delete Azure OpenAI connection 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 connectionName Friendly name of the workspace connection. + * @param deploymentName Name of the deployment resource. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 deleteDeployment(String resourceGroupName, String workspaceName, String connectionName, String deploymentName, + String proxyApiVersion, Context context); + + /** + * Get deployments under the Azure OpenAI connection 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 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 the Azure OpenAI connection by name along with {@link Response}. + */ + Response getDeploymentWithResponse(String resourceGroupName, + String workspaceName, String connectionName, String deploymentName, Context context); + + /** + * Get deployments under the Azure OpenAI connection 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 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 the Azure OpenAI connection by name. + */ + EndpointDeploymentResourcePropertiesBasicResource getDeployment(String resourceGroupName, String workspaceName, + String connectionName, String deploymentName); + + /** + * Get available models under the Azure OpenAI connection. + * + * @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 available models under the Azure OpenAI connection as paginated response with {@link PagedIterable}. + */ + PagedIterable getModels(String resourceGroupName, String workspaceName, + String connectionName); + + /** + * Get available models under the Azure OpenAI connection. + * + * @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 proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 Azure OpenAI connection as paginated response with {@link PagedIterable}. + */ + PagedIterable getModels(String resourceGroupName, String workspaceName, + String connectionName, String proxyApiVersion, Context context); + + /** + * Get models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + * + * @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 models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy along with + * {@link Response}. + */ + Response getAllModelsWithResponse(String resourceGroupName, String workspaceName, Context context); + + /** + * Get models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + * + * @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 models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + */ + EndpointModels getAllModels(String resourceGroupName, String workspaceName); + + /** + * Get deployments under the Azure OpenAI connection 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 the Azure OpenAI connection by name along with {@link Response}. + */ + EndpointDeploymentResourcePropertiesBasicResource getDeploymentById(String id); + + /** + * Get deployments under the Azure OpenAI connection 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 the Azure OpenAI connection by name along with {@link Response}. + */ + Response getDeploymentByIdWithResponse(String id, + Context context); + + /** + * Delete Azure OpenAI connection 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 deleteDeploymentById(String id); + + /** + * Delete Azure OpenAI connection deployment resource by name. + * + * @param id the resource ID. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 deleteDeploymentByIdWithResponse(String id, String proxyApiVersion, 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/ContainerResourceRequirements.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerResourceRequirements.java index e689a8e9fcf00..c97f343dcc245 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 @@ -17,14 +17,14 @@ @Fluent public final class ContainerResourceRequirements implements JsonSerializable { /* - * Container resource request info: + * Container resource limit info: */ - private ContainerResourceSettings containerResourceRequests; + private ContainerResourceSettings containerResourceLimits; /* - * Container resource limit info: + * Container resource request info: */ - private ContainerResourceSettings containerResourceLimits; + private ContainerResourceSettings containerResourceRequests; /** * Creates an instance of ContainerResourceRequirements class. @@ -33,44 +33,44 @@ public ContainerResourceRequirements() { } /** - * Get the containerResourceRequests property: Container resource request info:. + * Get the containerResourceLimits property: Container resource limit info:. * - * @return the containerResourceRequests value. + * @return the containerResourceLimits value. */ - public ContainerResourceSettings containerResourceRequests() { - return this.containerResourceRequests; + public ContainerResourceSettings containerResourceLimits() { + return this.containerResourceLimits; } /** - * Set the containerResourceRequests property: Container resource request info:. + * Set the containerResourceLimits property: Container resource limit info:. * - * @param containerResourceRequests the containerResourceRequests value to set. + * @param containerResourceLimits the containerResourceLimits value to set. * @return the ContainerResourceRequirements object itself. */ public ContainerResourceRequirements - withContainerResourceRequests(ContainerResourceSettings containerResourceRequests) { - this.containerResourceRequests = containerResourceRequests; + withContainerResourceLimits(ContainerResourceSettings containerResourceLimits) { + this.containerResourceLimits = containerResourceLimits; return this; } /** - * Get the containerResourceLimits property: Container resource limit info:. + * Get the containerResourceRequests property: Container resource request info:. * - * @return the containerResourceLimits value. + * @return the containerResourceRequests value. */ - public ContainerResourceSettings containerResourceLimits() { - return this.containerResourceLimits; + public ContainerResourceSettings containerResourceRequests() { + return this.containerResourceRequests; } /** - * Set the containerResourceLimits property: Container resource limit info:. + * Set the containerResourceRequests property: Container resource request info:. * - * @param containerResourceLimits the containerResourceLimits value to set. + * @param containerResourceRequests the containerResourceRequests value to set. * @return the ContainerResourceRequirements object itself. */ public ContainerResourceRequirements - withContainerResourceLimits(ContainerResourceSettings containerResourceLimits) { - this.containerResourceLimits = containerResourceLimits; + withContainerResourceRequests(ContainerResourceSettings containerResourceRequests) { + this.containerResourceRequests = containerResourceRequests; return this; } @@ -80,12 +80,12 @@ public ContainerResourceSettings containerResourceLimits() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (containerResourceRequests() != null) { - containerResourceRequests().validate(); - } if (containerResourceLimits() != null) { containerResourceLimits().validate(); } + if (containerResourceRequests() != null) { + containerResourceRequests().validate(); + } } /** @@ -94,8 +94,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("containerResourceRequests", this.containerResourceRequests); jsonWriter.writeJsonField("containerResourceLimits", this.containerResourceLimits); + jsonWriter.writeJsonField("containerResourceRequests", this.containerResourceRequests); return jsonWriter.writeEndObject(); } @@ -115,12 +115,12 @@ public static ContainerResourceRequirements fromJson(JsonReader jsonReader) thro String fieldName = reader.getFieldName(); reader.nextToken(); - if ("containerResourceRequests".equals(fieldName)) { - deserializedContainerResourceRequirements.containerResourceRequests - = ContainerResourceSettings.fromJson(reader); - } else if ("containerResourceLimits".equals(fieldName)) { + if ("containerResourceLimits".equals(fieldName)) { deserializedContainerResourceRequirements.containerResourceLimits = ContainerResourceSettings.fromJson(reader); + } else if ("containerResourceRequests".equals(fieldName)) { + deserializedContainerResourceRequirements.containerResourceRequests + = ContainerResourceSettings.fromJson(reader); } else { reader.skipChildren(); } 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 2f23c63d3ef8f..6747613c38088 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 @@ -23,16 +23,16 @@ public final class ContainerResourceSettings implements JsonSerializable { + /* + * [Required] Specifies the current safety level for content safety. + */ + private ContentSafetyLevel contentSafetyLevel; + /* * [Required] Specifies the status of content safety. */ @@ -28,6 +33,26 @@ public final class ContentSafety implements JsonSerializable { public ContentSafety() { } + /** + * Get the contentSafetyLevel property: [Required] Specifies the current safety level for content safety. + * + * @return the contentSafetyLevel value. + */ + public ContentSafetyLevel contentSafetyLevel() { + return this.contentSafetyLevel; + } + + /** + * Set the contentSafetyLevel property: [Required] Specifies the current safety level for content safety. + * + * @param contentSafetyLevel the contentSafetyLevel value to set. + * @return the ContentSafety object itself. + */ + public ContentSafety withContentSafetyLevel(ContentSafetyLevel contentSafetyLevel) { + this.contentSafetyLevel = contentSafetyLevel; + return this; + } + /** * Get the contentSafetyStatus property: [Required] Specifies the status of content safety. * @@ -71,6 +96,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("contentSafetyStatus", this.contentSafetyStatus == null ? null : this.contentSafetyStatus.toString()); + jsonWriter.writeStringField("contentSafetyLevel", + this.contentSafetyLevel == null ? null : this.contentSafetyLevel.toString()); return jsonWriter.writeEndObject(); } @@ -92,6 +119,8 @@ public static ContentSafety fromJson(JsonReader jsonReader) throws IOException { if ("contentSafetyStatus".equals(fieldName)) { deserializedContentSafety.contentSafetyStatus = ContentSafetyStatus.fromString(reader.getString()); + } else if ("contentSafetyLevel".equals(fieldName)) { + deserializedContentSafety.contentSafetyLevel = ContentSafetyLevel.fromString(reader.getString()); } else { reader.skipChildren(); } 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..a4eefacb35b67 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyEndpointDeploymentResourceProperties.java @@ -0,0 +1,231 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the 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.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The ContentSafetyEndpointDeploymentResourceProperties model. + */ +@Fluent +public final class ContentSafetyEndpointDeploymentResourceProperties extends EndpointDeploymentResourceProperties { + /* + * Kind of the deployment. + */ + private String type = "Azure.ContentSafety"; + + /* + * Model used for the endpoint deployment. + */ + private EndpointDeploymentModel model; + + /* + * The name of RAI policy. + */ + private String raiPolicyName; + + /* + * The sku property. + */ + private CognitiveServicesSku sku; + + /* + * Deployment model version upgrade option. + */ + private DeploymentModelVersionUpgradeOption versionUpgradeOption; + + /** + * Creates an instance of ContentSafetyEndpointDeploymentResourceProperties class. + */ + public ContentSafetyEndpointDeploymentResourceProperties() { + } + + /** + * Get the type property: Kind of the deployment. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * 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() { + if (model() == null) { + throw LOGGER.atError() + .log(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); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("failureReason", failureReason()); + jsonWriter.writeJsonField("model", this.model); + jsonWriter.writeStringField("type", this.type); + jsonWriter.writeStringField("raiPolicyName", this.raiPolicyName); + jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeStringField("versionUpgradeOption", + this.versionUpgradeOption == null ? null : this.versionUpgradeOption.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ContentSafetyEndpointDeploymentResourceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ContentSafetyEndpointDeploymentResourceProperties if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ContentSafetyEndpointDeploymentResourceProperties. + */ + public static ContentSafetyEndpointDeploymentResourceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ContentSafetyEndpointDeploymentResourceProperties deserializedContentSafetyEndpointDeploymentResourceProperties + = new ContentSafetyEndpointDeploymentResourceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("failureReason".equals(fieldName)) { + deserializedContentSafetyEndpointDeploymentResourceProperties.withFailureReason(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedContentSafetyEndpointDeploymentResourceProperties + .withProvisioningState(DefaultResourceProvisioningState.fromString(reader.getString())); + } else if ("model".equals(fieldName)) { + deserializedContentSafetyEndpointDeploymentResourceProperties.model + = EndpointDeploymentModel.fromJson(reader); + } else if ("type".equals(fieldName)) { + deserializedContentSafetyEndpointDeploymentResourceProperties.type = reader.getString(); + } else if ("raiPolicyName".equals(fieldName)) { + deserializedContentSafetyEndpointDeploymentResourceProperties.raiPolicyName = reader.getString(); + } else if ("sku".equals(fieldName)) { + deserializedContentSafetyEndpointDeploymentResourceProperties.sku + = CognitiveServicesSku.fromJson(reader); + } else if ("versionUpgradeOption".equals(fieldName)) { + deserializedContentSafetyEndpointDeploymentResourceProperties.versionUpgradeOption + = DeploymentModelVersionUpgradeOption.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedContentSafetyEndpointDeploymentResourceProperties; + }); + } +} 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..5a7b5f459c934 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyEndpointResourceProperties.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.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; +import java.io.IOException; +import java.util.List; + +/** + * The ContentSafetyEndpointResourceProperties model. + */ +@Fluent +public final class ContentSafetyEndpointResourceProperties extends EndpointResourceProperties { + /* + * Type of the endpoint. + */ + private EndpointType endpointType = EndpointType.AZURE_CONTENT_SAFETY; + + /** + * Creates an instance of ContentSafetyEndpointResourceProperties class. + */ + public ContentSafetyEndpointResourceProperties() { + } + + /** + * Get the endpointType property: Type of the endpoint. + * + * @return the endpointType value. + */ + @Override + public EndpointType endpointType() { + return this.endpointType; + } + + /** + * {@inheritDoc} + */ + @Override + public ContentSafetyEndpointResourceProperties withAssociatedResourceId(String associatedResourceId) { + super.withAssociatedResourceId(associatedResourceId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ContentSafetyEndpointResourceProperties + withDeployments(List deployments) { + super.withDeployments(deployments); + 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 withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ContentSafetyEndpointResourceProperties withName(String name) { + super.withName(name); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ContentSafetyEndpointResourceProperties + withShouldCreateAiServicesEndpoint(Boolean shouldCreateAiServicesEndpoint) { + super.withShouldCreateAiServicesEndpoint(shouldCreateAiServicesEndpoint); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (deployments() != null) { + deployments().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("associatedResourceId", associatedResourceId()); + jsonWriter.writeArrayField("deployments", deployments(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("endpointUri", endpointUri()); + jsonWriter.writeStringField("failureReason", failureReason()); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeStringField("name", name()); + jsonWriter.writeBooleanField("shouldCreateAiServicesEndpoint", shouldCreateAiServicesEndpoint()); + jsonWriter.writeStringField("endpointType", this.endpointType == null ? null : this.endpointType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ContentSafetyEndpointResourceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ContentSafetyEndpointResourceProperties if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ContentSafetyEndpointResourceProperties. + */ + public static ContentSafetyEndpointResourceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ContentSafetyEndpointResourceProperties deserializedContentSafetyEndpointResourceProperties + = new ContentSafetyEndpointResourceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("associatedResourceId".equals(fieldName)) { + deserializedContentSafetyEndpointResourceProperties.withAssociatedResourceId(reader.getString()); + } else if ("deployments".equals(fieldName)) { + List deployments = reader + .readArray(reader1 -> EndpointDeploymentResourcePropertiesBasicResourceInner.fromJson(reader1)); + deserializedContentSafetyEndpointResourceProperties.withDeployments(deployments); + } else if ("endpointUri".equals(fieldName)) { + deserializedContentSafetyEndpointResourceProperties.withEndpointUri(reader.getString()); + } else if ("failureReason".equals(fieldName)) { + deserializedContentSafetyEndpointResourceProperties.withFailureReason(reader.getString()); + } else if ("location".equals(fieldName)) { + deserializedContentSafetyEndpointResourceProperties.withLocation(reader.getString()); + } else if ("name".equals(fieldName)) { + deserializedContentSafetyEndpointResourceProperties.withName(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedContentSafetyEndpointResourceProperties + .withProvisioningState(DefaultResourceProvisioningState.fromString(reader.getString())); + } else if ("shouldCreateAiServicesEndpoint".equals(fieldName)) { + deserializedContentSafetyEndpointResourceProperties + .withShouldCreateAiServicesEndpoint(reader.getNullable(JsonReader::getBoolean)); + } else if ("endpointType".equals(fieldName)) { + deserializedContentSafetyEndpointResourceProperties.endpointType + = EndpointType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedContentSafetyEndpointResourceProperties; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyLevel.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyLevel.java new file mode 100644 index 0000000000000..d205c1e564611 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContentSafetyLevel.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies the current safety level for content safety. + */ +public final class ContentSafetyLevel extends ExpandableStringEnum { + /** + * Static value Blocking for ContentSafetyLevel. + */ + public static final ContentSafetyLevel BLOCKING = fromString("Blocking"); + + /** + * Static value Deferred for ContentSafetyLevel. + */ + public static final ContentSafetyLevel DEFERRED = fromString("Deferred"); + + /** + * Creates a new instance of ContentSafetyLevel value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ContentSafetyLevel() { + } + + /** + * Creates or finds a ContentSafetyLevel from its string representation. + * + * @param name a name to look for. + * @return the corresponding ContentSafetyLevel. + */ + public static ContentSafetyLevel fromString(String name) { + return fromString(name, ContentSafetyLevel.class); + } + + /** + * Gets known ContentSafetyLevel values. + * + * @return known ContentSafetyLevel values. + */ + public static Collection values() { + return values(ContentSafetyLevel.class); + } +} 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 1578c354e5d99..9412c6c650a65 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 @@ -17,7 +17,7 @@ @Fluent public final class CosmosDbSettings implements JsonSerializable { /* - * The throughput of the collections in cosmosdb database + * The collectionsThroughput property. */ private Integer collectionsThroughput; @@ -28,7 +28,7 @@ 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. */ @@ -37,7 +37,7 @@ 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. 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 index c98290a484ccb..864ec7b3e77ca 100644 --- 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 @@ -69,7 +69,6 @@ public CreateMonitorAction withMonitorDefinition(MonitorDefinition monitorDefini */ @Override public void validate() { - super.validate(); if (monitorDefinition() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( 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 bcf293efc9743..146e0a9366222 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 @@ -99,7 +99,6 @@ public CronTrigger withTimeZone(String timeZone) { */ @Override public void validate() { - super.validate(); if (expression() == null) { throw LOGGER.atError() .log(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/CustomForecastHorizon.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomForecastHorizon.java index b3d3c25650eb1..d101986fb9bd5 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 @@ -68,7 +68,6 @@ public CustomForecastHorizon withValue(int value) { */ @Override public void validate() { - super.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 index 3b2acc870c515..a63e6176ec0d9 100644 --- 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 @@ -34,16 +34,6 @@ public final class CustomKeysWorkspaceConnectionProperties extends WorkspaceConn */ private CustomKeys credentials; - /* - * The createdByWorkspaceArmId property. - */ - private String createdByWorkspaceArmId; - - /* - * Group based on connection category - */ - private ConnectionGroup group; - /** * Creates an instance of CustomKeysWorkspaceConnectionProperties class. */ @@ -81,31 +71,29 @@ public CustomKeysWorkspaceConnectionProperties withCredentials(CustomKeys creden } /** - * Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. - * - * @return the createdByWorkspaceArmId value. + * {@inheritDoc} */ @Override - public String createdByWorkspaceArmId() { - return this.createdByWorkspaceArmId; + public CustomKeysWorkspaceConnectionProperties withCategory(ConnectionCategory category) { + super.withCategory(category); + return this; } /** - * Get the group property: Group based on connection category. - * - * @return the group value. + * {@inheritDoc} */ @Override - public ConnectionGroup group() { - return this.group; + public CustomKeysWorkspaceConnectionProperties withError(String error) { + super.withError(error); + return this; } /** * {@inheritDoc} */ @Override - public CustomKeysWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); + public CustomKeysWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { + super.withExpiryTime(expiryTime); return this; } @@ -113,8 +101,8 @@ public CustomKeysWorkspaceConnectionProperties withCategory(ConnectionCategory c * {@inheritDoc} */ @Override - public CustomKeysWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { - super.withExpiryTime(expiryTime); + public CustomKeysWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { + super.withIsSharedToAll(isSharedToAll); return this; } @@ -122,8 +110,8 @@ public CustomKeysWorkspaceConnectionProperties withExpiryTime(OffsetDateTime exp * {@inheritDoc} */ @Override - public CustomKeysWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { - super.withIsSharedToAll(isSharedToAll); + public CustomKeysWorkspaceConnectionProperties withMetadata(Map metadata) { + super.withMetadata(metadata); return this; } @@ -131,8 +119,8 @@ public CustomKeysWorkspaceConnectionProperties withIsSharedToAll(Boolean isShare * {@inheritDoc} */ @Override - public CustomKeysWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); + public CustomKeysWorkspaceConnectionProperties withPeRequirement(ManagedPERequirement peRequirement) { + super.withPeRequirement(peRequirement); return this; } @@ -140,8 +128,8 @@ public CustomKeysWorkspaceConnectionProperties withTarget(String target) { * {@inheritDoc} */ @Override - public CustomKeysWorkspaceConnectionProperties withMetadata(Map metadata) { - super.withMetadata(metadata); + public CustomKeysWorkspaceConnectionProperties withPeStatus(ManagedPEStatus peStatus) { + super.withPeStatus(peStatus); return this; } @@ -158,8 +146,8 @@ public CustomKeysWorkspaceConnectionProperties withSharedUserList(List s * {@inheritDoc} */ @Override - public CustomKeysWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); + public CustomKeysWorkspaceConnectionProperties withTarget(String target) { + super.withTarget(target); return this; } @@ -167,8 +155,9 @@ public CustomKeysWorkspaceConnectionProperties withValue(String value) { * {@inheritDoc} */ @Override - public CustomKeysWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); + public CustomKeysWorkspaceConnectionProperties + withUseWorkspaceManagedIdentity(Boolean useWorkspaceManagedIdentity) { + super.withUseWorkspaceManagedIdentity(useWorkspaceManagedIdentity); return this; } @@ -179,7 +168,6 @@ public CustomKeysWorkspaceConnectionProperties withValueFormat(ValueFormat value */ @Override public void validate() { - super.validate(); if (credentials() != null) { credentials().validate(); } @@ -192,15 +180,17 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("category", category() == null ? null : category().toString()); + jsonWriter.writeStringField("error", error()); jsonWriter.writeStringField("expiryTime", expiryTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(expiryTime())); jsonWriter.writeBooleanField("isSharedToAll", isSharedToAll()); - jsonWriter.writeStringField("target", target()); jsonWriter.writeMapField("metadata", metadata(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("peRequirement", peRequirement() == null ? null : peRequirement().toString()); + jsonWriter.writeStringField("peStatus", peStatus() == null ? null : peStatus().toString()); jsonWriter.writeArrayField("sharedUserList", sharedUserList(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", value()); - jsonWriter.writeStringField("valueFormat", valueFormat() == null ? null : valueFormat().toString()); + jsonWriter.writeStringField("target", target()); + jsonWriter.writeBooleanField("useWorkspaceManagedIdentity", useWorkspaceManagedIdentity()); jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); jsonWriter.writeJsonField("credentials", this.credentials); return jsonWriter.writeEndObject(); @@ -226,29 +216,35 @@ public static CustomKeysWorkspaceConnectionProperties fromJson(JsonReader jsonRe deserializedCustomKeysWorkspaceConnectionProperties .withCategory(ConnectionCategory.fromString(reader.getString())); } else if ("createdByWorkspaceArmId".equals(fieldName)) { - deserializedCustomKeysWorkspaceConnectionProperties.createdByWorkspaceArmId = reader.getString(); + deserializedCustomKeysWorkspaceConnectionProperties.withCreatedByWorkspaceArmId(reader.getString()); + } else if ("error".equals(fieldName)) { + deserializedCustomKeysWorkspaceConnectionProperties.withError(reader.getString()); } else if ("expiryTime".equals(fieldName)) { deserializedCustomKeysWorkspaceConnectionProperties.withExpiryTime(reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("group".equals(fieldName)) { - deserializedCustomKeysWorkspaceConnectionProperties.group - = ConnectionGroup.fromString(reader.getString()); + deserializedCustomKeysWorkspaceConnectionProperties + .withGroup(ConnectionGroup.fromString(reader.getString())); } else if ("isSharedToAll".equals(fieldName)) { deserializedCustomKeysWorkspaceConnectionProperties .withIsSharedToAll(reader.getNullable(JsonReader::getBoolean)); - } else if ("target".equals(fieldName)) { - deserializedCustomKeysWorkspaceConnectionProperties.withTarget(reader.getString()); } else if ("metadata".equals(fieldName)) { Map metadata = reader.readMap(reader1 -> reader1.getString()); deserializedCustomKeysWorkspaceConnectionProperties.withMetadata(metadata); + } else if ("peRequirement".equals(fieldName)) { + deserializedCustomKeysWorkspaceConnectionProperties + .withPeRequirement(ManagedPERequirement.fromString(reader.getString())); + } else if ("peStatus".equals(fieldName)) { + deserializedCustomKeysWorkspaceConnectionProperties + .withPeStatus(ManagedPEStatus.fromString(reader.getString())); } else if ("sharedUserList".equals(fieldName)) { List sharedUserList = reader.readArray(reader1 -> reader1.getString()); deserializedCustomKeysWorkspaceConnectionProperties.withSharedUserList(sharedUserList); - } else if ("value".equals(fieldName)) { - deserializedCustomKeysWorkspaceConnectionProperties.withValue(reader.getString()); - } else if ("valueFormat".equals(fieldName)) { + } else if ("target".equals(fieldName)) { + deserializedCustomKeysWorkspaceConnectionProperties.withTarget(reader.getString()); + } else if ("useWorkspaceManagedIdentity".equals(fieldName)) { deserializedCustomKeysWorkspaceConnectionProperties - .withValueFormat(ValueFormat.fromString(reader.getString())); + .withUseWorkspaceManagedIdentity(reader.getNullable(JsonReader::getBoolean)); } else if ("authType".equals(fieldName)) { deserializedCustomKeysWorkspaceConnectionProperties.authType = ConnectionAuthType.fromString(reader.getString()); 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 index ab4f07ea65050..150faa7665585 100644 --- 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 @@ -18,14 +18,14 @@ @Fluent public final class CustomMetricThreshold implements JsonSerializable { /* - * The threshold value. If null, a default value will be set depending on the selected metric. + * [Required] The user-defined metric to calculate. */ - private MonitoringThreshold threshold; + private String metric; /* - * [Required] The user-defined metric to calculate. + * The threshold value. If null, a default value will be set depending on the selected metric. */ - private String metric; + private MonitoringThreshold threshold; /** * Creates an instance of CustomMetricThreshold class. @@ -34,44 +34,44 @@ public CustomMetricThreshold() { } /** - * Get the threshold property: The threshold value. If null, a default value will be set depending on the selected - * metric. + * Get the metric property: [Required] The user-defined metric to calculate. * - * @return the threshold value. + * @return the metric value. */ - public MonitoringThreshold threshold() { - return this.threshold; + public String metric() { + return this.metric; } /** - * Set the threshold property: The threshold value. If null, a default value will be set depending on the selected - * metric. + * Set the metric property: [Required] The user-defined metric to calculate. * - * @param threshold the threshold value to set. + * @param metric the metric value to set. * @return the CustomMetricThreshold object itself. */ - public CustomMetricThreshold withThreshold(MonitoringThreshold threshold) { - this.threshold = threshold; + public CustomMetricThreshold withMetric(String metric) { + this.metric = metric; return this; } /** - * Get the metric property: [Required] The user-defined metric to calculate. + * Get the threshold property: The threshold value. If null, a default value will be set depending on the selected + * metric. * - * @return the metric value. + * @return the threshold value. */ - public String metric() { - return this.metric; + public MonitoringThreshold threshold() { + return this.threshold; } /** - * Set the metric property: [Required] The user-defined metric to calculate. + * Set the threshold property: The threshold value. If null, a default value will be set depending on the selected + * metric. * - * @param metric the metric value to set. + * @param threshold the threshold value to set. * @return the CustomMetricThreshold object itself. */ - public CustomMetricThreshold withMetric(String metric) { - this.metric = metric; + public CustomMetricThreshold withThreshold(MonitoringThreshold threshold) { + this.threshold = threshold; return this; } @@ -81,13 +81,13 @@ public CustomMetricThreshold withMetric(String metric) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (threshold() != null) { - threshold().validate(); - } if (metric() == null) { throw LOGGER.atError() .log(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..87213939ae9ec --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomModelFineTuning.java @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The CustomModelFineTuning model. + */ +@Fluent +public final class CustomModelFineTuning extends FineTuningVertical { + /* + * [Required] Enum to determine the type of fine tuning. + */ + private ModelProvider modelProvider = ModelProvider.CUSTOM; + + /* + * HyperParameters for fine tuning custom model. + */ + private Map hyperParameters; + + /** + * Creates an instance of CustomModelFineTuning class. + */ + public CustomModelFineTuning() { + } + + /** + * Get the modelProvider property: [Required] Enum to determine the type of fine tuning. + * + * @return the modelProvider value. + */ + @Override + public ModelProvider modelProvider() { + return this.modelProvider; + } + + /** + * 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(JobInput 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() { + if (model() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property model in model CustomModelFineTuning")); + } else { + model().validate(); + } + if (taskType() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property taskType in model CustomModelFineTuning")); + } + if (trainingData() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property trainingData in model CustomModelFineTuning")); + } else { + trainingData().validate(); + } + if (validationData() != null) { + validationData().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CustomModelFineTuning.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("model", model()); + jsonWriter.writeStringField("taskType", taskType() == null ? null : taskType().toString()); + jsonWriter.writeJsonField("trainingData", trainingData()); + jsonWriter.writeJsonField("validationData", validationData()); + jsonWriter.writeStringField("modelProvider", this.modelProvider == null ? null : this.modelProvider.toString()); + jsonWriter.writeMapField("hyperParameters", this.hyperParameters, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CustomModelFineTuning from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CustomModelFineTuning if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the CustomModelFineTuning. + */ + public static CustomModelFineTuning fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CustomModelFineTuning deserializedCustomModelFineTuning = new CustomModelFineTuning(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("model".equals(fieldName)) { + deserializedCustomModelFineTuning.withModel(JobInput.fromJson(reader)); + } else if ("taskType".equals(fieldName)) { + deserializedCustomModelFineTuning.withTaskType(FineTuningTaskType.fromString(reader.getString())); + } else if ("trainingData".equals(fieldName)) { + deserializedCustomModelFineTuning.withTrainingData(JobInput.fromJson(reader)); + } else if ("validationData".equals(fieldName)) { + deserializedCustomModelFineTuning.withValidationData(JobInput.fromJson(reader)); + } else if ("modelProvider".equals(fieldName)) { + deserializedCustomModelFineTuning.modelProvider = ModelProvider.fromString(reader.getString()); + } else if ("hyperParameters".equals(fieldName)) { + Map hyperParameters = reader.readMap(reader1 -> reader1.getString()); + deserializedCustomModelFineTuning.hyperParameters = hyperParameters; + } else { + reader.skipChildren(); + } + } + + return deserializedCustomModelFineTuning; + }); + } +} 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 3d895c8d9fd5e..117114b3832be 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 @@ -22,14 +22,14 @@ public final class CustomModelJobInput extends JobInput { private JobInputType jobInputType = JobInputType.CUSTOM_MODEL; /* - * [Required] Input Asset URI. + * Input Asset Delivery Mode. */ - private String uri; + private InputDeliveryMode mode; /* - * Input Asset Delivery Mode. + * [Required] Input Asset URI. */ - private InputDeliveryMode mode; + private String uri; /** * Creates an instance of CustomModelJobInput class. @@ -48,42 +48,42 @@ public JobInputType jobInputType() { } /** - * Get the uri property: [Required] Input Asset URI. + * Get the mode property: Input Asset Delivery Mode. * - * @return the uri value. + * @return the mode value. */ - public String uri() { - return this.uri; + public InputDeliveryMode mode() { + return this.mode; } /** - * Set the uri property: [Required] Input Asset URI. + * Set the mode property: Input Asset Delivery Mode. * - * @param uri the uri value to set. + * @param mode the mode value to set. * @return the CustomModelJobInput object itself. */ - public CustomModelJobInput withUri(String uri) { - this.uri = uri; + public CustomModelJobInput withMode(InputDeliveryMode mode) { + this.mode = mode; return this; } /** - * Get the mode property: Input Asset Delivery Mode. + * Get the uri property: [Required] Input Asset URI. * - * @return the mode value. + * @return the uri value. */ - public InputDeliveryMode mode() { - return this.mode; + public String uri() { + return this.uri; } /** - * Set the mode property: Input Asset Delivery Mode. + * Set the uri property: [Required] Input Asset URI. * - * @param mode the mode value to set. + * @param uri the uri value to set. * @return the CustomModelJobInput object itself. */ - public CustomModelJobInput withMode(InputDeliveryMode mode) { - this.mode = mode; + public CustomModelJobInput withUri(String uri) { + this.uri = uri; return this; } @@ -103,7 +103,6 @@ public CustomModelJobInput withDescription(String description) { */ @Override public void validate() { - super.validate(); if (uri() == null) { throw LOGGER.atError() .log(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 a7820eb16a670..6c50e0f522581 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 @@ -21,15 +21,20 @@ public final class CustomModelJobOutput extends JobOutput { private JobOutputType jobOutputType = JobOutputType.CUSTOM_MODEL; /* - * Output Asset URI. + * Output Asset Name. */ - private String uri; + private String assetName; /* * Output Asset Delivery Mode. */ private OutputDeliveryMode mode; + /* + * Output Asset URI. + */ + private String uri; + /** * Creates an instance of CustomModelJobOutput class. */ @@ -47,22 +52,22 @@ public JobOutputType jobOutputType() { } /** - * Get the uri property: Output Asset URI. + * Get the assetName property: Output Asset Name. * - * @return the uri value. + * @return the assetName value. */ - public String uri() { - return this.uri; + public String assetName() { + return this.assetName; } /** - * Set the uri property: Output Asset URI. + * Set the assetName property: Output Asset Name. * - * @param uri the uri value to set. + * @param assetName the assetName value to set. * @return the CustomModelJobOutput object itself. */ - public CustomModelJobOutput withUri(String uri) { - this.uri = uri; + public CustomModelJobOutput withAssetName(String assetName) { + this.assetName = assetName; return this; } @@ -86,6 +91,26 @@ public CustomModelJobOutput withMode(OutputDeliveryMode mode) { return this; } + /** + * Get the uri property: Output Asset URI. + * + * @return the uri value. + */ + public String uri() { + return this.uri; + } + + /** + * Set the uri property: Output Asset URI. + * + * @param uri the uri value to set. + * @return the CustomModelJobOutput object itself. + */ + public CustomModelJobOutput withUri(String uri) { + this.uri = uri; + return this; + } + /** * {@inheritDoc} */ @@ -102,7 +127,6 @@ public CustomModelJobOutput withDescription(String description) { */ @Override public void validate() { - super.validate(); } /** @@ -113,8 +137,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); jsonWriter.writeStringField("jobOutputType", this.jobOutputType == null ? null : this.jobOutputType.toString()); - jsonWriter.writeStringField("uri", this.uri); + jsonWriter.writeStringField("assetName", this.assetName); jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + jsonWriter.writeStringField("uri", this.uri); return jsonWriter.writeEndObject(); } @@ -137,10 +162,12 @@ public static CustomModelJobOutput fromJson(JsonReader jsonReader) throws IOExce deserializedCustomModelJobOutput.withDescription(reader.getString()); } else if ("jobOutputType".equals(fieldName)) { deserializedCustomModelJobOutput.jobOutputType = JobOutputType.fromString(reader.getString()); - } else if ("uri".equals(fieldName)) { - deserializedCustomModelJobOutput.uri = reader.getString(); + } else if ("assetName".equals(fieldName)) { + deserializedCustomModelJobOutput.assetName = reader.getString(); } else if ("mode".equals(fieldName)) { deserializedCustomModelJobOutput.mode = OutputDeliveryMode.fromString(reader.getString()); + } else if ("uri".equals(fieldName)) { + deserializedCustomModelJobOutput.uri = reader.getString(); } else { reader.skipChildren(); } 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 index 64a217b9f8d0c..16d3a9edd6c3a 100644 --- 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 @@ -23,6 +23,11 @@ public final class CustomMonitoringSignal extends MonitoringSignalBase { */ private MonitoringSignalType signalType = MonitoringSignalType.CUSTOM; + /* + * [Required] Reference to the component asset used to calculate the custom metrics. + */ + private String componentId; + /* * Monitoring assets to take as input. Key is the component input port name, value is the data asset. */ @@ -34,11 +39,6 @@ public final class CustomMonitoringSignal extends MonitoringSignalBase { */ private Map inputs; - /* - * [Required] Reference to the component asset used to calculate the custom metrics. - */ - private String componentId; - /* * [Required] A list of metrics to calculate and their associated thresholds. */ @@ -60,6 +60,26 @@ public MonitoringSignalType signalType() { return this.signalType; } + /** + * Get the componentId property: [Required] Reference to the component asset used to calculate the custom metrics. + * + * @return the componentId value. + */ + public String componentId() { + return this.componentId; + } + + /** + * Set the componentId property: [Required] Reference to the component asset used to calculate the custom metrics. + * + * @param componentId the componentId value to set. + * @return the CustomMonitoringSignal object itself. + */ + public CustomMonitoringSignal withComponentId(String componentId) { + this.componentId = componentId; + return this; + } + /** * Get the inputAssets property: Monitoring assets to take as input. Key is the component input port name, value is * the data asset. @@ -104,26 +124,6 @@ public CustomMonitoringSignal withInputs(Map inputs) { return this; } - /** - * Get the componentId property: [Required] Reference to the component asset used to calculate the custom metrics. - * - * @return the componentId value. - */ - public String componentId() { - return this.componentId; - } - - /** - * Set the componentId property: [Required] Reference to the component asset used to calculate the custom metrics. - * - * @param componentId the componentId value to set. - * @return the CustomMonitoringSignal object itself. - */ - public CustomMonitoringSignal withComponentId(String componentId) { - this.componentId = componentId; - return this; - } - /** * Get the metricThresholds property: [Required] A list of metrics to calculate and their associated thresholds. * @@ -169,7 +169,11 @@ public CustomMonitoringSignal withProperties(Map properties) { */ @Override public void validate() { - super.validate(); + if (componentId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property componentId in model CustomMonitoringSignal")); + } if (inputAssets() != null) { inputAssets().values().forEach(e -> { if (e != null) { @@ -184,11 +188,6 @@ public void validate() { } }); } - if (componentId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property componentId in model CustomMonitoringSignal")); - } if (metricThresholds() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( 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 000e6185d5e5b..2a87253a8eee7 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 @@ -68,7 +68,6 @@ public CustomNCrossValidations withValue(int value) { */ @Override public void validate() { - super.validate(); } /** 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 30010953c90b5..44ee8f0f382c4 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 @@ -68,7 +68,6 @@ public CustomSeasonality withValue(int value) { */ @Override public void validate() { - super.validate(); } /** 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 index 60bc67ca2f9b3..1be93dafdb98c 100644 --- 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 @@ -49,6 +49,11 @@ public final class CustomService implements JsonSerializable { */ private List volumes; + /* + * Describes the jupyter kernel settings for the image if its a custom environment + */ + private JupyterKernelConfig kernel; + /* * Specifies the custom service configuration */ @@ -180,6 +185,26 @@ public CustomService withVolumes(List 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. * @@ -225,6 +250,9 @@ public void validate() { if (volumes() != null) { volumes().forEach(e -> e.validate()); } + if (kernel() != null) { + kernel().validate(); + } } /** @@ -240,6 +268,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("docker", this.docker); jsonWriter.writeArrayField("endpoints", this.endpoints, (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("volumes", this.volumes, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("kernel", this.kernel); if (additionalProperties != null) { for (Map.Entry additionalProperty : additionalProperties.entrySet()) { jsonWriter.writeUntypedField(additionalProperty.getKey(), additionalProperty.getValue()); @@ -280,6 +309,8 @@ public static CustomService fromJson(JsonReader jsonReader) throws IOException { } else if ("volumes".equals(fieldName)) { List volumes = reader.readArray(reader1 -> VolumeDefinition.fromJson(reader1)); deserializedCustomService.volumes = volumes; + } else if ("kernel".equals(fieldName)) { + deserializedCustomService.kernel = JupyterKernelConfig.fromJson(reader); } else { if (additionalProperties == null) { additionalProperties = new LinkedHashMap<>(); 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 7234e7df11974..f747bff3a76dc 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 @@ -70,7 +70,6 @@ public CustomTargetLags withValues(List values) { */ @Override public void validate() { - super.validate(); if (values() == null) { throw LOGGER.atError() .log(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 4ed9f08339817..9cd5e5d9aff53 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 @@ -68,7 +68,6 @@ public CustomTargetRollingWindowSize withValue(int value) { */ @Override public void validate() { - super.validate(); } /** 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 index 160e0fd1c2616..966ebbd6559e7 100644 --- 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 @@ -26,6 +26,12 @@ public final class DataCollector implements JsonSerializable { */ private Map collections; + /* + * The request logging configuration for mdc, it includes advanced logging settings for all collections. It's + * optional. + */ + 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. @@ -36,12 +42,6 @@ public final class DataCollector implements JsonSerializable { */ private RollingRateType rollingRate; - /* - * The request logging configuration for mdc, it includes advanced logging settings for all collections. It's - * optional. - */ - private RequestLogging requestLogging; - /** * Creates an instance of DataCollector class. */ @@ -74,6 +74,28 @@ public DataCollector withCollections(Map 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. @@ -104,28 +126,6 @@ public DataCollector withRollingRate(RollingRateType rollingRate) { 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; - } - /** * Validates the instance. * @@ -156,8 +156,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeMapField("collections", this.collections, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("rollingRate", this.rollingRate == null ? null : this.rollingRate.toString()); jsonWriter.writeJsonField("requestLogging", this.requestLogging); + jsonWriter.writeStringField("rollingRate", this.rollingRate == null ? null : this.rollingRate.toString()); return jsonWriter.writeEndObject(); } @@ -180,10 +180,10 @@ public static DataCollector fromJson(JsonReader jsonReader) throws IOException { if ("collections".equals(fieldName)) { Map collections = reader.readMap(reader1 -> Collection.fromJson(reader1)); deserializedDataCollector.collections = collections; - } else if ("rollingRate".equals(fieldName)) { - deserializedDataCollector.rollingRate = RollingRateType.fromString(reader.getString()); } else if ("requestLogging".equals(fieldName)) { deserializedDataCollector.requestLogging = RequestLogging.fromJson(reader); + } else if ("rollingRate".equals(fieldName)) { + deserializedDataCollector.rollingRate = RollingRateType.fromString(reader.getString()); } else { reader.skipChildren(); } 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 db1bf0750a7d3..3d9e416ece7fe 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 @@ -23,14 +23,14 @@ public final class DataContainerProperties extends AssetContainer { private DataType dataType; /* - * The latest version inside this container. + * The next auto incremental version */ - private String latestVersion; + private String nextVersion; /* - * The next auto incremental version + * The latest version inside this container. */ - private String nextVersion; + private String latestVersion; /** * Creates an instance of DataContainerProperties class. @@ -59,23 +59,23 @@ public DataContainerProperties withDataType(DataType dataType) { } /** - * Get the latestVersion property: The latest version inside this container. + * Get the nextVersion property: The next auto incremental version. * - * @return the latestVersion value. + * @return the nextVersion value. */ @Override - public String latestVersion() { - return this.latestVersion; + public String nextVersion() { + return this.nextVersion; } /** - * Get the nextVersion property: The next auto incremental version. + * Get the latestVersion property: The latest version inside this container. * - * @return the nextVersion value. + * @return the latestVersion value. */ @Override - public String nextVersion() { - return this.nextVersion; + public String latestVersion() { + return this.latestVersion; } /** @@ -100,8 +100,8 @@ public DataContainerProperties withDescription(String description) { * {@inheritDoc} */ @Override - public DataContainerProperties withTags(Map tags) { - super.withTags(tags); + public DataContainerProperties withProperties(Map properties) { + super.withProperties(properties); return this; } @@ -109,8 +109,8 @@ public DataContainerProperties withTags(Map tags) { * {@inheritDoc} */ @Override - public DataContainerProperties withProperties(Map properties) { - super.withProperties(properties); + public DataContainerProperties withTags(Map tags) { + super.withTags(tags); return this; } @@ -121,7 +121,6 @@ public DataContainerProperties withProperties(Map properties) { */ @Override public void validate() { - super.validate(); if (dataType() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -138,8 +137,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isArchived", isArchived()); jsonWriter.writeStringField("dataType", this.dataType == null ? null : this.dataType.toString()); return jsonWriter.writeEndObject(); @@ -163,12 +162,12 @@ public static DataContainerProperties fromJson(JsonReader jsonReader) throws IOE if ("description".equals(fieldName)) { deserializedDataContainerProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedDataContainerProperties.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedDataContainerProperties.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedDataContainerProperties.withTags(tags); } else if ("isArchived".equals(fieldName)) { deserializedDataContainerProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("latestVersion".equals(fieldName)) { 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 29b91f378cba2..20d232d934922 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 @@ -20,14 +20,14 @@ public final class DataContainerResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type DataContainer. + * The link to the next page of DataContainer objects. If null, there are no additional pages. */ - private List value; + private String nextLink; /* - * The link to the next page of DataContainer objects. If null, there are no additional pages. + * An array of objects of type DataContainer. */ - private String nextLink; + private List value; /** * Creates an instance of DataContainerResourceArmPaginatedResult class. @@ -36,44 +36,44 @@ public DataContainerResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type DataContainer. + * Get the nextLink property: The link to the next page of DataContainer objects. If null, there are no additional + * pages. * - * @return the value value. + * @return the nextLink value. */ - public List value() { - return this.value; + public String nextLink() { + return this.nextLink; } /** - * Set the value property: An array of objects of type DataContainer. + * Set the nextLink property: The link to the next page of DataContainer objects. If null, there are no additional + * pages. * - * @param value the value value to set. + * @param nextLink the nextLink value to set. * @return the DataContainerResourceArmPaginatedResult object itself. */ - public DataContainerResourceArmPaginatedResult withValue(List value) { - this.value = value; + public DataContainerResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; return this; } /** - * Get the nextLink property: The link to the next page of DataContainer objects. If null, there are no additional - * pages. + * Get the value property: An array of objects of type DataContainer. * - * @return the nextLink value. + * @return the value value. */ - public String nextLink() { - return this.nextLink; + public List value() { + return this.value; } /** - * Set the nextLink property: The link to the next page of DataContainer objects. If null, there are no additional - * pages. + * Set the value property: An array of objects of type DataContainer. * - * @param nextLink the nextLink value to set. + * @param value the value value to set. * @return the DataContainerResourceArmPaginatedResult object itself. */ - public DataContainerResourceArmPaginatedResult withNextLink(String nextLink) { - this.nextLink = nextLink; + public DataContainerResourceArmPaginatedResult withValue(List value) { + this.value = value; return this; } @@ -94,8 +94,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -115,11 +115,11 @@ public static DataContainerResourceArmPaginatedResult fromJson(JsonReader jsonRe String fieldName = reader.getFieldName(); reader.nextToken(); - if ("value".equals(fieldName)) { + if ("nextLink".equals(fieldName)) { + deserializedDataContainerResourceArmPaginatedResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> DataContainerInner.fromJson(reader1)); deserializedDataContainerResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedDataContainerResourceArmPaginatedResult.nextLink = reader.getString(); } else { reader.skipChildren(); } 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 index 34ba11d52a677..5cef8953d8a51 100644 --- 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 @@ -24,15 +24,20 @@ public final class DataDriftMonitoringSignal extends MonitoringSignalBase { private MonitoringSignalType signalType = MonitoringSignalType.DATA_DRIFT; /* - * The feature filter which identifies which feature to calculate drift over. + * A dictionary that maps feature names to their respective data types. */ - private MonitoringFeatureFilterBase features; + private Map featureDataTypeOverride; /* * The settings for computing feature importance. */ private FeatureImportanceSettings featureImportanceSettings; + /* + * The feature filter which identifies which feature to calculate drift over. + */ + private MonitoringFeatureFilterBase features; + /* * [Required] A list of metrics to calculate and their associated thresholds. */ @@ -48,11 +53,6 @@ public final class DataDriftMonitoringSignal extends MonitoringSignalBase { */ private MonitoringInputDataBase referenceData; - /* - * A dictionary that maps feature names to their respective data types. - */ - private Map featureDataTypeOverride; - /** * Creates an instance of DataDriftMonitoringSignal class. */ @@ -70,22 +70,23 @@ public MonitoringSignalType signalType() { } /** - * Get the features property: The feature filter which identifies which feature to calculate drift over. + * Get the featureDataTypeOverride property: A dictionary that maps feature names to their respective data types. * - * @return the features value. + * @return the featureDataTypeOverride value. */ - public MonitoringFeatureFilterBase features() { - return this.features; + public Map featureDataTypeOverride() { + return this.featureDataTypeOverride; } /** - * Set the features property: The feature filter which identifies which feature to calculate drift over. + * Set the featureDataTypeOverride property: A dictionary that maps feature names to their respective data types. * - * @param features the features value to set. + * @param featureDataTypeOverride the featureDataTypeOverride value to set. * @return the DataDriftMonitoringSignal object itself. */ - public DataDriftMonitoringSignal withFeatures(MonitoringFeatureFilterBase features) { - this.features = features; + public DataDriftMonitoringSignal + withFeatureDataTypeOverride(Map featureDataTypeOverride) { + this.featureDataTypeOverride = featureDataTypeOverride; return this; } @@ -110,6 +111,26 @@ public 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. * @@ -170,27 +191,6 @@ public DataDriftMonitoringSignal withReferenceData(MonitoringInputDataBase refer 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; - } - /** * {@inheritDoc} */ @@ -216,13 +216,12 @@ public DataDriftMonitoringSignal withProperties(Map properties) */ @Override public void validate() { - super.validate(); - if (features() != null) { - features().validate(); - } if (featureImportanceSettings() != null) { featureImportanceSettings().validate(); } + if (features() != null) { + features().validate(); + } if (metricThresholds() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -262,10 +261,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("productionData", this.productionData); jsonWriter.writeJsonField("referenceData", this.referenceData); jsonWriter.writeStringField("signalType", this.signalType == null ? null : this.signalType.toString()); - jsonWriter.writeJsonField("features", this.features); - jsonWriter.writeJsonField("featureImportanceSettings", this.featureImportanceSettings); jsonWriter.writeMapField("featureDataTypeOverride", this.featureDataTypeOverride, (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeJsonField("featureImportanceSettings", this.featureImportanceSettings); + jsonWriter.writeJsonField("features", this.features); return jsonWriter.writeEndObject(); } @@ -303,15 +302,15 @@ public static DataDriftMonitoringSignal fromJson(JsonReader jsonReader) throws I } else if ("signalType".equals(fieldName)) { deserializedDataDriftMonitoringSignal.signalType = MonitoringSignalType.fromString(reader.getString()); - } else if ("features".equals(fieldName)) { - deserializedDataDriftMonitoringSignal.features = MonitoringFeatureFilterBase.fromJson(reader); - } else if ("featureImportanceSettings".equals(fieldName)) { - deserializedDataDriftMonitoringSignal.featureImportanceSettings - = FeatureImportanceSettings.fromJson(reader); } else if ("featureDataTypeOverride".equals(fieldName)) { Map featureDataTypeOverride = reader.readMap(reader1 -> MonitoringFeatureDataType.fromString(reader1.getString())); deserializedDataDriftMonitoringSignal.featureDataTypeOverride = featureDataTypeOverride; + } else if ("featureImportanceSettings".equals(fieldName)) { + deserializedDataDriftMonitoringSignal.featureImportanceSettings + = FeatureImportanceSettings.fromJson(reader); + } else if ("features".equals(fieldName)) { + deserializedDataDriftMonitoringSignal.features = MonitoringFeatureFilterBase.fromJson(reader); } else { reader.skipChildren(); } 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 1de839ee3698b..7d8ade546e8c0 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 @@ -11,7 +11,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.time.OffsetDateTime; import java.util.List; /** @@ -24,32 +23,6 @@ public final class DataFactory extends Compute { */ private ComputeType computeType = ComputeType.DATA_FACTORY; - /* - * The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - */ - private ProvisioningState provisioningState; - - /* - * The time at which the compute was created. - */ - private OffsetDateTime createdOn; - - /* - * The time at which the compute was last modified. - */ - private OffsetDateTime modifiedOn; - - /* - * Errors during provisioning - */ - private List provisioningErrors; - - /* - * Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning - * service provisioned it if false. - */ - private Boolean isAttachedCompute; - /** * Creates an instance of DataFactory class. */ @@ -66,58 +39,6 @@ public ComputeType computeType() { return this.computeType; } - /** - * Get the provisioningState property: The provision state of the cluster. Valid values are Unknown, Updating, - * Provisioning, Succeeded, and Failed. - * - * @return the provisioningState value. - */ - @Override - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the createdOn property: The time at which the compute was created. - * - * @return the createdOn value. - */ - @Override - public OffsetDateTime createdOn() { - return this.createdOn; - } - - /** - * Get the modifiedOn property: The time at which the compute was last modified. - * - * @return the modifiedOn value. - */ - @Override - public OffsetDateTime modifiedOn() { - return this.modifiedOn; - } - - /** - * Get the provisioningErrors property: Errors during provisioning. - * - * @return the provisioningErrors value. - */ - @Override - public List provisioningErrors() { - return this.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. - */ - @Override - public Boolean isAttachedCompute() { - return this.isAttachedCompute; - } - /** * {@inheritDoc} */ @@ -161,7 +82,6 @@ public DataFactory withDisableLocalAuth(Boolean disableLocalAuth) { */ @Override public void validate() { - super.validate(); } /** @@ -196,23 +116,23 @@ public static DataFactory fromJson(JsonReader jsonReader) throws IOException { if ("computeLocation".equals(fieldName)) { deserializedDataFactory.withComputeLocation(reader.getString()); } else if ("provisioningState".equals(fieldName)) { - deserializedDataFactory.provisioningState = ProvisioningState.fromString(reader.getString()); + deserializedDataFactory.withProvisioningState(ProvisioningState.fromString(reader.getString())); } else if ("description".equals(fieldName)) { deserializedDataFactory.withDescription(reader.getString()); } else if ("createdOn".equals(fieldName)) { - deserializedDataFactory.createdOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedDataFactory.withCreatedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("modifiedOn".equals(fieldName)) { - deserializedDataFactory.modifiedOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedDataFactory.withModifiedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("resourceId".equals(fieldName)) { deserializedDataFactory.withResourceId(reader.getString()); } else if ("provisioningErrors".equals(fieldName)) { List provisioningErrors = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); - deserializedDataFactory.provisioningErrors = provisioningErrors; + deserializedDataFactory.withProvisioningErrors(provisioningErrors); } else if ("isAttachedCompute".equals(fieldName)) { - deserializedDataFactory.isAttachedCompute = reader.getNullable(JsonReader::getBoolean); + deserializedDataFactory.withIsAttachedCompute(reader.getNullable(JsonReader::getBoolean)); } else if ("disableLocalAuth".equals(fieldName)) { deserializedDataFactory.withDisableLocalAuth(reader.getNullable(JsonReader::getBoolean)); } else if ("computeType".equals(fieldName)) { 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 0fc59f89cb7bd..4589d68ec2c7a 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 @@ -11,7 +11,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.time.OffsetDateTime; import java.util.List; /** @@ -29,32 +28,6 @@ public final class DataLakeAnalytics extends Compute { */ private DataLakeAnalyticsSchemaProperties properties; - /* - * The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - */ - private ProvisioningState provisioningState; - - /* - * The time at which the compute was created. - */ - private OffsetDateTime createdOn; - - /* - * The time at which the compute was last modified. - */ - private OffsetDateTime modifiedOn; - - /* - * Errors during provisioning - */ - private List provisioningErrors; - - /* - * Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning - * service provisioned it if false. - */ - private Boolean isAttachedCompute; - /** * Creates an instance of DataLakeAnalytics class. */ @@ -91,58 +64,6 @@ public DataLakeAnalytics withProperties(DataLakeAnalyticsSchemaProperties proper return this; } - /** - * Get the provisioningState property: The provision state of the cluster. Valid values are Unknown, Updating, - * Provisioning, Succeeded, and Failed. - * - * @return the provisioningState value. - */ - @Override - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the createdOn property: The time at which the compute was created. - * - * @return the createdOn value. - */ - @Override - public OffsetDateTime createdOn() { - return this.createdOn; - } - - /** - * Get the modifiedOn property: The time at which the compute was last modified. - * - * @return the modifiedOn value. - */ - @Override - public OffsetDateTime modifiedOn() { - return this.modifiedOn; - } - - /** - * Get the provisioningErrors property: Errors during provisioning. - * - * @return the provisioningErrors value. - */ - @Override - public List provisioningErrors() { - return this.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. - */ - @Override - public Boolean isAttachedCompute() { - return this.isAttachedCompute; - } - /** * {@inheritDoc} */ @@ -186,7 +107,6 @@ public DataLakeAnalytics withDisableLocalAuth(Boolean disableLocalAuth) { */ @Override public void validate() { - super.validate(); if (properties() != null) { properties().validate(); } @@ -225,23 +145,24 @@ public static DataLakeAnalytics fromJson(JsonReader jsonReader) throws IOExcepti if ("computeLocation".equals(fieldName)) { deserializedDataLakeAnalytics.withComputeLocation(reader.getString()); } else if ("provisioningState".equals(fieldName)) { - deserializedDataLakeAnalytics.provisioningState = ProvisioningState.fromString(reader.getString()); + deserializedDataLakeAnalytics + .withProvisioningState(ProvisioningState.fromString(reader.getString())); } else if ("description".equals(fieldName)) { deserializedDataLakeAnalytics.withDescription(reader.getString()); } else if ("createdOn".equals(fieldName)) { - deserializedDataLakeAnalytics.createdOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedDataLakeAnalytics.withCreatedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("modifiedOn".equals(fieldName)) { - deserializedDataLakeAnalytics.modifiedOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedDataLakeAnalytics.withModifiedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("resourceId".equals(fieldName)) { deserializedDataLakeAnalytics.withResourceId(reader.getString()); } else if ("provisioningErrors".equals(fieldName)) { List provisioningErrors = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); - deserializedDataLakeAnalytics.provisioningErrors = provisioningErrors; + deserializedDataLakeAnalytics.withProvisioningErrors(provisioningErrors); } else if ("isAttachedCompute".equals(fieldName)) { - deserializedDataLakeAnalytics.isAttachedCompute = reader.getNullable(JsonReader::getBoolean); + deserializedDataLakeAnalytics.withIsAttachedCompute(reader.getNullable(JsonReader::getBoolean)); } else if ("disableLocalAuth".equals(fieldName)) { deserializedDataLakeAnalytics.withDisableLocalAuth(reader.getNullable(JsonReader::getBoolean)); } else if ("computeType".equals(fieldName)) { 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 a9084e06af975..81d9d4b683bf7 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 @@ -21,14 +21,14 @@ public final class DataPathAssetReference extends AssetReferenceBase { private ReferenceType referenceType = ReferenceType.DATA_PATH; /* - * The path of the file/directory in the datastore. + * ARM resource ID of the datastore where the asset is located. */ - private String path; + private String datastoreId; /* - * ARM resource ID of the datastore where the asset is located. + * The path of the file/directory in the datastore. */ - private String datastoreId; + private String path; /** * Creates an instance of DataPathAssetReference class. @@ -47,42 +47,42 @@ public ReferenceType referenceType() { } /** - * Get the path property: The path of the file/directory in the datastore. + * Get the datastoreId property: ARM resource ID of the datastore where the asset is located. * - * @return the path value. + * @return the datastoreId value. */ - public String path() { - return this.path; + public String datastoreId() { + return this.datastoreId; } /** - * Set the path property: The path of the file/directory in the datastore. + * Set the datastoreId property: ARM resource ID of the datastore where the asset is located. * - * @param path the path value to set. + * @param datastoreId the datastoreId value to set. * @return the DataPathAssetReference object itself. */ - public DataPathAssetReference withPath(String path) { - this.path = path; + public DataPathAssetReference withDatastoreId(String datastoreId) { + this.datastoreId = datastoreId; return this; } /** - * Get the datastoreId property: ARM resource ID of the datastore where the asset is located. + * Get the path property: The path of the file/directory in the datastore. * - * @return the datastoreId value. + * @return the path value. */ - public String datastoreId() { - return this.datastoreId; + public String path() { + return this.path; } /** - * Set the datastoreId property: ARM resource ID of the datastore where the asset is located. + * Set the path property: The path of the file/directory in the datastore. * - * @param datastoreId the datastoreId value to set. + * @param path the path value to set. * @return the DataPathAssetReference object itself. */ - public DataPathAssetReference withDatastoreId(String datastoreId) { - this.datastoreId = datastoreId; + public DataPathAssetReference withPath(String path) { + this.path = path; return this; } @@ -93,7 +93,6 @@ public DataPathAssetReference withDatastoreId(String datastoreId) { */ @Override public void validate() { - super.validate(); } /** @@ -103,8 +102,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("referenceType", this.referenceType == null ? null : this.referenceType.toString()); - jsonWriter.writeStringField("path", this.path); jsonWriter.writeStringField("datastoreId", this.datastoreId); + jsonWriter.writeStringField("path", this.path); return jsonWriter.writeEndObject(); } @@ -125,10 +124,10 @@ public static DataPathAssetReference fromJson(JsonReader jsonReader) throws IOEx if ("referenceType".equals(fieldName)) { deserializedDataPathAssetReference.referenceType = ReferenceType.fromString(reader.getString()); - } else if ("path".equals(fieldName)) { - deserializedDataPathAssetReference.path = reader.getString(); } else if ("datastoreId".equals(fieldName)) { deserializedDataPathAssetReference.datastoreId = reader.getString(); + } else if ("path".equals(fieldName)) { + deserializedDataPathAssetReference.path = reader.getString(); } else { reader.skipChildren(); } 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 index b80a6afbd0fc7..2a54257713e7e 100644 --- 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 @@ -24,15 +24,20 @@ public final class DataQualityMonitoringSignal extends MonitoringSignalBase { private MonitoringSignalType signalType = MonitoringSignalType.DATA_QUALITY; /* - * The features to calculate drift over. + * A dictionary that maps feature names to their respective data types. */ - private MonitoringFeatureFilterBase features; + private Map featureDataTypeOverride; /* * The settings for computing feature importance. */ private FeatureImportanceSettings featureImportanceSettings; + /* + * The features to calculate drift over. + */ + private MonitoringFeatureFilterBase features; + /* * [Required] A list of metrics to calculate and their associated thresholds. */ @@ -48,11 +53,6 @@ public final class DataQualityMonitoringSignal extends MonitoringSignalBase { */ private MonitoringInputDataBase referenceData; - /* - * A dictionary that maps feature names to their respective data types. - */ - private Map featureDataTypeOverride; - /** * Creates an instance of DataQualityMonitoringSignal class. */ @@ -70,22 +70,23 @@ public MonitoringSignalType signalType() { } /** - * Get the features property: The features to calculate drift over. + * Get the featureDataTypeOverride property: A dictionary that maps feature names to their respective data types. * - * @return the features value. + * @return the featureDataTypeOverride value. */ - public MonitoringFeatureFilterBase features() { - return this.features; + public Map featureDataTypeOverride() { + return this.featureDataTypeOverride; } /** - * Set the features property: The features to calculate drift over. + * Set the featureDataTypeOverride property: A dictionary that maps feature names to their respective data types. * - * @param features the features value to set. + * @param featureDataTypeOverride the featureDataTypeOverride value to set. * @return the DataQualityMonitoringSignal object itself. */ - public DataQualityMonitoringSignal withFeatures(MonitoringFeatureFilterBase features) { - this.features = features; + public DataQualityMonitoringSignal + withFeatureDataTypeOverride(Map featureDataTypeOverride) { + this.featureDataTypeOverride = featureDataTypeOverride; return this; } @@ -110,6 +111,26 @@ public 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. * @@ -172,27 +193,6 @@ public DataQualityMonitoringSignal withReferenceData(MonitoringInputDataBase ref 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 DataQualityMonitoringSignal object itself. - */ - public DataQualityMonitoringSignal - withFeatureDataTypeOverride(Map featureDataTypeOverride) { - this.featureDataTypeOverride = featureDataTypeOverride; - return this; - } - /** * {@inheritDoc} */ @@ -218,13 +218,12 @@ public DataQualityMonitoringSignal withProperties(Map properties */ @Override public void validate() { - super.validate(); - if (features() != null) { - features().validate(); - } if (featureImportanceSettings() != null) { featureImportanceSettings().validate(); } + if (features() != null) { + features().validate(); + } if (metricThresholds() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -264,10 +263,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("productionData", this.productionData); jsonWriter.writeJsonField("referenceData", this.referenceData); jsonWriter.writeStringField("signalType", this.signalType == null ? null : this.signalType.toString()); - jsonWriter.writeJsonField("features", this.features); - jsonWriter.writeJsonField("featureImportanceSettings", this.featureImportanceSettings); jsonWriter.writeMapField("featureDataTypeOverride", this.featureDataTypeOverride, (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeJsonField("featureImportanceSettings", this.featureImportanceSettings); + jsonWriter.writeJsonField("features", this.features); return jsonWriter.writeEndObject(); } @@ -305,15 +304,15 @@ public static DataQualityMonitoringSignal fromJson(JsonReader jsonReader) throws } else if ("signalType".equals(fieldName)) { deserializedDataQualityMonitoringSignal.signalType = MonitoringSignalType.fromString(reader.getString()); - } else if ("features".equals(fieldName)) { - deserializedDataQualityMonitoringSignal.features = MonitoringFeatureFilterBase.fromJson(reader); - } else if ("featureImportanceSettings".equals(fieldName)) { - deserializedDataQualityMonitoringSignal.featureImportanceSettings - = FeatureImportanceSettings.fromJson(reader); } else if ("featureDataTypeOverride".equals(fieldName)) { Map featureDataTypeOverride = reader.readMap(reader1 -> MonitoringFeatureDataType.fromString(reader1.getString())); deserializedDataQualityMonitoringSignal.featureDataTypeOverride = featureDataTypeOverride; + } else if ("featureImportanceSettings".equals(fieldName)) { + deserializedDataQualityMonitoringSignal.featureImportanceSettings + = FeatureImportanceSettings.fromJson(reader); + } else if ("features".equals(fieldName)) { + deserializedDataQualityMonitoringSignal.features = MonitoringFeatureFilterBase.fromJson(reader); } else { reader.skipChildren(); } 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 e9eee92e70ebb..f2a5334f27159 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 @@ -66,8 +66,8 @@ public DataVersionBaseProperties withDataUri(String dataUri) { * {@inheritDoc} */ @Override - public DataVersionBaseProperties withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); + public DataVersionBaseProperties withIsAnonymous(Boolean isAnonymous) { + super.withIsAnonymous(isAnonymous); return this; } @@ -75,8 +75,8 @@ public DataVersionBaseProperties withIsArchived(Boolean isArchived) { * {@inheritDoc} */ @Override - public DataVersionBaseProperties withIsAnonymous(Boolean isAnonymous) { - super.withIsAnonymous(isAnonymous); + public DataVersionBaseProperties withIsArchived(Boolean isArchived) { + super.withIsArchived(isArchived); return this; } @@ -93,8 +93,8 @@ public DataVersionBaseProperties withDescription(String description) { * {@inheritDoc} */ @Override - public DataVersionBaseProperties withTags(Map tags) { - super.withTags(tags); + public DataVersionBaseProperties withProperties(Map properties) { + super.withProperties(properties); return this; } @@ -102,8 +102,8 @@ public DataVersionBaseProperties withTags(Map tags) { * {@inheritDoc} */ @Override - public DataVersionBaseProperties withProperties(Map properties) { - super.withProperties(properties); + public DataVersionBaseProperties withTags(Map tags) { + super.withTags(tags); return this; } @@ -114,7 +114,6 @@ public DataVersionBaseProperties withProperties(Map properties) */ @Override public void validate() { - super.validate(); if (dataUri() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -131,10 +130,10 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", isArchived()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isAnonymous", isAnonymous()); + jsonWriter.writeBooleanField("isArchived", isArchived()); jsonWriter.writeStringField("dataUri", this.dataUri); jsonWriter.writeStringField("dataType", this.dataType == null ? null : this.dataType.toString()); return jsonWriter.writeEndObject(); @@ -187,16 +186,16 @@ static DataVersionBaseProperties fromJsonKnownDiscriminator(JsonReader jsonReade if ("description".equals(fieldName)) { deserializedDataVersionBaseProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedDataVersionBaseProperties.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedDataVersionBaseProperties.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedDataVersionBaseProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedDataVersionBaseProperties.withTags(tags); } else if ("isAnonymous".equals(fieldName)) { deserializedDataVersionBaseProperties.withIsAnonymous(reader.getNullable(JsonReader::getBoolean)); + } else if ("isArchived".equals(fieldName)) { + deserializedDataVersionBaseProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("dataUri".equals(fieldName)) { deserializedDataVersionBaseProperties.dataUri = reader.getString(); } else if ("dataType".equals(fieldName)) { 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 ae9a6f08344c7..412b78d04bb1d 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 @@ -20,14 +20,14 @@ public final class DataVersionBaseResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type DataVersionBase. + * The link to the next page of DataVersionBase objects. If null, there are no additional pages. */ - private List value; + private String nextLink; /* - * The link to the next page of DataVersionBase objects. If null, there are no additional pages. + * An array of objects of type DataVersionBase. */ - private String nextLink; + private List value; /** * Creates an instance of DataVersionBaseResourceArmPaginatedResult class. @@ -36,44 +36,44 @@ public DataVersionBaseResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type DataVersionBase. + * Get the nextLink property: The link to the next page of DataVersionBase objects. If null, there are no additional + * pages. * - * @return the value value. + * @return the nextLink value. */ - public List value() { - return this.value; + public String nextLink() { + return this.nextLink; } /** - * Set the value property: An array of objects of type DataVersionBase. + * Set the nextLink property: The link to the next page of DataVersionBase objects. If null, there are no additional + * pages. * - * @param value the value value to set. + * @param nextLink the nextLink value to set. * @return the DataVersionBaseResourceArmPaginatedResult object itself. */ - public DataVersionBaseResourceArmPaginatedResult withValue(List value) { - this.value = value; + public DataVersionBaseResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; return this; } /** - * Get the nextLink property: The link to the next page of DataVersionBase objects. If null, there are no additional - * pages. + * Get the value property: An array of objects of type DataVersionBase. * - * @return the nextLink value. + * @return the value value. */ - public String nextLink() { - return this.nextLink; + public List value() { + return this.value; } /** - * Set the nextLink property: The link to the next page of DataVersionBase objects. If null, there are no additional - * pages. + * Set the value property: An array of objects of type DataVersionBase. * - * @param nextLink the nextLink value to set. + * @param value the value value to set. * @return the DataVersionBaseResourceArmPaginatedResult object itself. */ - public DataVersionBaseResourceArmPaginatedResult withNextLink(String nextLink) { - this.nextLink = nextLink; + public DataVersionBaseResourceArmPaginatedResult withValue(List value) { + this.value = value; return this; } @@ -94,8 +94,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -115,12 +115,12 @@ public static DataVersionBaseResourceArmPaginatedResult fromJson(JsonReader json String fieldName = reader.getFieldName(); reader.nextToken(); - if ("value".equals(fieldName)) { + if ("nextLink".equals(fieldName)) { + deserializedDataVersionBaseResourceArmPaginatedResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> DataVersionBaseInner.fromJson(reader1)); deserializedDataVersionBaseResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedDataVersionBaseResourceArmPaginatedResult.nextLink = reader.getString(); } else { reader.skipChildren(); } 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 a4ce92e15f051..4ebf00b7cadd1 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 @@ -11,7 +11,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.time.OffsetDateTime; import java.util.List; /** @@ -29,32 +28,6 @@ public final class Databricks extends Compute { */ private DatabricksProperties properties; - /* - * The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - */ - private ProvisioningState provisioningState; - - /* - * The time at which the compute was created. - */ - private OffsetDateTime createdOn; - - /* - * The time at which the compute was last modified. - */ - private OffsetDateTime modifiedOn; - - /* - * Errors during provisioning - */ - private List provisioningErrors; - - /* - * Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning - * service provisioned it if false. - */ - private Boolean isAttachedCompute; - /** * Creates an instance of Databricks class. */ @@ -91,58 +64,6 @@ public Databricks withProperties(DatabricksProperties properties) { return this; } - /** - * Get the provisioningState property: The provision state of the cluster. Valid values are Unknown, Updating, - * Provisioning, Succeeded, and Failed. - * - * @return the provisioningState value. - */ - @Override - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the createdOn property: The time at which the compute was created. - * - * @return the createdOn value. - */ - @Override - public OffsetDateTime createdOn() { - return this.createdOn; - } - - /** - * Get the modifiedOn property: The time at which the compute was last modified. - * - * @return the modifiedOn value. - */ - @Override - public OffsetDateTime modifiedOn() { - return this.modifiedOn; - } - - /** - * Get the provisioningErrors property: Errors during provisioning. - * - * @return the provisioningErrors value. - */ - @Override - public List provisioningErrors() { - return this.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. - */ - @Override - public Boolean isAttachedCompute() { - return this.isAttachedCompute; - } - /** * {@inheritDoc} */ @@ -186,7 +107,6 @@ public Databricks withDisableLocalAuth(Boolean disableLocalAuth) { */ @Override public void validate() { - super.validate(); if (properties() != null) { properties().validate(); } @@ -225,23 +145,23 @@ public static Databricks fromJson(JsonReader jsonReader) throws IOException { if ("computeLocation".equals(fieldName)) { deserializedDatabricks.withComputeLocation(reader.getString()); } else if ("provisioningState".equals(fieldName)) { - deserializedDatabricks.provisioningState = ProvisioningState.fromString(reader.getString()); + deserializedDatabricks.withProvisioningState(ProvisioningState.fromString(reader.getString())); } else if ("description".equals(fieldName)) { deserializedDatabricks.withDescription(reader.getString()); } else if ("createdOn".equals(fieldName)) { - deserializedDatabricks.createdOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedDatabricks.withCreatedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("modifiedOn".equals(fieldName)) { - deserializedDatabricks.modifiedOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedDatabricks.withModifiedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("resourceId".equals(fieldName)) { deserializedDatabricks.withResourceId(reader.getString()); } else if ("provisioningErrors".equals(fieldName)) { List provisioningErrors = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); - deserializedDatabricks.provisioningErrors = provisioningErrors; + deserializedDatabricks.withProvisioningErrors(provisioningErrors); } else if ("isAttachedCompute".equals(fieldName)) { - deserializedDatabricks.isAttachedCompute = reader.getNullable(JsonReader::getBoolean); + deserializedDatabricks.withIsAttachedCompute(reader.getNullable(JsonReader::getBoolean)); } else if ("disableLocalAuth".equals(fieldName)) { deserializedDatabricks.withDisableLocalAuth(reader.getNullable(JsonReader::getBoolean)); } else if ("computeType".equals(fieldName)) { 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 846d0988f71ac..d63ffa0ac4a69 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 @@ -69,7 +69,6 @@ public DatabricksComputeSecrets withDatabricksAccessToken(String databricksAcces */ @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 b2134852d1456..6afc7bec6e0ef 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 @@ -217,13 +217,14 @@ interface WithSkipValidation { /** * Get datastore secrets. * + * @param body Secret expiry information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 along with {@link Response}. */ - Response listSecretsWithResponse(Context context); + Response listSecretsWithResponse(SecretExpiry body, Context context); /** * Get datastore secrets. 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 966f35cbc1e9d..ba4d87ef2b3b6 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 @@ -23,14 +23,14 @@ public class DatastoreProperties extends ResourceBase { private DatastoreType datastoreType = DatastoreType.fromString("DatastoreProperties"); /* - * Readonly property to indicate if datastore is the workspace default datastore + * [Required] Account credentials. */ - private Boolean isDefault; + private DatastoreCredentials credentials; /* - * [Required] Account credentials. + * Readonly property to indicate if datastore is the workspace default datastore */ - private DatastoreCredentials credentials; + private Boolean isDefault; /** * Creates an instance of DatastoreProperties class. @@ -48,42 +48,42 @@ public DatastoreType datastoreType() { } /** - * Get the isDefault property: Readonly property to indicate if datastore is the workspace default datastore. + * Get the credentials property: [Required] Account credentials. * - * @return the isDefault value. + * @return the credentials value. */ - public Boolean isDefault() { - return this.isDefault; + public DatastoreCredentials credentials() { + return this.credentials; } /** - * Set the isDefault property: Readonly property to indicate if datastore is the workspace default datastore. + * Set the credentials property: [Required] Account credentials. * - * @param isDefault the isDefault value to set. + * @param credentials the credentials value to set. * @return the DatastoreProperties object itself. */ - DatastoreProperties withIsDefault(Boolean isDefault) { - this.isDefault = isDefault; + public DatastoreProperties withCredentials(DatastoreCredentials credentials) { + this.credentials = credentials; return this; } /** - * Get the credentials property: [Required] Account credentials. + * Get the isDefault property: Readonly property to indicate if datastore is the workspace default datastore. * - * @return the credentials value. + * @return the isDefault value. */ - public DatastoreCredentials credentials() { - return this.credentials; + public Boolean isDefault() { + return this.isDefault; } /** - * Set the credentials property: [Required] Account credentials. + * Set the isDefault property: Readonly property to indicate if datastore is the workspace default datastore. * - * @param credentials the credentials value to set. + * @param isDefault the isDefault value to set. * @return the DatastoreProperties object itself. */ - public DatastoreProperties withCredentials(DatastoreCredentials credentials) { - this.credentials = credentials; + DatastoreProperties withIsDefault(Boolean isDefault) { + this.isDefault = isDefault; return this; } @@ -100,8 +100,8 @@ public DatastoreProperties withDescription(String description) { * {@inheritDoc} */ @Override - public DatastoreProperties withTags(Map tags) { - super.withTags(tags); + public DatastoreProperties withProperties(Map properties) { + super.withProperties(properties); return this; } @@ -109,8 +109,8 @@ public DatastoreProperties withTags(Map tags) { * {@inheritDoc} */ @Override - public DatastoreProperties withProperties(Map properties) { - super.withProperties(properties); + public DatastoreProperties withTags(Map tags) { + super.withTags(tags); return this; } @@ -121,7 +121,6 @@ public DatastoreProperties withProperties(Map properties) { */ @Override public void validate() { - super.validate(); if (credentials() == null) { throw LOGGER.atError() .log( @@ -140,8 +139,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("credentials", this.credentials); jsonWriter.writeStringField("datastoreType", this.datastoreType == null ? null : this.datastoreType.toString()); return jsonWriter.writeEndObject(); @@ -198,12 +197,12 @@ static DatastoreProperties fromJsonKnownDiscriminator(JsonReader jsonReader) thr if ("description".equals(fieldName)) { deserializedDatastoreProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedDatastoreProperties.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedDatastoreProperties.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedDatastoreProperties.withTags(tags); } else if ("credentials".equals(fieldName)) { deserializedDatastoreProperties.credentials = DatastoreCredentials.fromJson(reader); } else if ("datastoreType".equals(fieldName)) { 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 aa45491067d01..e0af62a8e4f46 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 @@ -20,14 +20,14 @@ public final class DatastoreResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type Datastore. + * The link to the next page of Datastore objects. If null, there are no additional pages. */ - private List value; + private String nextLink; /* - * The link to the next page of Datastore objects. If null, there are no additional pages. + * An array of objects of type Datastore. */ - private String nextLink; + private List value; /** * Creates an instance of DatastoreResourceArmPaginatedResult class. @@ -36,44 +36,44 @@ public DatastoreResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type Datastore. + * Get the nextLink property: The link to the next page of Datastore objects. If null, there are no additional + * pages. * - * @return the value value. + * @return the nextLink value. */ - public List value() { - return this.value; + public String nextLink() { + return this.nextLink; } /** - * Set the value property: An array of objects of type Datastore. + * Set the nextLink property: The link to the next page of Datastore objects. If null, there are no additional + * pages. * - * @param value the value value to set. + * @param nextLink the nextLink value to set. * @return the DatastoreResourceArmPaginatedResult object itself. */ - public DatastoreResourceArmPaginatedResult withValue(List value) { - this.value = value; + public DatastoreResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; return this; } /** - * Get the nextLink property: The link to the next page of Datastore objects. If null, there are no additional - * pages. + * Get the value property: An array of objects of type Datastore. * - * @return the nextLink value. + * @return the value value. */ - public String nextLink() { - return this.nextLink; + public List value() { + return this.value; } /** - * Set the nextLink property: The link to the next page of Datastore objects. If null, there are no additional - * pages. + * Set the value property: An array of objects of type Datastore. * - * @param nextLink the nextLink value to set. + * @param value the value value to set. * @return the DatastoreResourceArmPaginatedResult object itself. */ - public DatastoreResourceArmPaginatedResult withNextLink(String nextLink) { - this.nextLink = nextLink; + public DatastoreResourceArmPaginatedResult withValue(List value) { + this.value = value; return this; } @@ -94,8 +94,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -115,11 +115,11 @@ public static DatastoreResourceArmPaginatedResult fromJson(JsonReader jsonReader String fieldName = reader.getFieldName(); reader.nextToken(); - if ("value".equals(fieldName)) { + if ("nextLink".equals(fieldName)) { + deserializedDatastoreResourceArmPaginatedResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> DatastoreInner.fromJson(reader1)); deserializedDatastoreResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedDatastoreResourceArmPaginatedResult.nextLink = reader.getString(); } else { reader.skipChildren(); } 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 eae2adceb76d5..7a320530e32ed 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 @@ -105,6 +105,7 @@ PagedIterable list(String resourceGroupName, String workspaceName, St * @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. + * @param body Secret expiry information. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -112,7 +113,7 @@ PagedIterable list(String resourceGroupName, String workspaceName, St * @return datastore secrets along with {@link Response}. */ Response listSecretsWithResponse(String resourceGroupName, String workspaceName, String name, - Context context); + SecretExpiry body, Context context); /** * Get datastore secrets. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultActionType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultActionType.java new file mode 100644 index 0000000000000..63a6675369671 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultActionType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for DefaultActionType. + */ +public final class DefaultActionType extends ExpandableStringEnum { + /** + * Static value Deny for DefaultActionType. + */ + public static final DefaultActionType DENY = fromString("Deny"); + + /** + * Static value Allow for DefaultActionType. + */ + public static final DefaultActionType ALLOW = fromString("Allow"); + + /** + * Creates a new instance of DefaultActionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DefaultActionType() { + } + + /** + * Creates or finds a DefaultActionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding DefaultActionType. + */ + public static DefaultActionType fromString(String name) { + return fromString(name, DefaultActionType.class); + } + + /** + * Gets known DefaultActionType values. + * + * @return known DefaultActionType values. + */ + public static Collection values() { + return values(DefaultActionType.class); + } +} 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..9bc763592607c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultResourceProvisioningState.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.util.ExpandableStringEnum; +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 Accepted for DefaultResourceProvisioningState. + */ + public static final DefaultResourceProvisioningState ACCEPTED = fromString("Accepted"); + + /** + * Static value Canceled for DefaultResourceProvisioningState. + */ + public static final DefaultResourceProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Scaling for DefaultResourceProvisioningState. + */ + public static final DefaultResourceProvisioningState SCALING = fromString("Scaling"); + + /** + * Static value Disabled for DefaultResourceProvisioningState. + */ + public static final DefaultResourceProvisioningState DISABLED = fromString("Disabled"); + + /** + * 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. + */ + 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 cb04bce37c106..ae7fa837fac5e 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 @@ -43,7 +43,6 @@ public ScaleType scaleType() { */ @Override public void validate() { - super.validate(); } /** diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelCurrentState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelCurrentState.java new file mode 100644 index 0000000000000..c5dfadea3b871 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelCurrentState.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.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Contract for DeltaModelCurrentState. + */ +@Fluent +public final class DeltaModelCurrentState implements JsonSerializable { + /* + * Gets or sets Count of instances with model. + */ + private Integer count; + + /* + * Gets or sets sample of instances with model. + */ + private String sampleInstanceId; + + /* + * Gets or sets status. + */ + private String status; + + /** + * Creates an instance of DeltaModelCurrentState class. + */ + public DeltaModelCurrentState() { + } + + /** + * Get the count property: Gets or sets Count of instances with model. + * + * @return the count value. + */ + public Integer count() { + return this.count; + } + + /** + * Set the count property: Gets or sets Count of instances with model. + * + * @param count the count value to set. + * @return the DeltaModelCurrentState object itself. + */ + public DeltaModelCurrentState withCount(Integer count) { + this.count = count; + return this; + } + + /** + * Get the sampleInstanceId property: Gets or sets sample of instances with model. + * + * @return the sampleInstanceId value. + */ + public String sampleInstanceId() { + return this.sampleInstanceId; + } + + /** + * Set the sampleInstanceId property: Gets or sets sample of instances with model. + * + * @param sampleInstanceId the sampleInstanceId value to set. + * @return the DeltaModelCurrentState object itself. + */ + public DeltaModelCurrentState withSampleInstanceId(String sampleInstanceId) { + this.sampleInstanceId = sampleInstanceId; + return this; + } + + /** + * Get the status property: Gets or sets status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Set the status property: Gets or sets status. + * + * @param status the status value to set. + * @return the DeltaModelCurrentState object itself. + */ + public DeltaModelCurrentState withStatus(String status) { + this.status = status; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("count", this.count); + jsonWriter.writeStringField("sampleInstanceID", this.sampleInstanceId); + jsonWriter.writeStringField("status", this.status); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeltaModelCurrentState from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeltaModelCurrentState if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the DeltaModelCurrentState. + */ + public static DeltaModelCurrentState fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeltaModelCurrentState deserializedDeltaModelCurrentState = new DeltaModelCurrentState(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("count".equals(fieldName)) { + deserializedDeltaModelCurrentState.count = reader.getNullable(JsonReader::getInt); + } else if ("sampleInstanceID".equals(fieldName)) { + deserializedDeltaModelCurrentState.sampleInstanceId = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedDeltaModelCurrentState.status = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDeltaModelCurrentState; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelListRequest.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelListRequest.java new file mode 100644 index 0000000000000..0b156bc468429 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelListRequest.java @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The DeltaModelListRequest model. + */ +@Fluent +public final class DeltaModelListRequest implements JsonSerializable { + /* + * Gets or sets number of delta models to return. Default: -1, means that all will be returned. + */ + private Integer count; + + /* + * Gets or sets skip token for paginated response. + */ + private String skipToken; + + /* + * Gets or sets target base model. + */ + private String targetBaseModel; + + /** + * Creates an instance of DeltaModelListRequest class. + */ + public DeltaModelListRequest() { + } + + /** + * Get the count property: Gets or sets number of delta models to return. Default: -1, means that all will be + * returned. + * + * @return the count value. + */ + public Integer count() { + return this.count; + } + + /** + * Set the count property: Gets or sets number of delta models to return. Default: -1, means that all will be + * returned. + * + * @param count the count value to set. + * @return the DeltaModelListRequest object itself. + */ + public DeltaModelListRequest withCount(Integer count) { + this.count = count; + return this; + } + + /** + * Get the skipToken property: Gets or sets skip token for paginated response. + * + * @return the skipToken value. + */ + public String skipToken() { + return this.skipToken; + } + + /** + * Set the skipToken property: Gets or sets skip token for paginated response. + * + * @param skipToken the skipToken value to set. + * @return the DeltaModelListRequest object itself. + */ + public DeltaModelListRequest withSkipToken(String skipToken) { + this.skipToken = skipToken; + return this; + } + + /** + * Get the targetBaseModel property: Gets or sets target base model. + * + * @return the targetBaseModel value. + */ + public String targetBaseModel() { + return this.targetBaseModel; + } + + /** + * Set the targetBaseModel property: Gets or sets target base model. + * + * @param targetBaseModel the targetBaseModel value to set. + * @return the DeltaModelListRequest object itself. + */ + public DeltaModelListRequest withTargetBaseModel(String targetBaseModel) { + this.targetBaseModel = targetBaseModel; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("count", this.count); + jsonWriter.writeStringField("skipToken", this.skipToken); + jsonWriter.writeStringField("targetBaseModel", this.targetBaseModel); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeltaModelListRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeltaModelListRequest if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the DeltaModelListRequest. + */ + public static DeltaModelListRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeltaModelListRequest deserializedDeltaModelListRequest = new DeltaModelListRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("count".equals(fieldName)) { + deserializedDeltaModelListRequest.count = reader.getNullable(JsonReader::getInt); + } else if ("skipToken".equals(fieldName)) { + deserializedDeltaModelListRequest.skipToken = reader.getString(); + } else if ("targetBaseModel".equals(fieldName)) { + deserializedDeltaModelListRequest.targetBaseModel = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDeltaModelListRequest; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelModifyRequest.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelModifyRequest.java new file mode 100644 index 0000000000000..38d1a9a578b3a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelModifyRequest.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.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Contract base for DeltaModelChangeRequest. Used for adding or removing. + */ +@Fluent +public final class DeltaModelModifyRequest implements JsonSerializable { + /* + * Gets or sets delta models to remove. + */ + private List addDeltaModels; + + /* + * Gets or sets delta models to remove. + */ + private List removeDeltaModels; + + /* + * Gets or sets target base model. + */ + private String targetBaseModel; + + /** + * Creates an instance of DeltaModelModifyRequest class. + */ + public DeltaModelModifyRequest() { + } + + /** + * Get the addDeltaModels property: Gets or sets delta models to remove. + * + * @return the addDeltaModels value. + */ + public List addDeltaModels() { + return this.addDeltaModels; + } + + /** + * Set the addDeltaModels property: Gets or sets delta models to remove. + * + * @param addDeltaModels the addDeltaModels value to set. + * @return the DeltaModelModifyRequest object itself. + */ + public DeltaModelModifyRequest withAddDeltaModels(List addDeltaModels) { + this.addDeltaModels = addDeltaModels; + return this; + } + + /** + * Get the removeDeltaModels property: Gets or sets delta models to remove. + * + * @return the removeDeltaModels value. + */ + public List removeDeltaModels() { + return this.removeDeltaModels; + } + + /** + * Set the removeDeltaModels property: Gets or sets delta models to remove. + * + * @param removeDeltaModels the removeDeltaModels value to set. + * @return the DeltaModelModifyRequest object itself. + */ + public DeltaModelModifyRequest withRemoveDeltaModels(List removeDeltaModels) { + this.removeDeltaModels = removeDeltaModels; + return this; + } + + /** + * Get the targetBaseModel property: Gets or sets target base model. + * + * @return the targetBaseModel value. + */ + public String targetBaseModel() { + return this.targetBaseModel; + } + + /** + * Set the targetBaseModel property: Gets or sets target base model. + * + * @param targetBaseModel the targetBaseModel value to set. + * @return the DeltaModelModifyRequest object itself. + */ + public DeltaModelModifyRequest withTargetBaseModel(String targetBaseModel) { + this.targetBaseModel = targetBaseModel; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("addDeltaModels", this.addDeltaModels, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("removeDeltaModels", this.removeDeltaModels, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("targetBaseModel", this.targetBaseModel); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeltaModelModifyRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeltaModelModifyRequest if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the DeltaModelModifyRequest. + */ + public static DeltaModelModifyRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeltaModelModifyRequest deserializedDeltaModelModifyRequest = new DeltaModelModifyRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("addDeltaModels".equals(fieldName)) { + List addDeltaModels = reader.readArray(reader1 -> reader1.getString()); + deserializedDeltaModelModifyRequest.addDeltaModels = addDeltaModels; + } else if ("removeDeltaModels".equals(fieldName)) { + List removeDeltaModels = reader.readArray(reader1 -> reader1.getString()); + deserializedDeltaModelModifyRequest.removeDeltaModels = removeDeltaModels; + } else if ("targetBaseModel".equals(fieldName)) { + deserializedDeltaModelModifyRequest.targetBaseModel = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDeltaModelModifyRequest; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelStatusRequest.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelStatusRequest.java new file mode 100644 index 0000000000000..ba9cfc26d761b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelStatusRequest.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.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The DeltaModelStatusRequest model. + */ +@Fluent +public final class DeltaModelStatusRequest implements JsonSerializable { + /* + * Gets or sets collection of delta models to retrieve status for. + */ + private List deltaModels; + + /* + * Gets or sets target base model. + */ + private String targetBaseModel; + + /** + * Creates an instance of DeltaModelStatusRequest class. + */ + public DeltaModelStatusRequest() { + } + + /** + * Get the deltaModels property: Gets or sets collection of delta models to retrieve status for. + * + * @return the deltaModels value. + */ + public List deltaModels() { + return this.deltaModels; + } + + /** + * Set the deltaModels property: Gets or sets collection of delta models to retrieve status for. + * + * @param deltaModels the deltaModels value to set. + * @return the DeltaModelStatusRequest object itself. + */ + public DeltaModelStatusRequest withDeltaModels(List deltaModels) { + this.deltaModels = deltaModels; + return this; + } + + /** + * Get the targetBaseModel property: Gets or sets target base model. + * + * @return the targetBaseModel value. + */ + public String targetBaseModel() { + return this.targetBaseModel; + } + + /** + * Set the targetBaseModel property: Gets or sets target base model. + * + * @param targetBaseModel the targetBaseModel value to set. + * @return the DeltaModelStatusRequest object itself. + */ + public DeltaModelStatusRequest withTargetBaseModel(String targetBaseModel) { + this.targetBaseModel = targetBaseModel; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("deltaModels", this.deltaModels, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("targetBaseModel", this.targetBaseModel); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DeltaModelStatusRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DeltaModelStatusRequest if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the DeltaModelStatusRequest. + */ + public static DeltaModelStatusRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DeltaModelStatusRequest deserializedDeltaModelStatusRequest = new DeltaModelStatusRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("deltaModels".equals(fieldName)) { + List deltaModels = reader.readArray(reader1 -> reader1.getString()); + deserializedDeltaModelStatusRequest.deltaModels = deltaModels; + } else if ("targetBaseModel".equals(fieldName)) { + deserializedDeltaModelStatusRequest.targetBaseModel = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDeltaModelStatusRequest; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelStatusResponse.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelStatusResponse.java new file mode 100644 index 0000000000000..d197f3982a33c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeltaModelStatusResponse.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.DeltaModelStatusResponseInner; +import java.util.List; +import java.util.Map; + +/** + * An immutable client-side representation of DeltaModelStatusResponse. + */ +public interface DeltaModelStatusResponse { + /** + * Gets the actualInstanceCount property: Gets or sets actual instance count. + * + * @return the actualInstanceCount value. + */ + Integer actualInstanceCount(); + + /** + * Gets the deltaModels property: Gets or sets dictionary representing modelID and its current state. + * + * @return the deltaModels value. + */ + Map> deltaModels(); + + /** + * Gets the expectedInstanceCount property: Gets or sets expected instance count. + * + * @return the expectedInstanceCount value. + */ + Integer expectedInstanceCount(); + + /** + * Gets the revisionId property: Gets or sets revision ID. + * + * @return the revisionId value. + */ + String revisionId(); + + /** + * Gets the targetBaseModel property: Gets or sets target base model. + * + * @return the targetBaseModel value. + */ + String targetBaseModel(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.DeltaModelStatusResponseInner object. + * + * @return the inner object. + */ + DeltaModelStatusResponseInner innerModel(); +} 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..9c7cc4482ee57 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentModelVersionUpgradeOption.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 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. + */ + 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/DeploymentResourceConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentResourceConfiguration.java index 9478808332d58..68492ced75870 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 @@ -56,7 +56,6 @@ public DeploymentResourceConfiguration withProperties(Map proper */ @Override public void validate() { - super.validate(); } /** 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 index 48aada0f708fa..a57b03a489d42 100644 --- 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 @@ -16,11 +16,6 @@ */ @Fluent public final class DestinationAsset implements JsonSerializable { - /* - * Destination registry name - */ - private String registryName; - /* * Destination asset name */ @@ -31,30 +26,15 @@ public final class DestinationAsset implements JsonSerializable { /* - * Setting for diagnosing user defined routing + * Setting for diagnosing dependent application insights */ - private Map udr; + private Map applicationInsights; /* - * Setting for diagnosing network security group + * Setting for diagnosing dependent container registry */ - private Map nsg; + private Map containerRegistry; /* - * Setting for diagnosing resource lock + * Setting for diagnosing dns resolution */ - private Map resourceLock; + private Map dnsResolution; /* - * Setting for diagnosing dns resolution + * Setting for diagnosing dependent key vault */ - private Map dnsResolution; + private Map keyVault; /* - * Setting for diagnosing dependent storage account + * Setting for diagnosing network security group */ - private Map storageAccount; + private Map nsg; /* - * Setting for diagnosing dependent key vault + * Setting for diagnosing unclassified category of problems */ - private Map keyVault; + private Map others; /* - * Setting for diagnosing dependent container registry + * Setting for diagnosing the presence of required resource providers in the workspace. */ - private Map containerRegistry; + private Map requiredResourceProviders; /* - * Setting for diagnosing dependent application insights + * Setting for diagnosing resource lock */ - private Map applicationInsights; + private Map resourceLock; /* - * Setting for diagnosing unclassified category of problems + * Setting for diagnosing dependent storage account */ - private Map others; + private Map storageAccount; + + /* + * Setting for diagnosing user defined routing + */ + private Map udr; /** * Creates an instance of DiagnoseRequestProperties class. @@ -69,182 +74,204 @@ public DiagnoseRequestProperties() { } /** - * Get the udr property: Setting for diagnosing user defined routing. + * Get the applicationInsights property: Setting for diagnosing dependent application insights. * - * @return the udr value. + * @return the applicationInsights value. */ - public Map udr() { - return this.udr; + public Map applicationInsights() { + return this.applicationInsights; } /** - * Set the udr property: Setting for diagnosing user defined routing. + * Set the applicationInsights property: Setting for diagnosing dependent application insights. * - * @param udr the udr value to set. + * @param applicationInsights the applicationInsights value to set. * @return the DiagnoseRequestProperties object itself. */ - public DiagnoseRequestProperties withUdr(Map udr) { - this.udr = udr; + public DiagnoseRequestProperties withApplicationInsights(Map applicationInsights) { + this.applicationInsights = applicationInsights; return this; } /** - * Get the nsg property: Setting for diagnosing network security group. + * Get the containerRegistry property: Setting for diagnosing dependent container registry. * - * @return the nsg value. + * @return the containerRegistry value. */ - public Map nsg() { - return this.nsg; + public Map containerRegistry() { + return this.containerRegistry; } /** - * Set the nsg property: Setting for diagnosing network security group. + * Set the containerRegistry property: Setting for diagnosing dependent container registry. * - * @param nsg the nsg value to set. + * @param containerRegistry the containerRegistry value to set. * @return the DiagnoseRequestProperties object itself. */ - public DiagnoseRequestProperties withNsg(Map nsg) { - this.nsg = nsg; + public DiagnoseRequestProperties withContainerRegistry(Map containerRegistry) { + this.containerRegistry = containerRegistry; return this; } /** - * Get the resourceLock property: Setting for diagnosing resource lock. + * Get the dnsResolution property: Setting for diagnosing dns resolution. * - * @return the resourceLock value. + * @return the dnsResolution value. */ - public Map resourceLock() { - return this.resourceLock; + public Map dnsResolution() { + return this.dnsResolution; } /** - * Set the resourceLock property: Setting for diagnosing resource lock. + * Set the dnsResolution property: Setting for diagnosing dns resolution. * - * @param resourceLock the resourceLock value to set. + * @param dnsResolution the dnsResolution value to set. * @return the DiagnoseRequestProperties object itself. */ - public DiagnoseRequestProperties withResourceLock(Map resourceLock) { - this.resourceLock = resourceLock; + public DiagnoseRequestProperties withDnsResolution(Map dnsResolution) { + this.dnsResolution = dnsResolution; return this; } /** - * Get the dnsResolution property: Setting for diagnosing dns resolution. + * Get the keyVault property: Setting for diagnosing dependent key vault. * - * @return the dnsResolution value. + * @return the keyVault value. */ - public Map dnsResolution() { - return this.dnsResolution; + public Map keyVault() { + return this.keyVault; } /** - * Set the dnsResolution property: Setting for diagnosing dns resolution. + * Set the keyVault property: Setting for diagnosing dependent key vault. * - * @param dnsResolution the dnsResolution value to set. + * @param keyVault the keyVault value to set. * @return the DiagnoseRequestProperties object itself. */ - public DiagnoseRequestProperties withDnsResolution(Map dnsResolution) { - this.dnsResolution = dnsResolution; + public DiagnoseRequestProperties withKeyVault(Map keyVault) { + this.keyVault = keyVault; return this; } /** - * Get the storageAccount property: Setting for diagnosing dependent storage account. + * Get the nsg property: Setting for diagnosing network security group. * - * @return the storageAccount value. + * @return the nsg value. */ - public Map storageAccount() { - return this.storageAccount; + public Map nsg() { + return this.nsg; } /** - * Set the storageAccount property: Setting for diagnosing dependent storage account. + * Set the nsg property: Setting for diagnosing network security group. * - * @param storageAccount the storageAccount value to set. + * @param nsg the nsg value to set. * @return the DiagnoseRequestProperties object itself. */ - public DiagnoseRequestProperties withStorageAccount(Map storageAccount) { - this.storageAccount = storageAccount; + public DiagnoseRequestProperties withNsg(Map nsg) { + this.nsg = nsg; return this; } /** - * Get the keyVault property: Setting for diagnosing dependent key vault. + * Get the others property: Setting for diagnosing unclassified category of problems. * - * @return the keyVault value. + * @return the others value. */ - public Map keyVault() { - return this.keyVault; + public Map others() { + return this.others; } /** - * Set the keyVault property: Setting for diagnosing dependent key vault. + * Set the others property: Setting for diagnosing unclassified category of problems. * - * @param keyVault the keyVault value to set. + * @param others the others value to set. * @return the DiagnoseRequestProperties object itself. */ - public DiagnoseRequestProperties withKeyVault(Map keyVault) { - this.keyVault = keyVault; + public DiagnoseRequestProperties withOthers(Map others) { + this.others = others; return this; } /** - * Get the containerRegistry property: Setting for diagnosing dependent container registry. + * Get the requiredResourceProviders property: Setting for diagnosing the presence of required resource providers in + * the workspace. * - * @return the containerRegistry value. + * @return the requiredResourceProviders value. */ - public Map containerRegistry() { - return this.containerRegistry; + public Map requiredResourceProviders() { + return this.requiredResourceProviders; } /** - * Set the containerRegistry property: Setting for diagnosing dependent container registry. + * Set the requiredResourceProviders property: Setting for diagnosing the presence of required resource providers in + * the workspace. * - * @param containerRegistry the containerRegistry value to set. + * @param requiredResourceProviders the requiredResourceProviders value to set. * @return the DiagnoseRequestProperties object itself. */ - public DiagnoseRequestProperties withContainerRegistry(Map containerRegistry) { - this.containerRegistry = containerRegistry; + public DiagnoseRequestProperties withRequiredResourceProviders(Map requiredResourceProviders) { + this.requiredResourceProviders = requiredResourceProviders; return this; } /** - * Get the applicationInsights property: Setting for diagnosing dependent application insights. + * Get the resourceLock property: Setting for diagnosing resource lock. * - * @return the applicationInsights value. + * @return the resourceLock value. */ - public Map applicationInsights() { - return this.applicationInsights; + public Map resourceLock() { + return this.resourceLock; } /** - * Set the applicationInsights property: Setting for diagnosing dependent application insights. + * Set the resourceLock property: Setting for diagnosing resource lock. * - * @param applicationInsights the applicationInsights value to set. + * @param resourceLock the resourceLock value to set. * @return the DiagnoseRequestProperties object itself. */ - public DiagnoseRequestProperties withApplicationInsights(Map applicationInsights) { - this.applicationInsights = applicationInsights; + public DiagnoseRequestProperties withResourceLock(Map resourceLock) { + this.resourceLock = resourceLock; return this; } /** - * Get the others property: Setting for diagnosing unclassified category of problems. + * Get the storageAccount property: Setting for diagnosing dependent storage account. * - * @return the others value. + * @return the storageAccount value. */ - public Map others() { - return this.others; + public Map storageAccount() { + return this.storageAccount; } /** - * Set the others property: Setting for diagnosing unclassified category of problems. + * Set the storageAccount property: Setting for diagnosing dependent storage account. * - * @param others the others value to set. + * @param storageAccount the storageAccount value to set. * @return the DiagnoseRequestProperties object itself. */ - public DiagnoseRequestProperties withOthers(Map others) { - this.others = others; + 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; } @@ -262,19 +289,21 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeMapField("udr", this.udr, (writer, element) -> writer.writeUntyped(element)); - jsonWriter.writeMapField("nsg", this.nsg, (writer, element) -> writer.writeUntyped(element)); - jsonWriter.writeMapField("resourceLock", this.resourceLock, (writer, element) -> writer.writeUntyped(element)); - jsonWriter.writeMapField("dnsResolution", this.dnsResolution, - (writer, element) -> writer.writeUntyped(element)); - jsonWriter.writeMapField("storageAccount", this.storageAccount, + jsonWriter.writeMapField("applicationInsights", this.applicationInsights, (writer, element) -> writer.writeUntyped(element)); - jsonWriter.writeMapField("keyVault", this.keyVault, (writer, element) -> writer.writeUntyped(element)); jsonWriter.writeMapField("containerRegistry", this.containerRegistry, (writer, element) -> writer.writeUntyped(element)); - jsonWriter.writeMapField("applicationInsights", this.applicationInsights, + jsonWriter.writeMapField("dnsResolution", this.dnsResolution, (writer, element) -> writer.writeUntyped(element)); + jsonWriter.writeMapField("keyVault", this.keyVault, (writer, element) -> writer.writeUntyped(element)); + jsonWriter.writeMapField("nsg", this.nsg, (writer, element) -> writer.writeUntyped(element)); jsonWriter.writeMapField("others", this.others, (writer, element) -> writer.writeUntyped(element)); + jsonWriter.writeMapField("requiredResourceProviders", this.requiredResourceProviders, + (writer, element) -> writer.writeUntyped(element)); + jsonWriter.writeMapField("resourceLock", this.resourceLock, (writer, element) -> writer.writeUntyped(element)); + jsonWriter.writeMapField("storageAccount", this.storageAccount, + (writer, element) -> writer.writeUntyped(element)); + jsonWriter.writeMapField("udr", this.udr, (writer, element) -> writer.writeUntyped(element)); return jsonWriter.writeEndObject(); } @@ -293,33 +322,36 @@ public static DiagnoseRequestProperties fromJson(JsonReader jsonReader) throws I String fieldName = reader.getFieldName(); reader.nextToken(); - if ("udr".equals(fieldName)) { - Map udr = reader.readMap(reader1 -> reader1.readUntyped()); - deserializedDiagnoseRequestProperties.udr = udr; - } else if ("nsg".equals(fieldName)) { - Map nsg = reader.readMap(reader1 -> reader1.readUntyped()); - deserializedDiagnoseRequestProperties.nsg = nsg; - } else if ("resourceLock".equals(fieldName)) { - Map resourceLock = reader.readMap(reader1 -> reader1.readUntyped()); - deserializedDiagnoseRequestProperties.resourceLock = resourceLock; + if ("applicationInsights".equals(fieldName)) { + Map applicationInsights = reader.readMap(reader1 -> reader1.readUntyped()); + deserializedDiagnoseRequestProperties.applicationInsights = applicationInsights; + } else if ("containerRegistry".equals(fieldName)) { + Map containerRegistry = reader.readMap(reader1 -> reader1.readUntyped()); + deserializedDiagnoseRequestProperties.containerRegistry = containerRegistry; } else if ("dnsResolution".equals(fieldName)) { Map dnsResolution = reader.readMap(reader1 -> reader1.readUntyped()); deserializedDiagnoseRequestProperties.dnsResolution = dnsResolution; - } else if ("storageAccount".equals(fieldName)) { - Map storageAccount = reader.readMap(reader1 -> reader1.readUntyped()); - deserializedDiagnoseRequestProperties.storageAccount = storageAccount; } else if ("keyVault".equals(fieldName)) { Map keyVault = reader.readMap(reader1 -> reader1.readUntyped()); deserializedDiagnoseRequestProperties.keyVault = keyVault; - } else if ("containerRegistry".equals(fieldName)) { - Map containerRegistry = reader.readMap(reader1 -> reader1.readUntyped()); - deserializedDiagnoseRequestProperties.containerRegistry = containerRegistry; - } else if ("applicationInsights".equals(fieldName)) { - Map applicationInsights = reader.readMap(reader1 -> reader1.readUntyped()); - deserializedDiagnoseRequestProperties.applicationInsights = applicationInsights; + } else if ("nsg".equals(fieldName)) { + Map nsg = reader.readMap(reader1 -> reader1.readUntyped()); + deserializedDiagnoseRequestProperties.nsg = nsg; } else if ("others".equals(fieldName)) { Map others = reader.readMap(reader1 -> reader1.readUntyped()); deserializedDiagnoseRequestProperties.others = others; + } else if ("requiredResourceProviders".equals(fieldName)) { + Map requiredResourceProviders = reader.readMap(reader1 -> reader1.readUntyped()); + deserializedDiagnoseRequestProperties.requiredResourceProviders = requiredResourceProviders; + } else if ("resourceLock".equals(fieldName)) { + Map resourceLock = reader.readMap(reader1 -> reader1.readUntyped()); + deserializedDiagnoseRequestProperties.resourceLock = resourceLock; + } else if ("storageAccount".equals(fieldName)) { + Map storageAccount = reader.readMap(reader1 -> reader1.readUntyped()); + deserializedDiagnoseRequestProperties.storageAccount = storageAccount; + } else if ("udr".equals(fieldName)) { + Map udr = reader.readMap(reader1 -> reader1.readUntyped()); + deserializedDiagnoseRequestProperties.udr = udr; } else { reader.skipChildren(); } 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 338b6300f93d8..42f30d676883f 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 @@ -17,7 +17,7 @@ @Fluent public final class DiagnoseWorkspaceParameters implements JsonSerializable { /* - * Value of Parameters + * The value property. */ private DiagnoseRequestProperties value; @@ -28,7 +28,7 @@ public DiagnoseWorkspaceParameters() { } /** - * Get the value property: Value of Parameters. + * Get the value property: The value property. * * @return the value value. */ @@ -37,7 +37,7 @@ 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. 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 index 80e7c8df2bba9..cb1fc720bcdd4 100644 --- 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 @@ -14,7 +14,7 @@ import java.util.Map; /** - * Docker container configuration. + * The Docker model. */ @Fluent public final class Docker implements JsonSerializable { @@ -24,7 +24,7 @@ public final class Docker implements JsonSerializable { private Boolean privileged; /* - * Docker container configuration + * Dictionary of */ private Map additionalProperties; @@ -55,7 +55,7 @@ public Docker withPrivileged(Boolean privileged) { } /** - * Get the additionalProperties property: Docker container configuration. + * Get the additionalProperties property: Dictionary of <any>. * * @return the additionalProperties value. */ @@ -64,7 +64,7 @@ public Map additionalProperties() { } /** - * Set the additionalProperties property: Docker container configuration. + * Set the additionalProperties property: Dictionary of <any>. * * @param additionalProperties the additionalProperties value to set. * @return the Docker object itself. 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 index 6b2c8d6705865..2b8da57368494 100644 --- 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 @@ -21,14 +21,14 @@ public final class DockerCredential extends DataReferenceCredential { private DataReferenceCredentialType credentialType = DataReferenceCredentialType.DOCKER_CREDENTIALS; /* - * DockerCredential user name + * DockerCredential user password */ - private String username; + private String password; /* - * DockerCredential user password + * DockerCredential user name */ - private String password; + private String username; /** * Creates an instance of DockerCredential class. @@ -47,42 +47,42 @@ public DataReferenceCredentialType credentialType() { } /** - * Get the username property: DockerCredential user name. + * Get the password property: DockerCredential user password. * - * @return the username value. + * @return the password value. */ - public String username() { - return this.username; + public String password() { + return this.password; } /** - * Set the username property: DockerCredential user name. + * Set the password property: DockerCredential user password. * - * @param username the username value to set. + * @param password the password value to set. * @return the DockerCredential object itself. */ - public DockerCredential withUsername(String username) { - this.username = username; + public DockerCredential withPassword(String password) { + this.password = password; return this; } /** - * Get the password property: DockerCredential user password. + * Get the username property: DockerCredential user name. * - * @return the password value. + * @return the username value. */ - public String password() { - return this.password; + public String username() { + return this.username; } /** - * Set the password property: DockerCredential user password. + * Set the username property: DockerCredential user name. * - * @param password the password value to set. + * @param username the username value to set. * @return the DockerCredential object itself. */ - public DockerCredential withPassword(String password) { - this.password = password; + public DockerCredential withUsername(String username) { + this.username = username; return this; } @@ -93,7 +93,6 @@ public DockerCredential withPassword(String password) { */ @Override public void validate() { - super.validate(); } /** @@ -104,8 +103,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("credentialType", this.credentialType == null ? null : this.credentialType.toString()); - jsonWriter.writeStringField("userName", this.username); jsonWriter.writeStringField("password", this.password); + jsonWriter.writeStringField("userName", this.username); return jsonWriter.writeEndObject(); } @@ -127,10 +126,10 @@ public static DockerCredential fromJson(JsonReader jsonReader) throws IOExceptio if ("credentialType".equals(fieldName)) { deserializedDockerCredential.credentialType = DataReferenceCredentialType.fromString(reader.getString()); - } else if ("userName".equals(fieldName)) { - deserializedDockerCredential.username = reader.getString(); } else if ("password".equals(fieldName)) { deserializedDockerCredential.password = reader.getString(); + } else if ("userName".equals(fieldName)) { + deserializedDockerCredential.username = reader.getString(); } else { reader.skipChildren(); } 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 e42a13919c47c..48590ea37e40e 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 @@ -22,14 +22,14 @@ public class EarlyTerminationPolicy implements JsonSerializable { /* - * 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 */ - private EncryptionStatus status; + 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 */ private IdentityForCmk identity; /* - * Customer Key vault properties. + * KeyVault details to do the encryption + */ + private KeyVaultProperties keyVaultProperties; + + /* + * The byok search account that customer brings to store customer's data + * with encryption */ - private EncryptionKeyVaultProperties keyVaultProperties; + private String searchAccountResourceId; + + /* + * Indicates whether or not the encryption is enabled for the workspace. + */ + private EncryptionStatus status; + + /* + * The byok storage account that customer brings to store customer's data + * with encryption + */ + private String storageAccountResourceId; /** * Creates an instance of EncryptionProperty class. @@ -39,27 +57,29 @@ public EncryptionProperty() { } /** - * Get the status property: Indicates whether or not the encryption is enabled for the workspace. + * Get the cosmosDbResourceId property: The byok cosmosdb account that customer brings to store customer's data + * with encryption. * - * @return the status value. + * @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. + * Set the cosmosDbResourceId property: The byok cosmosdb account that customer brings to store customer's data + * with encryption. * - * @param status the status value to set. + * @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. */ @@ -68,7 +88,7 @@ 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. @@ -79,35 +99,95 @@ 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.atError() - .log(new IllegalArgumentException("Missing required property status in model EncryptionProperty")); - } if (identity() != null) { identity().validate(); } @@ -118,6 +198,10 @@ public void validate() { } else { keyVaultProperties().validate(); } + if (status() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property status in model EncryptionProperty")); + } } private static final ClientLogger LOGGER = new ClientLogger(EncryptionProperty.class); @@ -128,9 +212,12 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); jsonWriter.writeJsonField("keyVaultProperties", this.keyVaultProperties); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + jsonWriter.writeStringField("cosmosDbResourceId", this.cosmosDbResourceId); jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeStringField("searchAccountResourceId", this.searchAccountResourceId); + jsonWriter.writeStringField("storageAccountResourceId", this.storageAccountResourceId); return jsonWriter.writeEndObject(); } @@ -150,12 +237,18 @@ public static EncryptionProperty fromJson(JsonReader jsonReader) throws IOExcept String fieldName = reader.getFieldName(); reader.nextToken(); - if ("status".equals(fieldName)) { + if ("keyVaultProperties".equals(fieldName)) { + deserializedEncryptionProperty.keyVaultProperties = KeyVaultProperties.fromJson(reader); + } else if ("status".equals(fieldName)) { deserializedEncryptionProperty.status = EncryptionStatus.fromString(reader.getString()); - } else if ("keyVaultProperties".equals(fieldName)) { - deserializedEncryptionProperty.keyVaultProperties = EncryptionKeyVaultProperties.fromJson(reader); + } else if ("cosmosDbResourceId".equals(fieldName)) { + deserializedEncryptionProperty.cosmosDbResourceId = reader.getString(); } else if ("identity".equals(fieldName)) { deserializedEncryptionProperty.identity = IdentityForCmk.fromJson(reader); + } else if ("searchAccountResourceId".equals(fieldName)) { + deserializedEncryptionProperty.searchAccountResourceId = reader.getString(); + } else if ("storageAccountResourceId".equals(fieldName)) { + deserializedEncryptionProperty.storageAccountResourceId = reader.getString(); } else { reader.skipChildren(); } 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 index 03377af95217a..7b49162d7a2d5 100644 --- 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 @@ -12,7 +12,7 @@ import java.io.IOException; /** - * Describes the endpoint configuration for the container. + * The Endpoint model. */ @Fluent public final class Endpoint implements JsonSerializable { 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 c6d864d48a987..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 @@ -17,13 +17,6 @@ public interface EndpointAuthToken { */ String accessToken(); - /** - * Gets the tokenType property: Access token type. - * - * @return the tokenType value. - */ - String tokenType(); - /** * Gets the expiryTimeUtc property: Access token expiry time (UTC). * @@ -38,6 +31,13 @@ public interface EndpointAuthToken { */ 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. * 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..fa4e92f53fb18 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentModel.java @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the 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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The EndpointDeploymentModel model. + */ +@Fluent +public final class EndpointDeploymentModel implements JsonSerializable { + /* + * Model format + */ + private String format; + + /* + * Model name. + */ + private String name; + + /* + * Optional. Deployment model source ARM resource ID. + */ + private String source; + + /* + * Model 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() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("format", this.format); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("source", this.source); + jsonWriter.writeStringField("version", this.version); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EndpointDeploymentModel from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointDeploymentModel if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the EndpointDeploymentModel. + */ + public static EndpointDeploymentModel fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EndpointDeploymentModel deserializedEndpointDeploymentModel = new EndpointDeploymentModel(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("format".equals(fieldName)) { + deserializedEndpointDeploymentModel.format = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedEndpointDeploymentModel.name = reader.getString(); + } else if ("source".equals(fieldName)) { + deserializedEndpointDeploymentModel.source = reader.getString(); + } else if ("version".equals(fieldName)) { + deserializedEndpointDeploymentModel.version = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointDeploymentModel; + }); + } +} 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 54c74659ee499..0e2a6ebc70182 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 @@ -18,19 +18,14 @@ @Fluent public class EndpointDeploymentPropertiesBase implements JsonSerializable { /* - * Description of the endpoint deployment. - */ - private String description; - - /* - * Property dictionary. Properties can be added, but not removed or altered. + * Code configuration for the endpoint deployment. */ - private Map properties; + private CodeConfiguration codeConfiguration; /* - * Code configuration for the endpoint deployment. + * Description of the endpoint deployment. */ - private CodeConfiguration codeConfiguration; + private String description; /* * ARM resource ID or AssetId of the environment specification for the endpoint deployment. @@ -42,69 +37,54 @@ public class EndpointDeploymentPropertiesBase implements JsonSerializable environmentVariables; - /** - * Creates an instance of EndpointDeploymentPropertiesBase class. - */ - public EndpointDeploymentPropertiesBase() { - } - - /** - * Get the description property: Description of the endpoint deployment. - * - * @return the description value. + /* + * Property dictionary. Properties can be added, but not removed or altered. */ - public String description() { - return this.description; - } + private Map properties; /** - * Set the description property: Description of the endpoint deployment. - * - * @param description the description value to set. - * @return the EndpointDeploymentPropertiesBase object itself. + * Creates an instance of EndpointDeploymentPropertiesBase class. */ - public EndpointDeploymentPropertiesBase withDescription(String description) { - this.description = description; - return this; + public EndpointDeploymentPropertiesBase() { } /** - * Get the properties property: Property dictionary. Properties can be added, but not removed or altered. + * Get the codeConfiguration property: Code configuration for the endpoint deployment. * - * @return the properties value. + * @return the codeConfiguration value. */ - public Map properties() { - return this.properties; + public CodeConfiguration codeConfiguration() { + return this.codeConfiguration; } /** - * Set the properties property: Property dictionary. Properties can be added, but not removed or altered. + * Set the codeConfiguration property: Code configuration for the endpoint deployment. * - * @param properties the properties value to set. + * @param codeConfiguration the codeConfiguration value to set. * @return the EndpointDeploymentPropertiesBase object itself. */ - public EndpointDeploymentPropertiesBase withProperties(Map properties) { - this.properties = properties; + public EndpointDeploymentPropertiesBase withCodeConfiguration(CodeConfiguration codeConfiguration) { + this.codeConfiguration = codeConfiguration; return this; } /** - * Get the codeConfiguration property: Code configuration for the endpoint deployment. + * Get the description property: Description of the endpoint deployment. * - * @return the codeConfiguration value. + * @return the description value. */ - public CodeConfiguration codeConfiguration() { - return this.codeConfiguration; + public String description() { + return this.description; } /** - * Set the codeConfiguration property: Code configuration for the endpoint deployment. + * Set the description property: Description of the endpoint deployment. * - * @param codeConfiguration the codeConfiguration value to set. + * @param description the description value to set. * @return the EndpointDeploymentPropertiesBase object itself. */ - public EndpointDeploymentPropertiesBase withCodeConfiguration(CodeConfiguration codeConfiguration) { - this.codeConfiguration = codeConfiguration; + public EndpointDeploymentPropertiesBase withDescription(String description) { + this.description = description; return this; } @@ -150,6 +130,26 @@ public EndpointDeploymentPropertiesBase withEnvironmentVariables(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 EndpointDeploymentPropertiesBase object itself. + */ + public EndpointDeploymentPropertiesBase withProperties(Map properties) { + this.properties = properties; + return this; + } + /** * Validates the instance. * @@ -167,12 +167,12 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeMapField("properties", this.properties, (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("codeConfiguration", this.codeConfiguration); + jsonWriter.writeStringField("description", this.description); jsonWriter.writeStringField("environmentId", this.environmentId); jsonWriter.writeMapField("environmentVariables", this.environmentVariables, (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("properties", this.properties, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -192,18 +192,18 @@ public static EndpointDeploymentPropertiesBase fromJson(JsonReader jsonReader) t String fieldName = reader.getFieldName(); reader.nextToken(); - if ("description".equals(fieldName)) { - deserializedEndpointDeploymentPropertiesBase.description = reader.getString(); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedEndpointDeploymentPropertiesBase.properties = properties; - } else if ("codeConfiguration".equals(fieldName)) { + if ("codeConfiguration".equals(fieldName)) { deserializedEndpointDeploymentPropertiesBase.codeConfiguration = CodeConfiguration.fromJson(reader); + } else if ("description".equals(fieldName)) { + deserializedEndpointDeploymentPropertiesBase.description = reader.getString(); } else if ("environmentId".equals(fieldName)) { deserializedEndpointDeploymentPropertiesBase.environmentId = reader.getString(); } else if ("environmentVariables".equals(fieldName)) { Map environmentVariables = reader.readMap(reader1 -> reader1.getString()); deserializedEndpointDeploymentPropertiesBase.environmentVariables = environmentVariables; + } else if ("properties".equals(fieldName)) { + Map properties = reader.readMap(reader1 -> reader1.getString()); + deserializedEndpointDeploymentPropertiesBase.properties = properties; } else { reader.skipChildren(); } 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..23b3a93f5a896 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentResourceProperties.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.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The EndpointDeploymentResourceProperties model. + */ +@Fluent +public class EndpointDeploymentResourceProperties implements JsonSerializable { + /* + * Kind of the deployment. + */ + private String type = "EndpointDeploymentResourceProperties"; + + /* + * The failure reason if the creation failed. + */ + private String failureReason; + + /* + * Read-only provision state status property. + */ + private DefaultResourceProvisioningState provisioningState; + + /** + * Creates an instance of EndpointDeploymentResourceProperties class. + */ + public EndpointDeploymentResourceProperties() { + } + + /** + * Get the type property: Kind of the deployment. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * 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; + } + + /** + * Set the provisioningState property: Read-only provision state status property. + * + * @param provisioningState the provisioningState value to set. + * @return the EndpointDeploymentResourceProperties object itself. + */ + EndpointDeploymentResourceProperties withProvisioningState(DefaultResourceProvisioningState provisioningState) { + this.provisioningState = provisioningState; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type); + jsonWriter.writeStringField("failureReason", this.failureReason); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EndpointDeploymentResourceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointDeploymentResourceProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the EndpointDeploymentResourceProperties. + */ + public static EndpointDeploymentResourceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("type".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("Azure.ContentSafety".equals(discriminatorValue)) { + return ContentSafetyEndpointDeploymentResourceProperties.fromJson(readerToUse.reset()); + } else if ("managedOnlineEndpoint".equals(discriminatorValue)) { + return ManagedOnlineEndpointDeploymentResourceProperties.fromJson(readerToUse.reset()); + } else if ("Azure.OpenAI".equals(discriminatorValue)) { + return OpenAIEndpointDeploymentResourceProperties.fromJson(readerToUse.reset()); + } else if ("Azure.Speech".equals(discriminatorValue)) { + return SpeechEndpointDeploymentResourceProperties.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static EndpointDeploymentResourceProperties fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EndpointDeploymentResourceProperties deserializedEndpointDeploymentResourceProperties + = new EndpointDeploymentResourceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedEndpointDeploymentResourceProperties.type = reader.getString(); + } else if ("failureReason".equals(fieldName)) { + deserializedEndpointDeploymentResourceProperties.failureReason = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedEndpointDeploymentResourceProperties.provisioningState + = DefaultResourceProvisioningState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointDeploymentResourceProperties; + }); + } +} 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..c88a8935446c7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentResourcePropertiesBasicResource.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.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, connectionName. + * + * @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. + * @return the next definition stage. + */ + WithProperties withExistingConnection(String resourceGroupName, String workspaceName, + String connectionName); + } + + /** + * 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 extends DefinitionStages.WithProxyApiVersion { + /** + * 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); + } + + /** + * The stage of the EndpointDeploymentResourcePropertiesBasicResource definition allowing to specify + * proxyApiVersion. + */ + interface WithProxyApiVersion { + /** + * Specifies the proxyApiVersion property: Api version used by proxy call. + * + * @param proxyApiVersion Api version used by proxy call. + * @return the next definition stage. + */ + WithCreate withProxyApiVersion(String proxyApiVersion); + } + } + + /** + * 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, UpdateStages.WithProxyApiVersion { + /** + * 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); + } + + /** + * The stage of the EndpointDeploymentResourcePropertiesBasicResource update allowing to specify + * proxyApiVersion. + */ + interface WithProxyApiVersion { + /** + * Specifies the proxyApiVersion property: Api version used by proxy call. + * + * @param proxyApiVersion Api version used by proxy call. + * @return the next definition stage. + */ + Update withProxyApiVersion(String proxyApiVersion); + } + } + + /** + * 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..544a21a6f2429 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult.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.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; +import java.io.IOException; +import java.util.List; + +/** + * The EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult model. + */ +@Fluent +public final class EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult + implements JsonSerializable { + /* + * The nextLink property. + */ + private String nextLink; + + /* + * The value property. + */ + 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()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult if the JsonReader was + * pointing to an instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the + * EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult. + */ + public static EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult deserializedEndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult + = new EndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nextLink".equals(fieldName)) { + deserializedEndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult.nextLink + = reader.getString(); + } else if ("value".equals(fieldName)) { + List value = reader + .readArray(reader1 -> EndpointDeploymentResourcePropertiesBasicResourceInner.fromJson(reader1)); + deserializedEndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointDeploymentResourcePropertiesBasicResourceArmPaginatedResult; + }); + } +} 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..e7263abbfbfb7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeployments.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.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; + +/** + * 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 proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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, + String proxyApiVersion, 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); + + /** + * 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. + */ + EndpointDeploymentResourcePropertiesBasicResource 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. + */ + EndpointDeploymentResourcePropertiesBasicResource 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/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/EndpointModelDeprecationProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelDeprecationProperties.java new file mode 100644 index 0000000000000..9f64898c301d4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelDeprecationProperties.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.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * The EndpointModelDeprecationProperties model. + */ +@Fluent +public final class EndpointModelDeprecationProperties implements JsonSerializable { + /* + * The datetime of deprecation of the fineTune Model. + */ + private OffsetDateTime fineTune; + + /* + * The datetime of deprecation of the inference Model. + */ + private OffsetDateTime inference; + + /** + * Creates an instance of EndpointModelDeprecationProperties class. + */ + public EndpointModelDeprecationProperties() { + } + + /** + * Get the fineTune property: The datetime of deprecation of the fineTune Model. + * + * @return the fineTune value. + */ + public OffsetDateTime 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 EndpointModelDeprecationProperties object itself. + */ + public EndpointModelDeprecationProperties withFineTune(OffsetDateTime fineTune) { + this.fineTune = fineTune; + return this; + } + + /** + * Get the inference property: The datetime of deprecation of the inference Model. + * + * @return the inference value. + */ + public OffsetDateTime 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 EndpointModelDeprecationProperties object itself. + */ + public EndpointModelDeprecationProperties withInference(OffsetDateTime inference) { + this.inference = inference; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("fineTune", + this.fineTune == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.fineTune)); + jsonWriter.writeStringField("inference", + this.inference == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.inference)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EndpointModelDeprecationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointModelDeprecationProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the EndpointModelDeprecationProperties. + */ + public static EndpointModelDeprecationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EndpointModelDeprecationProperties deserializedEndpointModelDeprecationProperties + = new EndpointModelDeprecationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("fineTune".equals(fieldName)) { + deserializedEndpointModelDeprecationProperties.fineTune = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("inference".equals(fieldName)) { + deserializedEndpointModelDeprecationProperties.inference = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointModelDeprecationProperties; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelProperties.java new file mode 100644 index 0000000000000..8d748a1ae4fa4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelProperties.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights 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.EndpointModelPropertiesInner; +import java.util.List; +import java.util.Map; + +/** + * An immutable client-side representation of EndpointModelProperties. + */ +public interface EndpointModelProperties { + /** + * Gets the capabilities property: The capabilities. + * + * @return the capabilities value. + */ + Map capabilities(); + + /** + * Gets the deprecation property: The deprecation property. + * + * @return the deprecation value. + */ + EndpointModelDeprecationProperties deprecation(); + + /** + * Gets the finetuneCapabilities property: The capabilities for finetune models. + * + * @return the finetuneCapabilities value. + */ + Map finetuneCapabilities(); + + /** + * Gets the format property: Deployment model format. + * + * @return the format value. + */ + String format(); + + /** + * Gets the isDefaultVersion property: If the model is default version. + * + * @return the isDefaultVersion value. + */ + Boolean isDefaultVersion(); + + /** + * Gets the lifecycleStatus property: Model lifecycle status. + * + * @return the lifecycleStatus value. + */ + ModelLifecycleStatus lifecycleStatus(); + + /** + * Gets the maxCapacity property: The max capacity. + * + * @return the maxCapacity value. + */ + Integer maxCapacity(); + + /** + * Gets the name property: Deployment model name. + * + * @return the name value. + */ + String name(); + + /** + * Gets the skus property: The list of Model Sku. + * + * @return the skus value. + */ + List skus(); + + /** + * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * 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 inner com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelPropertiesInner object. + * + * @return the inner object. + */ + EndpointModelPropertiesInner innerModel(); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuCapacityProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuCapacityProperties.java new file mode 100644 index 0000000000000..e8ded52986162 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuCapacityProperties.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.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The EndpointModelSkuCapacityProperties model. + */ +@Fluent +public final class EndpointModelSkuCapacityProperties implements JsonSerializable { + /* + * The default capacity. + */ + private Integer defaultProperty; + + /* + * The maximum capacity. + */ + private Integer maximum; + + /** + * Creates an instance of EndpointModelSkuCapacityProperties class. + */ + public EndpointModelSkuCapacityProperties() { + } + + /** + * 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 EndpointModelSkuCapacityProperties object itself. + */ + public EndpointModelSkuCapacityProperties withDefaultProperty(Integer defaultProperty) { + this.defaultProperty = defaultProperty; + 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 EndpointModelSkuCapacityProperties object itself. + */ + public EndpointModelSkuCapacityProperties withMaximum(Integer maximum) { + this.maximum = maximum; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("default", this.defaultProperty); + jsonWriter.writeNumberField("maximum", this.maximum); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EndpointModelSkuCapacityProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointModelSkuCapacityProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the EndpointModelSkuCapacityProperties. + */ + public static EndpointModelSkuCapacityProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EndpointModelSkuCapacityProperties deserializedEndpointModelSkuCapacityProperties + = new EndpointModelSkuCapacityProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("default".equals(fieldName)) { + deserializedEndpointModelSkuCapacityProperties.defaultProperty + = reader.getNullable(JsonReader::getInt); + } else if ("maximum".equals(fieldName)) { + deserializedEndpointModelSkuCapacityProperties.maximum = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointModelSkuCapacityProperties; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuProperties.java new file mode 100644 index 0000000000000..5c819a691f18c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuProperties.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.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The EndpointModelSkuProperties model. + */ +@Fluent +public final class EndpointModelSkuProperties implements JsonSerializable { + /* + * The capacity property. + */ + private EndpointModelSkuCapacityProperties capacity; + + /* + * The list of ARM id for the connection support this SKU. + */ + private List connectionIds; + + /* + * The datetime of deprecation of the model SKU. + */ + private OffsetDateTime deprecationDate; + + /* + * The name of the model SKU. + */ + private String name; + + /* + * The rateLimits property. + */ + private List rateLimits; + + /* + * The usage name of the model SKU. + */ + private String usageName; + + /** + * Creates an instance of EndpointModelSkuProperties class. + */ + public EndpointModelSkuProperties() { + } + + /** + * Get the capacity property: The capacity property. + * + * @return the capacity value. + */ + public EndpointModelSkuCapacityProperties capacity() { + return this.capacity; + } + + /** + * Set the capacity property: The capacity property. + * + * @param capacity the capacity value to set. + * @return the EndpointModelSkuProperties object itself. + */ + public EndpointModelSkuProperties withCapacity(EndpointModelSkuCapacityProperties capacity) { + this.capacity = capacity; + return this; + } + + /** + * Get the connectionIds property: The list of ARM id for the connection support this SKU. + * + * @return the connectionIds value. + */ + public List connectionIds() { + return this.connectionIds; + } + + /** + * Set the connectionIds property: The list of ARM id for the connection support this SKU. + * + * @param connectionIds the connectionIds value to set. + * @return the EndpointModelSkuProperties object itself. + */ + public EndpointModelSkuProperties withConnectionIds(List connectionIds) { + this.connectionIds = connectionIds; + 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 EndpointModelSkuProperties object itself. + */ + public EndpointModelSkuProperties withDeprecationDate(OffsetDateTime deprecationDate) { + this.deprecationDate = deprecationDate; + return this; + } + + /** + * 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 EndpointModelSkuProperties object itself. + */ + public EndpointModelSkuProperties withName(String name) { + this.name = name; + return this; + } + + /** + * Get the rateLimits property: The rateLimits property. + * + * @return the rateLimits value. + */ + public List rateLimits() { + return this.rateLimits; + } + + /** + * Set the rateLimits property: The rateLimits property. + * + * @param rateLimits the rateLimits value to set. + * @return the EndpointModelSkuProperties object itself. + */ + public EndpointModelSkuProperties withRateLimits(List rateLimits) { + this.rateLimits = rateLimits; + 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 EndpointModelSkuProperties object itself. + */ + public EndpointModelSkuProperties withUsageName(String usageName) { + this.usageName = usageName; + 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()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("capacity", this.capacity); + jsonWriter.writeArrayField("connectionIds", this.connectionIds, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("deprecationDate", + this.deprecationDate == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.deprecationDate)); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeArrayField("rateLimits", this.rateLimits, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("usageName", this.usageName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EndpointModelSkuProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointModelSkuProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the EndpointModelSkuProperties. + */ + public static EndpointModelSkuProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EndpointModelSkuProperties deserializedEndpointModelSkuProperties = new EndpointModelSkuProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("capacity".equals(fieldName)) { + deserializedEndpointModelSkuProperties.capacity + = EndpointModelSkuCapacityProperties.fromJson(reader); + } else if ("connectionIds".equals(fieldName)) { + List connectionIds = reader.readArray(reader1 -> reader1.getString()); + deserializedEndpointModelSkuProperties.connectionIds = connectionIds; + } else if ("deprecationDate".equals(fieldName)) { + deserializedEndpointModelSkuProperties.deprecationDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("name".equals(fieldName)) { + deserializedEndpointModelSkuProperties.name = reader.getString(); + } else if ("rateLimits".equals(fieldName)) { + List rateLimits + = reader.readArray(reader1 -> EndpointModelSkuRateLimitProperties.fromJson(reader1)); + deserializedEndpointModelSkuProperties.rateLimits = rateLimits; + } else if ("usageName".equals(fieldName)) { + deserializedEndpointModelSkuProperties.usageName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointModelSkuProperties; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuRateLimitProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuRateLimitProperties.java new file mode 100644 index 0000000000000..9175a546c58e5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuRateLimitProperties.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.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The EndpointModelSkuRateLimitProperties model. + */ +@Fluent +public final class EndpointModelSkuRateLimitProperties + implements JsonSerializable { + /* + * The count value of Call Rate Limit. + */ + private Float count; + + /* + * The renewal period in seconds of Call Rate Limit. + */ + private Float renewalPeriod; + + /* + * The call rate limit for the model. + */ + private List rules; + + /** + * Creates an instance of EndpointModelSkuRateLimitProperties class. + */ + public EndpointModelSkuRateLimitProperties() { + } + + /** + * 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 EndpointModelSkuRateLimitProperties object itself. + */ + public EndpointModelSkuRateLimitProperties 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 EndpointModelSkuRateLimitProperties object itself. + */ + public EndpointModelSkuRateLimitProperties withRenewalPeriod(Float renewalPeriod) { + this.renewalPeriod = renewalPeriod; + return this; + } + + /** + * Get the rules property: The call rate limit for the model. + * + * @return the rules value. + */ + public List rules() { + return this.rules; + } + + /** + * Set the rules property: The call rate limit for the model. + * + * @param rules the rules value to set. + * @return the EndpointModelSkuRateLimitProperties object itself. + */ + public EndpointModelSkuRateLimitProperties 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()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("count", this.count); + jsonWriter.writeNumberField("renewalPeriod", this.renewalPeriod); + jsonWriter.writeArrayField("rules", this.rules, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EndpointModelSkuRateLimitProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointModelSkuRateLimitProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the EndpointModelSkuRateLimitProperties. + */ + public static EndpointModelSkuRateLimitProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EndpointModelSkuRateLimitProperties deserializedEndpointModelSkuRateLimitProperties + = new EndpointModelSkuRateLimitProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("count".equals(fieldName)) { + deserializedEndpointModelSkuRateLimitProperties.count = reader.getNullable(JsonReader::getFloat); + } else if ("renewalPeriod".equals(fieldName)) { + deserializedEndpointModelSkuRateLimitProperties.renewalPeriod + = reader.getNullable(JsonReader::getFloat); + } else if ("rules".equals(fieldName)) { + List rules + = reader.readArray(reader1 -> EndpointModelSkuRateLimitRuleProperties.fromJson(reader1)); + deserializedEndpointModelSkuRateLimitProperties.rules = rules; + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointModelSkuRateLimitProperties; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuRateLimitRulePatternProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuRateLimitRulePatternProperties.java new file mode 100644 index 0000000000000..9f08dc54289f8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuRateLimitRulePatternProperties.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.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The EndpointModelSkuRateLimitRulePatternProperties model. + */ +@Fluent +public final class EndpointModelSkuRateLimitRulePatternProperties + implements JsonSerializable { + /* + * The method property. + */ + private String method; + + /* + * The path property. + */ + private String path; + + /** + * Creates an instance of EndpointModelSkuRateLimitRulePatternProperties class. + */ + public EndpointModelSkuRateLimitRulePatternProperties() { + } + + /** + * 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 EndpointModelSkuRateLimitRulePatternProperties object itself. + */ + public EndpointModelSkuRateLimitRulePatternProperties withMethod(String method) { + this.method = method; + return this; + } + + /** + * 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 EndpointModelSkuRateLimitRulePatternProperties object itself. + */ + public EndpointModelSkuRateLimitRulePatternProperties withPath(String path) { + this.path = path; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("method", this.method); + jsonWriter.writeStringField("path", this.path); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EndpointModelSkuRateLimitRulePatternProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointModelSkuRateLimitRulePatternProperties if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the EndpointModelSkuRateLimitRulePatternProperties. + */ + public static EndpointModelSkuRateLimitRulePatternProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EndpointModelSkuRateLimitRulePatternProperties deserializedEndpointModelSkuRateLimitRulePatternProperties + = new EndpointModelSkuRateLimitRulePatternProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("method".equals(fieldName)) { + deserializedEndpointModelSkuRateLimitRulePatternProperties.method = reader.getString(); + } else if ("path".equals(fieldName)) { + deserializedEndpointModelSkuRateLimitRulePatternProperties.path = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointModelSkuRateLimitRulePatternProperties; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuRateLimitRuleProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuRateLimitRuleProperties.java new file mode 100644 index 0000000000000..0547bfdb4787d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModelSkuRateLimitRuleProperties.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.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The EndpointModelSkuRateLimitRuleProperties model. + */ +@Fluent +public final class EndpointModelSkuRateLimitRuleProperties + implements JsonSerializable { + /* + * The count property. + */ + private Float count; + + /* + * If the dynamic throttling is enabled. + */ + private Boolean dynamicThrottlingEnabled; + + /* + * The key property. + */ + private String key; + + /* + * The matchPatterns property. + */ + private List matchPatterns; + + /* + * The minCount property. + */ + private Float minCount; + + /* + * The renewalPeriod property. + */ + private Float renewalPeriod; + + /** + * Creates an instance of EndpointModelSkuRateLimitRuleProperties class. + */ + public EndpointModelSkuRateLimitRuleProperties() { + } + + /** + * 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 EndpointModelSkuRateLimitRuleProperties object itself. + */ + public EndpointModelSkuRateLimitRuleProperties withCount(Float count) { + this.count = count; + return this; + } + + /** + * Get the dynamicThrottlingEnabled property: If the dynamic throttling is enabled. + * + * @return the dynamicThrottlingEnabled value. + */ + public Boolean dynamicThrottlingEnabled() { + return this.dynamicThrottlingEnabled; + } + + /** + * Set the dynamicThrottlingEnabled property: If the dynamic throttling is enabled. + * + * @param dynamicThrottlingEnabled the dynamicThrottlingEnabled value to set. + * @return the EndpointModelSkuRateLimitRuleProperties object itself. + */ + public EndpointModelSkuRateLimitRuleProperties withDynamicThrottlingEnabled(Boolean dynamicThrottlingEnabled) { + this.dynamicThrottlingEnabled = dynamicThrottlingEnabled; + return this; + } + + /** + * 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 EndpointModelSkuRateLimitRuleProperties object itself. + */ + public EndpointModelSkuRateLimitRuleProperties withKey(String key) { + this.key = key; + 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 EndpointModelSkuRateLimitRuleProperties object itself. + */ + public EndpointModelSkuRateLimitRuleProperties + withMatchPatterns(List matchPatterns) { + this.matchPatterns = matchPatterns; + 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 EndpointModelSkuRateLimitRuleProperties object itself. + */ + public EndpointModelSkuRateLimitRuleProperties withMinCount(Float minCount) { + this.minCount = minCount; + 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 EndpointModelSkuRateLimitRuleProperties object itself. + */ + public EndpointModelSkuRateLimitRuleProperties withRenewalPeriod(Float renewalPeriod) { + this.renewalPeriod = renewalPeriod; + 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()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("count", this.count); + jsonWriter.writeBooleanField("dynamicThrottlingEnabled", this.dynamicThrottlingEnabled); + jsonWriter.writeStringField("key", this.key); + jsonWriter.writeArrayField("matchPatterns", this.matchPatterns, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeNumberField("minCount", this.minCount); + jsonWriter.writeNumberField("renewalPeriod", this.renewalPeriod); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EndpointModelSkuRateLimitRuleProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointModelSkuRateLimitRuleProperties if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the EndpointModelSkuRateLimitRuleProperties. + */ + public static EndpointModelSkuRateLimitRuleProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EndpointModelSkuRateLimitRuleProperties deserializedEndpointModelSkuRateLimitRuleProperties + = new EndpointModelSkuRateLimitRuleProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("count".equals(fieldName)) { + deserializedEndpointModelSkuRateLimitRuleProperties.count + = reader.getNullable(JsonReader::getFloat); + } else if ("dynamicThrottlingEnabled".equals(fieldName)) { + deserializedEndpointModelSkuRateLimitRuleProperties.dynamicThrottlingEnabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("key".equals(fieldName)) { + deserializedEndpointModelSkuRateLimitRuleProperties.key = reader.getString(); + } else if ("matchPatterns".equals(fieldName)) { + List matchPatterns + = reader.readArray(reader1 -> EndpointModelSkuRateLimitRulePatternProperties.fromJson(reader1)); + deserializedEndpointModelSkuRateLimitRuleProperties.matchPatterns = matchPatterns; + } else if ("minCount".equals(fieldName)) { + deserializedEndpointModelSkuRateLimitRuleProperties.minCount + = reader.getNullable(JsonReader::getFloat); + } else if ("renewalPeriod".equals(fieldName)) { + deserializedEndpointModelSkuRateLimitRuleProperties.renewalPeriod + = reader.getNullable(JsonReader::getFloat); + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointModelSkuRateLimitRuleProperties; + }); + } +} 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..a1fe0acb67768 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointModels.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.models; + +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelsInner; +import java.util.List; + +/** + * An immutable client-side representation of EndpointModels. + */ +public interface EndpointModels { + /** + * Gets the nextLink property: The link to the next page constructed using the continuationToken. If null, there are + * no additional pages. + * + * @return the nextLink value. + */ + String nextLink(); + + /** + * Gets the value property: List of models. + * + * @return the value value. + */ + List value(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.EndpointModelsInner object. + * + * @return the inner object. + */ + EndpointModelsInner innerModel(); +} 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 53b86427fa0a0..ce768d29f0e80 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 @@ -11,6 +11,15 @@ * An immutable client-side representation of EndpointPropertiesBase. */ public interface EndpointPropertiesBase { + /** + * Gets the authMode property: [Required] The authentication method for invoking the endpoint (data plane + * operation). Use 'Key' for key-based authentication. Use 'AMLToken' for Azure Machine Learning token-based + * authentication. Use 'AADToken' for Microsoft Entra token-based authentication. + * + * @return the authMode value. + */ + EndpointAuthMode authMode(); + /** * Gets the description property: Description of the inference endpoint. * @@ -18,6 +27,14 @@ public interface EndpointPropertiesBase { */ 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. + * + * @return the keys value. + */ + EndpointAuthKeys keys(); + /** * Gets the properties property: Property dictionary. Properties can be added, but not removed or altered. * @@ -39,22 +56,6 @@ public interface EndpointPropertiesBase { */ String swaggerUri(); - /** - * 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 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 inner com.azure.resourcemanager.machinelearning.fluent.models.EndpointPropertiesBaseInner object. * 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..2e9d331f0b10d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointResourceProperties.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.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; +import java.io.IOException; +import java.util.List; + +/** + * The EndpointResourceProperties model. + */ +@Fluent +public class EndpointResourceProperties implements JsonSerializable { + /* + * Type of the endpoint. + */ + private EndpointType endpointType = EndpointType.fromString("EndpointResourceProperties"); + + /* + * Byo resource id for creating the built-in model service endpoints. + */ + private String associatedResourceId; + + /* + * Deployments info. + */ + private List deployments; + + /* + * Uri of the endpoint. + */ + private String endpointUri; + + /* + * The failure reason if the creation failed. + */ + private String failureReason; + + /* + * Location of the endpoint. + * Since input dto and when parse endpoint resource share the same contract + * this Location field is just for parse the endpoint resource info + * we won't let customer specify the endpoint resource location since we will create it the same location as + * workspace + */ + private String location; + + /* + * Name of the endpoint. + */ + private String name; + + /* + * Read-only provision state status property. + */ + private DefaultResourceProvisioningState provisioningState; + + /* + * Whether the proxy (non-byo) endpoint is a regular endpoint or a OneKeyV2 AI services account endpoint. + */ + private Boolean shouldCreateAiServicesEndpoint; + + /** + * Creates an instance of EndpointResourceProperties class. + */ + public EndpointResourceProperties() { + } + + /** + * Get the endpointType property: Type of the endpoint. + * + * @return the endpointType value. + */ + public EndpointType endpointType() { + return this.endpointType; + } + + /** + * 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 deployments property: Deployments info. + * + * @return the deployments value. + */ + public List deployments() { + return this.deployments; + } + + /** + * Set the deployments property: Deployments info. + * + * @param deployments the deployments value to set. + * @return the EndpointResourceProperties object itself. + */ + public EndpointResourceProperties + withDeployments(List deployments) { + this.deployments = deployments; + 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 location property: Location of the endpoint. + * Since input dto and when parse endpoint resource share the same contract + * this Location field is just for parse the endpoint resource info + * we won't let customer specify the endpoint resource location since we will create it the same location as + * workspace. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: Location of the endpoint. + * Since input dto and when parse endpoint resource share the same contract + * this Location field is just for parse the endpoint resource info + * we won't let customer specify the endpoint resource location since we will create it the same location as + * workspace. + * + * @param location the location value to set. + * @return the EndpointResourceProperties object itself. + */ + public EndpointResourceProperties withLocation(String location) { + this.location = location; + 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; + } + + /** + * Set the provisioningState property: Read-only provision state status property. + * + * @param provisioningState the provisioningState value to set. + * @return the EndpointResourceProperties object itself. + */ + EndpointResourceProperties withProvisioningState(DefaultResourceProvisioningState provisioningState) { + this.provisioningState = provisioningState; + return this; + } + + /** + * Get the shouldCreateAiServicesEndpoint property: Whether the proxy (non-byo) endpoint is a regular endpoint or a + * OneKeyV2 AI services account endpoint. + * + * @return the shouldCreateAiServicesEndpoint value. + */ + public Boolean shouldCreateAiServicesEndpoint() { + return this.shouldCreateAiServicesEndpoint; + } + + /** + * Set the shouldCreateAiServicesEndpoint property: Whether the proxy (non-byo) endpoint is a regular endpoint or a + * OneKeyV2 AI services account endpoint. + * + * @param shouldCreateAiServicesEndpoint the shouldCreateAiServicesEndpoint value to set. + * @return the EndpointResourceProperties object itself. + */ + public EndpointResourceProperties withShouldCreateAiServicesEndpoint(Boolean shouldCreateAiServicesEndpoint) { + this.shouldCreateAiServicesEndpoint = shouldCreateAiServicesEndpoint; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (deployments() != null) { + deployments().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("endpointType", this.endpointType == null ? null : this.endpointType.toString()); + jsonWriter.writeStringField("associatedResourceId", this.associatedResourceId); + jsonWriter.writeArrayField("deployments", this.deployments, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("endpointUri", this.endpointUri); + jsonWriter.writeStringField("failureReason", this.failureReason); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeBooleanField("shouldCreateAiServicesEndpoint", this.shouldCreateAiServicesEndpoint); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EndpointResourceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointResourceProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the EndpointResourceProperties. + */ + public static EndpointResourceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("endpointType".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("Azure.ContentSafety".equals(discriminatorValue)) { + return ContentSafetyEndpointResourceProperties.fromJson(readerToUse.reset()); + } else if ("managedOnlineEndpoint".equals(discriminatorValue)) { + return ManagedOnlineEndpointResourceProperties.fromJson(readerToUse.reset()); + } else if ("Azure.OpenAI".equals(discriminatorValue)) { + return OpenAIEndpointResourceProperties.fromJson(readerToUse.reset()); + } else if ("serverlessEndpoint".equals(discriminatorValue)) { + return ServerlessEndpointResourceProperties.fromJson(readerToUse.reset()); + } else if ("Azure.Speech".equals(discriminatorValue)) { + return SpeechEndpointResourceProperties.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static EndpointResourceProperties fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + EndpointResourceProperties deserializedEndpointResourceProperties = new EndpointResourceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("endpointType".equals(fieldName)) { + deserializedEndpointResourceProperties.endpointType = EndpointType.fromString(reader.getString()); + } else if ("associatedResourceId".equals(fieldName)) { + deserializedEndpointResourceProperties.associatedResourceId = reader.getString(); + } else if ("deployments".equals(fieldName)) { + List deployments = reader + .readArray(reader1 -> EndpointDeploymentResourcePropertiesBasicResourceInner.fromJson(reader1)); + deserializedEndpointResourceProperties.deployments = deployments; + } else if ("endpointUri".equals(fieldName)) { + deserializedEndpointResourceProperties.endpointUri = reader.getString(); + } else if ("failureReason".equals(fieldName)) { + deserializedEndpointResourceProperties.failureReason = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedEndpointResourceProperties.location = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedEndpointResourceProperties.name = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedEndpointResourceProperties.provisioningState + = DefaultResourceProvisioningState.fromString(reader.getString()); + } else if ("shouldCreateAiServicesEndpoint".equals(fieldName)) { + deserializedEndpointResourceProperties.shouldCreateAiServicesEndpoint + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointResourceProperties; + }); + } +} 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..f9e62bfaa73e0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointResourcePropertiesBasicResourceArmPaginatedResult.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointResourcePropertiesBasicResourceInner; +import java.io.IOException; +import java.util.List; + +/** + * The EndpointResourcePropertiesBasicResourceArmPaginatedResult model. + */ +@Fluent +public final class EndpointResourcePropertiesBasicResourceArmPaginatedResult + implements JsonSerializable { + /* + * The nextLink property. + */ + private String nextLink; + + /* + * The value property. + */ + 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()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of EndpointResourcePropertiesBasicResourceArmPaginatedResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of EndpointResourcePropertiesBasicResourceArmPaginatedResult if the JsonReader was pointing + * to an instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the + * EndpointResourcePropertiesBasicResourceArmPaginatedResult. + */ + public static EndpointResourcePropertiesBasicResourceArmPaginatedResult fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + EndpointResourcePropertiesBasicResourceArmPaginatedResult deserializedEndpointResourcePropertiesBasicResourceArmPaginatedResult + = new EndpointResourcePropertiesBasicResourceArmPaginatedResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nextLink".equals(fieldName)) { + deserializedEndpointResourcePropertiesBasicResourceArmPaginatedResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> EndpointResourcePropertiesBasicResourceInner.fromJson(reader1)); + deserializedEndpointResourcePropertiesBasicResourceArmPaginatedResult.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedEndpointResourcePropertiesBasicResourceArmPaginatedResult; + }); + } +} 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 719f8fc0f2e94..b30fb11bd9a5c 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 @@ -72,7 +72,6 @@ public EndpointScheduleAction withEndpointInvocationDefinition(Object endpointIn */ @Override public void validate() { - super.validate(); if (endpointInvocationDefinition() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( 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 index fd1926ec9f011..56e3252248bcf 100644 --- 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 @@ -31,6 +31,11 @@ public final class EndpointServiceConnectionStatus extends ExpandableStringEnum< */ 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. * 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..912b79cca51cc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointType.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.util.ExpandableStringEnum; +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"); + + /** + * Static value serverlessEndpoint for EndpointType. + */ + public static final EndpointType SERVERLESS_ENDPOINT = fromString("serverlessEndpoint"); + + /** + * 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. + */ + 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..7fcf342bafe9b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Endpoints.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 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 includeOnlineEndpoints The includeOnlineEndpoints parameter. + * @param includeServerlessEndpoints The includeServerlessEndpoints parameter. + * @param includeConnections The includeConnections parameter. + * @param skip Continuation token for pagination. + * @param expand Whether the endpoint resource will be expand to include deployment information, e.g. + * $expand=deployments. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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, Boolean includeOnlineEndpoints, Boolean includeServerlessEndpoints, + Boolean includeConnections, String skip, String expand, 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/EnvironmentContainerProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerProperties.java index 9ad476e4ed183..2ea09117e3430 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 @@ -22,14 +22,14 @@ public final class EnvironmentContainerProperties extends AssetContainer { private AssetProvisioningState provisioningState; /* - * The latest version inside this container. + * The next auto incremental version */ - private String latestVersion; + private String nextVersion; /* - * The next auto incremental version + * The latest version inside this container. */ - private String nextVersion; + private String latestVersion; /** * Creates an instance of EnvironmentContainerProperties class. @@ -47,23 +47,23 @@ public AssetProvisioningState provisioningState() { } /** - * Get the latestVersion property: The latest version inside this container. + * Get the nextVersion property: The next auto incremental version. * - * @return the latestVersion value. + * @return the nextVersion value. */ @Override - public String latestVersion() { - return this.latestVersion; + public String nextVersion() { + return this.nextVersion; } /** - * Get the nextVersion property: The next auto incremental version. + * Get the latestVersion property: The latest version inside this container. * - * @return the nextVersion value. + * @return the latestVersion value. */ @Override - public String nextVersion() { - return this.nextVersion; + public String latestVersion() { + return this.latestVersion; } /** @@ -88,8 +88,8 @@ public EnvironmentContainerProperties withDescription(String description) { * {@inheritDoc} */ @Override - public EnvironmentContainerProperties withTags(Map tags) { - super.withTags(tags); + public EnvironmentContainerProperties withProperties(Map properties) { + super.withProperties(properties); return this; } @@ -97,8 +97,8 @@ public EnvironmentContainerProperties withTags(Map tags) { * {@inheritDoc} */ @Override - public EnvironmentContainerProperties withProperties(Map properties) { - super.withProperties(properties); + public EnvironmentContainerProperties withTags(Map tags) { + super.withTags(tags); return this; } @@ -109,7 +109,6 @@ public EnvironmentContainerProperties withProperties(Map propert */ @Override public void validate() { - super.validate(); } /** @@ -119,8 +118,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isArchived", isArchived()); return jsonWriter.writeEndObject(); } @@ -143,12 +142,12 @@ public static EnvironmentContainerProperties fromJson(JsonReader jsonReader) thr if ("description".equals(fieldName)) { deserializedEnvironmentContainerProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedEnvironmentContainerProperties.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedEnvironmentContainerProperties.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedEnvironmentContainerProperties.withTags(tags); } else if ("isArchived".equals(fieldName)) { deserializedEnvironmentContainerProperties .withIsArchived(reader.getNullable(JsonReader::getBoolean)); 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 f3edb6b3f7cf1..092db28d1d525 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 @@ -20,14 +20,14 @@ public final class EnvironmentContainerResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type EnvironmentContainer. + * The link to the next page of EnvironmentContainer objects. If null, there are no additional pages. */ - private List value; + private String nextLink; /* - * The link to the next page of EnvironmentContainer objects. If null, there are no additional pages. + * An array of objects of type EnvironmentContainer. */ - private String nextLink; + private List value; /** * Creates an instance of EnvironmentContainerResourceArmPaginatedResult class. @@ -36,44 +36,44 @@ public EnvironmentContainerResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type EnvironmentContainer. + * Get the nextLink property: The link to the next page of EnvironmentContainer objects. If null, there are no + * additional pages. * - * @return the value value. + * @return the nextLink value. */ - public List value() { - return this.value; + public String nextLink() { + return this.nextLink; } /** - * Set the value property: An array of objects of type EnvironmentContainer. + * Set the nextLink property: The link to the next page of EnvironmentContainer objects. If null, there are no + * additional pages. * - * @param value the value value to set. + * @param nextLink the nextLink value to set. * @return the EnvironmentContainerResourceArmPaginatedResult object itself. */ - public EnvironmentContainerResourceArmPaginatedResult withValue(List value) { - this.value = value; + public EnvironmentContainerResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; return this; } /** - * Get the nextLink property: The link to the next page of EnvironmentContainer objects. If null, there are no - * additional pages. + * Get the value property: An array of objects of type EnvironmentContainer. * - * @return the nextLink value. + * @return the value value. */ - public String nextLink() { - return this.nextLink; + public List value() { + return this.value; } /** - * Set the nextLink property: The link to the next page of EnvironmentContainer objects. If null, there are no - * additional pages. + * Set the value property: An array of objects of type EnvironmentContainer. * - * @param nextLink the nextLink value to set. + * @param value the value value to set. * @return the EnvironmentContainerResourceArmPaginatedResult object itself. */ - public EnvironmentContainerResourceArmPaginatedResult withNextLink(String nextLink) { - this.nextLink = nextLink; + public EnvironmentContainerResourceArmPaginatedResult withValue(List value) { + this.value = value; return this; } @@ -94,8 +94,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -115,12 +115,12 @@ public static EnvironmentContainerResourceArmPaginatedResult fromJson(JsonReader String fieldName = reader.getFieldName(); reader.nextToken(); - if ("value".equals(fieldName)) { + if ("nextLink".equals(fieldName)) { + deserializedEnvironmentContainerResourceArmPaginatedResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> EnvironmentContainerInner.fromJson(reader1)); deserializedEnvironmentContainerResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedEnvironmentContainerResourceArmPaginatedResult.nextLink = reader.getString(); } else { reader.skipChildren(); } 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 index cae88ac393c32..4d624aa428acd 100644 --- 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 @@ -14,7 +14,7 @@ import java.util.Map; /** - * Environment Variables for the container. + * The EnvironmentVariable model. */ @Fluent public final class EnvironmentVariable implements JsonSerializable { @@ -29,7 +29,7 @@ public final class EnvironmentVariable implements JsonSerializable */ private Map additionalProperties; @@ -80,7 +80,7 @@ public EnvironmentVariable withValue(String value) { } /** - * Get the additionalProperties property: Environment Variables for the container. + * Get the additionalProperties property: Dictionary of <any>. * * @return the additionalProperties value. */ @@ -89,7 +89,7 @@ public Map additionalProperties() { } /** - * Set the additionalProperties property: Environment Variables for the container. + * Set the additionalProperties property: Dictionary of <any>. * * @param additionalProperties the additionalProperties value to set. * @return the EnvironmentVariable object itself. 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 7995f620ea765..a7648009e3b47 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 @@ -17,18 +17,14 @@ @Fluent public final class EnvironmentVersionProperties extends AssetBase { /* - * Environment type is either user managed or curated by the Azure ML service - * + * Defines if image needs to be rebuilt based on base image changes. */ - private EnvironmentType environmentType; + private AutoRebuildSetting autoRebuild; /* - * Name of the image that will be used for the environment. - * + * Configuration settings for Docker build context. */ - private String image; + private BuildContext build; /* * Standard configuration file used by Conda that lets you install any kind of package, including Python, R, and @@ -40,14 +36,23 @@ public final class EnvironmentVersionProperties extends AssetBase { private String condaFile; /* - * Configuration settings for Docker build context. + * Environment type is either user managed or curated by the Azure ML service + * */ - private BuildContext build; + private EnvironmentType environmentType; /* - * The OS type of the environment. + * Name of the image that will be used for the environment. + * */ - private OperatingSystemType osType; + private String image; + + /* + * Environment image details + */ + private ImageDetails imageDetails; /* * Defines configuration specific to inference. @@ -55,9 +60,9 @@ public final class EnvironmentVersionProperties extends AssetBase { private InferenceContainerProperties inferenceConfig; /* - * Defines if image needs to be rebuilt based on base image changes. + * The OS type of the environment. */ - private AutoRebuildSetting autoRebuild; + private OperatingSystemType osType; /* * Provisioning state for the environment version. @@ -76,38 +81,42 @@ public EnvironmentVersionProperties() { } /** - * 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" />. + * Get the autoRebuild property: Defines if image needs to be rebuilt based on base image changes. * - * @return the environmentType value. + * @return the autoRebuild value. */ - public EnvironmentType environmentType() { - return this.environmentType; + public AutoRebuildSetting autoRebuild() { + return this.autoRebuild; } /** - * 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" - * />. + * Set the autoRebuild property: Defines if image needs to be rebuilt based on base image changes. * - * @return the image value. + * @param autoRebuild the autoRebuild value to set. + * @return the EnvironmentVersionProperties object itself. */ - public String image() { - return this.image; + public EnvironmentVersionProperties withAutoRebuild(AutoRebuildSetting autoRebuild) { + this.autoRebuild = autoRebuild; + return this; } /** - * 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" - * />. + * Get the build property: Configuration settings for Docker build context. * - * @param image the image value to set. + * @return the build value. + */ + public BuildContext build() { + return this.build; + } + + /** + * Set the build property: Configuration settings for Docker build context. + * + * @param build the build value to set. * @return the EnvironmentVersionProperties object itself. */ - public EnvironmentVersionProperties withImage(String image) { - this.image = image; + public EnvironmentVersionProperties withBuild(BuildContext build) { + this.build = build; return this; } @@ -140,42 +149,58 @@ public EnvironmentVersionProperties withCondaFile(String condaFile) { } /** - * Get the build property: Configuration settings for Docker build context. + * 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 build value. + * @return the environmentType value. */ - public BuildContext build() { - return this.build; + public EnvironmentType environmentType() { + return this.environmentType; } /** - * Set the build property: Configuration settings for Docker build context. + * 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" + * />. * - * @param build the build value to set. + * @return the image value. + */ + public String image() { + return this.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. */ - public EnvironmentVersionProperties withBuild(BuildContext build) { - this.build = build; + public EnvironmentVersionProperties withImage(String image) { + this.image = image; return this; } /** - * Get the osType property: The OS type of the environment. + * Get the imageDetails property: Environment image details. * - * @return the osType value. + * @return the imageDetails value. */ - public OperatingSystemType osType() { - return this.osType; + public ImageDetails imageDetails() { + return this.imageDetails; } /** - * Set the osType property: The OS type of the environment. + * Set the imageDetails property: Environment image details. * - * @param osType the osType value to set. + * @param imageDetails the imageDetails value to set. * @return the EnvironmentVersionProperties object itself. */ - public EnvironmentVersionProperties withOsType(OperatingSystemType osType) { - this.osType = osType; + public EnvironmentVersionProperties withImageDetails(ImageDetails imageDetails) { + this.imageDetails = imageDetails; return this; } @@ -200,22 +225,22 @@ public EnvironmentVersionProperties withInferenceConfig(InferenceContainerProper } /** - * Get the autoRebuild property: Defines if image needs to be rebuilt based on base image changes. + * Get the osType property: The OS type of the environment. * - * @return the autoRebuild value. + * @return the osType value. */ - public AutoRebuildSetting autoRebuild() { - return this.autoRebuild; + public OperatingSystemType osType() { + return this.osType; } /** - * Set the autoRebuild property: Defines if image needs to be rebuilt based on base image changes. + * Set the osType property: The OS type of the environment. * - * @param autoRebuild the autoRebuild value to set. + * @param osType the osType value to set. * @return the EnvironmentVersionProperties object itself. */ - public EnvironmentVersionProperties withAutoRebuild(AutoRebuildSetting autoRebuild) { - this.autoRebuild = autoRebuild; + public EnvironmentVersionProperties withOsType(OperatingSystemType osType) { + this.osType = osType; return this; } @@ -252,8 +277,8 @@ public EnvironmentVersionProperties withStage(String stage) { * {@inheritDoc} */ @Override - public EnvironmentVersionProperties withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); + public EnvironmentVersionProperties withIsAnonymous(Boolean isAnonymous) { + super.withIsAnonymous(isAnonymous); return this; } @@ -261,8 +286,8 @@ public EnvironmentVersionProperties withIsArchived(Boolean isArchived) { * {@inheritDoc} */ @Override - public EnvironmentVersionProperties withIsAnonymous(Boolean isAnonymous) { - super.withIsAnonymous(isAnonymous); + public EnvironmentVersionProperties withIsArchived(Boolean isArchived) { + super.withIsArchived(isArchived); return this; } @@ -279,8 +304,8 @@ public EnvironmentVersionProperties withDescription(String description) { * {@inheritDoc} */ @Override - public EnvironmentVersionProperties withTags(Map tags) { - super.withTags(tags); + public EnvironmentVersionProperties withProperties(Map properties) { + super.withProperties(properties); return this; } @@ -288,8 +313,8 @@ public EnvironmentVersionProperties withTags(Map tags) { * {@inheritDoc} */ @Override - public EnvironmentVersionProperties withProperties(Map properties) { - super.withProperties(properties); + public EnvironmentVersionProperties withTags(Map tags) { + super.withTags(tags); return this; } @@ -300,10 +325,12 @@ public EnvironmentVersionProperties withProperties(Map propertie */ @Override public void validate() { - super.validate(); if (build() != null) { build().validate(); } + if (imageDetails() != null) { + imageDetails().validate(); + } if (inferenceConfig() != null) { inferenceConfig().validate(); } @@ -316,16 +343,17 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", isArchived()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isAnonymous", isAnonymous()); - jsonWriter.writeStringField("image", this.image); - jsonWriter.writeStringField("condaFile", this.condaFile); + jsonWriter.writeBooleanField("isArchived", isArchived()); + jsonWriter.writeStringField("autoRebuild", this.autoRebuild == null ? null : this.autoRebuild.toString()); jsonWriter.writeJsonField("build", this.build); - jsonWriter.writeStringField("osType", this.osType == null ? null : this.osType.toString()); + jsonWriter.writeStringField("condaFile", this.condaFile); + jsonWriter.writeStringField("image", this.image); + jsonWriter.writeJsonField("imageDetails", this.imageDetails); jsonWriter.writeJsonField("inferenceConfig", this.inferenceConfig); - jsonWriter.writeStringField("autoRebuild", this.autoRebuild == null ? null : this.autoRebuild.toString()); + jsonWriter.writeStringField("osType", this.osType == null ? null : this.osType.toString()); jsonWriter.writeStringField("stage", this.stage); return jsonWriter.writeEndObject(); } @@ -347,35 +375,37 @@ public static EnvironmentVersionProperties fromJson(JsonReader jsonReader) throw if ("description".equals(fieldName)) { deserializedEnvironmentVersionProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedEnvironmentVersionProperties.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedEnvironmentVersionProperties.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedEnvironmentVersionProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedEnvironmentVersionProperties.withTags(tags); } else if ("isAnonymous".equals(fieldName)) { deserializedEnvironmentVersionProperties .withIsAnonymous(reader.getNullable(JsonReader::getBoolean)); + } else if ("isArchived".equals(fieldName)) { + deserializedEnvironmentVersionProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); + } else if ("autoRebuild".equals(fieldName)) { + deserializedEnvironmentVersionProperties.autoRebuild + = AutoRebuildSetting.fromString(reader.getString()); + } else if ("build".equals(fieldName)) { + deserializedEnvironmentVersionProperties.build = BuildContext.fromJson(reader); + } else if ("condaFile".equals(fieldName)) { + deserializedEnvironmentVersionProperties.condaFile = reader.getString(); } else if ("environmentType".equals(fieldName)) { deserializedEnvironmentVersionProperties.environmentType = EnvironmentType.fromString(reader.getString()); } else if ("image".equals(fieldName)) { deserializedEnvironmentVersionProperties.image = reader.getString(); - } else if ("condaFile".equals(fieldName)) { - deserializedEnvironmentVersionProperties.condaFile = reader.getString(); - } else if ("build".equals(fieldName)) { - deserializedEnvironmentVersionProperties.build = BuildContext.fromJson(reader); - } else if ("osType".equals(fieldName)) { - deserializedEnvironmentVersionProperties.osType - = OperatingSystemType.fromString(reader.getString()); + } else if ("imageDetails".equals(fieldName)) { + deserializedEnvironmentVersionProperties.imageDetails = ImageDetails.fromJson(reader); } else if ("inferenceConfig".equals(fieldName)) { deserializedEnvironmentVersionProperties.inferenceConfig = InferenceContainerProperties.fromJson(reader); - } else if ("autoRebuild".equals(fieldName)) { - deserializedEnvironmentVersionProperties.autoRebuild - = AutoRebuildSetting.fromString(reader.getString()); + } else if ("osType".equals(fieldName)) { + deserializedEnvironmentVersionProperties.osType + = OperatingSystemType.fromString(reader.getString()); } else if ("provisioningState".equals(fieldName)) { deserializedEnvironmentVersionProperties.provisioningState = AssetProvisioningState.fromString(reader.getString()); 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 560a95e0df20d..87a270844d237 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 @@ -20,14 +20,14 @@ public final class EnvironmentVersionResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type EnvironmentVersion. + * The link to the next page of EnvironmentVersion objects. If null, there are no additional pages. */ - private List value; + private String nextLink; /* - * The link to the next page of EnvironmentVersion objects. If null, there are no additional pages. + * An array of objects of type EnvironmentVersion. */ - private String nextLink; + private List value; /** * Creates an instance of EnvironmentVersionResourceArmPaginatedResult class. @@ -36,44 +36,44 @@ public EnvironmentVersionResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type EnvironmentVersion. + * Get the nextLink property: The link to the next page of EnvironmentVersion objects. If null, there are no + * additional pages. * - * @return the value value. + * @return the nextLink value. */ - public List value() { - return this.value; + public String nextLink() { + return this.nextLink; } /** - * Set the value property: An array of objects of type EnvironmentVersion. + * Set the nextLink property: The link to the next page of EnvironmentVersion objects. If null, there are no + * additional pages. * - * @param value the value value to set. + * @param nextLink the nextLink value to set. * @return the EnvironmentVersionResourceArmPaginatedResult object itself. */ - public EnvironmentVersionResourceArmPaginatedResult withValue(List value) { - this.value = value; + public EnvironmentVersionResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; return this; } /** - * Get the nextLink property: The link to the next page of EnvironmentVersion objects. If null, there are no - * additional pages. + * Get the value property: An array of objects of type EnvironmentVersion. * - * @return the nextLink value. + * @return the value value. */ - public String nextLink() { - return this.nextLink; + public List value() { + return this.value; } /** - * Set the nextLink property: The link to the next page of EnvironmentVersion objects. If null, there are no - * additional pages. + * Set the value property: An array of objects of type EnvironmentVersion. * - * @param nextLink the nextLink value to set. + * @param value the value value to set. * @return the EnvironmentVersionResourceArmPaginatedResult object itself. */ - public EnvironmentVersionResourceArmPaginatedResult withNextLink(String nextLink) { - this.nextLink = nextLink; + public EnvironmentVersionResourceArmPaginatedResult withValue(List value) { + this.value = value; return this; } @@ -94,8 +94,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -115,12 +115,12 @@ public static EnvironmentVersionResourceArmPaginatedResult fromJson(JsonReader j String fieldName = reader.getFieldName(); reader.nextToken(); - if ("value".equals(fieldName)) { + if ("nextLink".equals(fieldName)) { + deserializedEnvironmentVersionResourceArmPaginatedResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> EnvironmentVersionInner.fromJson(reader1)); deserializedEnvironmentVersionResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedEnvironmentVersionResourceArmPaginatedResult.nextLink = reader.getString(); } else { reader.skipChildren(); } 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 e1b65bc65d340..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 @@ -16,7 +16,7 @@ public interface ExternalFqdnResponse { * * @return the value value. */ - List value(); + List value(); /** * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ExternalFqdnResponseInner object. 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 index 79b8817282211..9d620c470e9b4 100644 --- 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 @@ -24,15 +24,20 @@ public final class FeatureAttributionDriftMonitoringSignal extends MonitoringSig private MonitoringSignalType signalType = MonitoringSignalType.FEATURE_ATTRIBUTION_DRIFT; /* - * [Required] A list of metrics to calculate and their associated thresholds. + * A dictionary that maps feature names to their respective data types. */ - private FeatureAttributionMetricThreshold metricThreshold; + private Map featureDataTypeOverride; /* * [Required] The settings for computing feature importance. */ private FeatureImportanceSettings featureImportanceSettings; + /* + * [Required] A list of metrics to calculate and their associated thresholds. + */ + private FeatureAttributionMetricThreshold metricThreshold; + /* * [Required] The data which drift will be calculated for. */ @@ -43,11 +48,6 @@ public final class FeatureAttributionDriftMonitoringSignal extends MonitoringSig */ private MonitoringInputDataBase referenceData; - /* - * A dictionary that maps feature names to their respective data types. - */ - private Map featureDataTypeOverride; - /** * Creates an instance of FeatureAttributionDriftMonitoringSignal class. */ @@ -65,23 +65,23 @@ public MonitoringSignalType signalType() { } /** - * Get the metricThreshold property: [Required] A list of metrics to calculate and their associated thresholds. + * Get the featureDataTypeOverride property: A dictionary that maps feature names to their respective data types. * - * @return the metricThreshold value. + * @return the featureDataTypeOverride value. */ - public FeatureAttributionMetricThreshold metricThreshold() { - return this.metricThreshold; + public Map featureDataTypeOverride() { + return this.featureDataTypeOverride; } /** - * Set the metricThreshold property: [Required] A list of metrics to calculate and their associated thresholds. + * Set the featureDataTypeOverride property: A dictionary that maps feature names to their respective data types. * - * @param metricThreshold the metricThreshold value to set. + * @param featureDataTypeOverride the featureDataTypeOverride value to set. * @return the FeatureAttributionDriftMonitoringSignal object itself. */ public FeatureAttributionDriftMonitoringSignal - withMetricThreshold(FeatureAttributionMetricThreshold metricThreshold) { - this.metricThreshold = metricThreshold; + withFeatureDataTypeOverride(Map featureDataTypeOverride) { + this.featureDataTypeOverride = featureDataTypeOverride; return this; } @@ -106,6 +106,27 @@ public 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. * @@ -146,27 +167,6 @@ public FeatureAttributionDriftMonitoringSignal withReferenceData(MonitoringInput 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 FeatureAttributionDriftMonitoringSignal object itself. - */ - public FeatureAttributionDriftMonitoringSignal - withFeatureDataTypeOverride(Map featureDataTypeOverride) { - this.featureDataTypeOverride = featureDataTypeOverride; - return this; - } - /** * {@inheritDoc} */ @@ -193,20 +193,19 @@ public FeatureAttributionDriftMonitoringSignal withProperties(Map writer.writeString(element == null ? null : element.toString())); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("metricThreshold", this.metricThreshold); jsonWriter.writeJsonField("featureImportanceSettings", this.featureImportanceSettings); + jsonWriter.writeJsonField("metricThreshold", this.metricThreshold); jsonWriter.writeArrayField("productionData", this.productionData, (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("referenceData", this.referenceData); @@ -270,12 +269,12 @@ public static FeatureAttributionDriftMonitoringSignal fromJson(JsonReader jsonRe } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedFeatureAttributionDriftMonitoringSignal.withProperties(properties); - } else if ("metricThreshold".equals(fieldName)) { - deserializedFeatureAttributionDriftMonitoringSignal.metricThreshold - = FeatureAttributionMetricThreshold.fromJson(reader); } else if ("featureImportanceSettings".equals(fieldName)) { deserializedFeatureAttributionDriftMonitoringSignal.featureImportanceSettings = FeatureImportanceSettings.fromJson(reader); + } else if ("metricThreshold".equals(fieldName)) { + deserializedFeatureAttributionDriftMonitoringSignal.metricThreshold + = FeatureAttributionMetricThreshold.fromJson(reader); } else if ("productionData".equals(fieldName)) { List productionData = reader.readArray(reader1 -> MonitoringInputDataBase.fromJson(reader1)); 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 index 8df5864f051d7..a0ac72fdbc7fe 100644 --- 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 @@ -18,14 +18,14 @@ @Fluent public final class FeatureAttributionMetricThreshold implements JsonSerializable { /* - * The threshold value. If null, a default value will be set depending on the selected metric. + * [Required] The feature attribution metric to calculate. */ - private MonitoringThreshold threshold; + private FeatureAttributionMetric metric; /* - * [Required] The feature attribution metric to calculate. + * The threshold value. If null, a default value will be set depending on the selected metric. */ - private FeatureAttributionMetric metric; + private MonitoringThreshold threshold; /** * Creates an instance of FeatureAttributionMetricThreshold class. @@ -34,44 +34,44 @@ public FeatureAttributionMetricThreshold() { } /** - * Get the threshold property: The threshold value. If null, a default value will be set depending on the selected - * metric. + * Get the metric property: [Required] The feature attribution metric to calculate. * - * @return the threshold value. + * @return the metric value. */ - public MonitoringThreshold threshold() { - return this.threshold; + public FeatureAttributionMetric metric() { + return this.metric; } /** - * Set the threshold property: The threshold value. If null, a default value will be set depending on the selected - * metric. + * Set the metric property: [Required] The feature attribution metric to calculate. * - * @param threshold the threshold value to set. + * @param metric the metric value to set. * @return the FeatureAttributionMetricThreshold object itself. */ - public FeatureAttributionMetricThreshold withThreshold(MonitoringThreshold threshold) { - this.threshold = threshold; + public FeatureAttributionMetricThreshold withMetric(FeatureAttributionMetric metric) { + this.metric = metric; return this; } /** - * Get the metric property: [Required] The feature attribution metric to calculate. + * Get the threshold property: The threshold value. If null, a default value will be set depending on the selected + * metric. * - * @return the metric value. + * @return the threshold value. */ - public FeatureAttributionMetric metric() { - return this.metric; + public MonitoringThreshold threshold() { + return this.threshold; } /** - * Set the metric property: [Required] The feature attribution metric to calculate. + * Set the threshold property: The threshold value. If null, a default value will be set depending on the selected + * metric. * - * @param metric the metric value to set. + * @param threshold the threshold value to set. * @return the FeatureAttributionMetricThreshold object itself. */ - public FeatureAttributionMetricThreshold withMetric(FeatureAttributionMetric metric) { - this.metric = metric; + public FeatureAttributionMetricThreshold withThreshold(MonitoringThreshold threshold) { + this.threshold = threshold; return this; } @@ -81,14 +81,14 @@ public FeatureAttributionMetricThreshold withMetric(FeatureAttributionMetric met * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (threshold() != null) { - threshold().validate(); - } if (metric() == null) { throw LOGGER.atError() .log(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/FeatureProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureProperties.java index c89e04c6d4c31..edc2af9d6963c 100644 --- 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 @@ -17,14 +17,14 @@ @Fluent public final class FeatureProperties extends ResourceBase { /* - * Specifies name + * Specifies type */ - private String featureName; + private FeatureDataType dataType; /* - * Specifies type + * Specifies name */ - private FeatureDataType dataType; + private String featureName; /** * Creates an instance of FeatureProperties class. @@ -33,42 +33,42 @@ public FeatureProperties() { } /** - * Get the featureName property: Specifies name. + * Get the dataType property: Specifies type. * - * @return the featureName value. + * @return the dataType value. */ - public String featureName() { - return this.featureName; + public FeatureDataType dataType() { + return this.dataType; } /** - * Set the featureName property: Specifies name. + * Set the dataType property: Specifies type. * - * @param featureName the featureName value to set. + * @param dataType the dataType value to set. * @return the FeatureProperties object itself. */ - public FeatureProperties withFeatureName(String featureName) { - this.featureName = featureName; + public FeatureProperties withDataType(FeatureDataType dataType) { + this.dataType = dataType; return this; } /** - * Get the dataType property: Specifies type. + * Get the featureName property: Specifies name. * - * @return the dataType value. + * @return the featureName value. */ - public FeatureDataType dataType() { - return this.dataType; + public String featureName() { + return this.featureName; } /** - * Set the dataType property: Specifies type. + * Set the featureName property: Specifies name. * - * @param dataType the dataType value to set. + * @param featureName the featureName value to set. * @return the FeatureProperties object itself. */ - public FeatureProperties withDataType(FeatureDataType dataType) { - this.dataType = dataType; + public FeatureProperties withFeatureName(String featureName) { + this.featureName = featureName; return this; } @@ -85,8 +85,8 @@ public FeatureProperties withDescription(String description) { * {@inheritDoc} */ @Override - public FeatureProperties withTags(Map tags) { - super.withTags(tags); + public FeatureProperties withProperties(Map properties) { + super.withProperties(properties); return this; } @@ -94,8 +94,8 @@ public FeatureProperties withTags(Map tags) { * {@inheritDoc} */ @Override - public FeatureProperties withProperties(Map properties) { - super.withProperties(properties); + public FeatureProperties withTags(Map tags) { + super.withTags(tags); return this; } @@ -106,7 +106,6 @@ public FeatureProperties withProperties(Map properties) { */ @Override public void validate() { - super.validate(); } /** @@ -116,10 +115,10 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("featureName", this.featureName); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("dataType", this.dataType == null ? null : this.dataType.toString()); + jsonWriter.writeStringField("featureName", this.featureName); return jsonWriter.writeEndObject(); } @@ -140,16 +139,16 @@ public static FeatureProperties fromJson(JsonReader jsonReader) throws IOExcepti if ("description".equals(fieldName)) { deserializedFeatureProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedFeatureProperties.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedFeatureProperties.withProperties(properties); - } else if ("featureName".equals(fieldName)) { - deserializedFeatureProperties.featureName = reader.getString(); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedFeatureProperties.withTags(tags); } else if ("dataType".equals(fieldName)) { deserializedFeatureProperties.dataType = FeatureDataType.fromString(reader.getString()); + } else if ("featureName".equals(fieldName)) { + deserializedFeatureProperties.featureName = reader.getString(); } else { reader.skipChildren(); } 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 index bc14838a569b2..e265ce9c2391b 100644 --- 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 @@ -19,14 +19,14 @@ @Fluent public final class FeatureResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type Feature. + * The link to the next page of Feature objects. If null, there are no additional pages. */ - private List value; + private String nextLink; /* - * The link to the next page of Feature objects. If null, there are no additional pages. + * An array of objects of type Feature. */ - private String nextLink; + private List value; /** * Creates an instance of FeatureResourceArmPaginatedResult class. @@ -35,42 +35,42 @@ public FeatureResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type Feature. + * Get the nextLink property: The link to the next page of Feature objects. If null, there are no additional pages. * - * @return the value value. + * @return the nextLink value. */ - public List value() { - return this.value; + public String nextLink() { + return this.nextLink; } /** - * Set the value property: An array of objects of type Feature. + * Set the nextLink property: The link to the next page of Feature objects. If null, there are no additional pages. * - * @param value the value value to set. + * @param nextLink the nextLink value to set. * @return the FeatureResourceArmPaginatedResult object itself. */ - public FeatureResourceArmPaginatedResult withValue(List value) { - this.value = value; + public FeatureResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; return this; } /** - * Get the nextLink property: The link to the next page of Feature objects. If null, there are no additional pages. + * Get the value property: An array of objects of type Feature. * - * @return the nextLink value. + * @return the value value. */ - public String nextLink() { - return this.nextLink; + public List value() { + return this.value; } /** - * Set the nextLink property: The link to the next page of Feature objects. If null, there are no additional pages. + * Set the value property: An array of objects of type Feature. * - * @param nextLink the nextLink value to set. + * @param value the value value to set. * @return the FeatureResourceArmPaginatedResult object itself. */ - public FeatureResourceArmPaginatedResult withNextLink(String nextLink) { - this.nextLink = nextLink; + public FeatureResourceArmPaginatedResult withValue(List value) { + this.value = value; return this; } @@ -91,8 +91,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -112,11 +112,11 @@ public static FeatureResourceArmPaginatedResult fromJson(JsonReader jsonReader) String fieldName = reader.getFieldName(); reader.nextToken(); - if ("value".equals(fieldName)) { + if ("nextLink".equals(fieldName)) { + deserializedFeatureResourceArmPaginatedResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> FeatureInner.fromJson(reader1)); deserializedFeatureResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedFeatureResourceArmPaginatedResult.nextLink = reader.getString(); } else { reader.skipChildren(); } 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 index 4b81301030354..3be4412e9ba7d 100644 --- 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 @@ -12,12 +12,12 @@ import java.io.IOException; /** - * Settings for feature store type workspace. + * The FeatureStoreSettings model. */ @Fluent public final class FeatureStoreSettings implements JsonSerializable { /* - * Compute runtime config for feature store type workspace. + * The computeRuntime property. */ private ComputeRuntimeDto computeRuntime; @@ -38,7 +38,7 @@ public FeatureStoreSettings() { } /** - * Get the computeRuntime property: Compute runtime config for feature store type workspace. + * Get the computeRuntime property: The computeRuntime property. * * @return the computeRuntime value. */ @@ -47,7 +47,7 @@ public ComputeRuntimeDto computeRuntime() { } /** - * Set the computeRuntime property: Compute runtime config for feature store type workspace. + * Set the computeRuntime property: The computeRuntime property. * * @param computeRuntime the computeRuntime value to set. * @return the FeatureStoreSettings object itself. 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 index 4e6c594b88286..826cb2f367b4f 100644 --- 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 @@ -71,7 +71,6 @@ public FeatureSubset withFeatures(List features) { */ @Override public void validate() { - super.validate(); if (features() == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property features in model FeatureSubset")); 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 index ef1902fa46fa4..3dc654e096cbc 100644 --- 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 @@ -20,14 +20,14 @@ @Fluent public final class FeatureWindow implements JsonSerializable { /* - * Specifies the feature window start time + * Specifies the feature window end time */ - private OffsetDateTime featureWindowStart; + private OffsetDateTime featureWindowEnd; /* - * Specifies the feature window end time + * Specifies the feature window start time */ - private OffsetDateTime featureWindowEnd; + private OffsetDateTime featureWindowStart; /** * Creates an instance of FeatureWindow class. @@ -36,42 +36,42 @@ public FeatureWindow() { } /** - * Get the featureWindowStart property: Specifies the feature window start time. + * Get the featureWindowEnd property: Specifies the feature window end time. * - * @return the featureWindowStart value. + * @return the featureWindowEnd value. */ - public OffsetDateTime featureWindowStart() { - return this.featureWindowStart; + public OffsetDateTime featureWindowEnd() { + return this.featureWindowEnd; } /** - * Set the featureWindowStart property: Specifies the feature window start time. + * Set the featureWindowEnd property: Specifies the feature window end time. * - * @param featureWindowStart the featureWindowStart value to set. + * @param featureWindowEnd the featureWindowEnd value to set. * @return the FeatureWindow object itself. */ - public FeatureWindow withFeatureWindowStart(OffsetDateTime featureWindowStart) { - this.featureWindowStart = featureWindowStart; + public FeatureWindow withFeatureWindowEnd(OffsetDateTime featureWindowEnd) { + this.featureWindowEnd = featureWindowEnd; return this; } /** - * Get the featureWindowEnd property: Specifies the feature window end time. + * Get the featureWindowStart property: Specifies the feature window start time. * - * @return the featureWindowEnd value. + * @return the featureWindowStart value. */ - public OffsetDateTime featureWindowEnd() { - return this.featureWindowEnd; + public OffsetDateTime featureWindowStart() { + return this.featureWindowStart; } /** - * Set the featureWindowEnd property: Specifies the feature window end time. + * Set the featureWindowStart property: Specifies the feature window start time. * - * @param featureWindowEnd the featureWindowEnd value to set. + * @param featureWindowStart the featureWindowStart value to set. * @return the FeatureWindow object itself. */ - public FeatureWindow withFeatureWindowEnd(OffsetDateTime featureWindowEnd) { - this.featureWindowEnd = featureWindowEnd; + public FeatureWindow withFeatureWindowStart(OffsetDateTime featureWindowStart) { + this.featureWindowStart = featureWindowStart; return this; } @@ -89,14 +89,14 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("featureWindowStart", - this.featureWindowStart == null - ? null - : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.featureWindowStart)); jsonWriter.writeStringField("featureWindowEnd", this.featureWindowEnd == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.featureWindowEnd)); + jsonWriter.writeStringField("featureWindowStart", + this.featureWindowStart == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.featureWindowStart)); return jsonWriter.writeEndObject(); } @@ -115,12 +115,12 @@ public static FeatureWindow fromJson(JsonReader jsonReader) throws IOException { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("featureWindowStart".equals(fieldName)) { - deserializedFeatureWindow.featureWindowStart = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("featureWindowEnd".equals(fieldName)) { + if ("featureWindowEnd".equals(fieldName)) { deserializedFeatureWindow.featureWindowEnd = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("featureWindowStart".equals(fieldName)) { + deserializedFeatureWindow.featureWindowStart = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else { reader.skipChildren(); } 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 index 6ab8fbd3a8b7c..6cbc8e5553e83 100644 --- 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 @@ -22,14 +22,14 @@ public final class FeaturesetContainerProperties extends AssetContainer { private AssetProvisioningState provisioningState; /* - * The latest version inside this container. + * The next auto incremental version */ - private String latestVersion; + private String nextVersion; /* - * The next auto incremental version + * The latest version inside this container. */ - private String nextVersion; + private String latestVersion; /** * Creates an instance of FeaturesetContainerProperties class. @@ -47,23 +47,23 @@ public AssetProvisioningState provisioningState() { } /** - * Get the latestVersion property: The latest version inside this container. + * Get the nextVersion property: The next auto incremental version. * - * @return the latestVersion value. + * @return the nextVersion value. */ @Override - public String latestVersion() { - return this.latestVersion; + public String nextVersion() { + return this.nextVersion; } /** - * Get the nextVersion property: The next auto incremental version. + * Get the latestVersion property: The latest version inside this container. * - * @return the nextVersion value. + * @return the latestVersion value. */ @Override - public String nextVersion() { - return this.nextVersion; + public String latestVersion() { + return this.latestVersion; } /** @@ -88,8 +88,8 @@ public FeaturesetContainerProperties withDescription(String description) { * {@inheritDoc} */ @Override - public FeaturesetContainerProperties withTags(Map tags) { - super.withTags(tags); + public FeaturesetContainerProperties withProperties(Map properties) { + super.withProperties(properties); return this; } @@ -97,8 +97,8 @@ public FeaturesetContainerProperties withTags(Map tags) { * {@inheritDoc} */ @Override - public FeaturesetContainerProperties withProperties(Map properties) { - super.withProperties(properties); + public FeaturesetContainerProperties withTags(Map tags) { + super.withTags(tags); return this; } @@ -109,7 +109,6 @@ public FeaturesetContainerProperties withProperties(Map properti */ @Override public void validate() { - super.validate(); } /** @@ -119,8 +118,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isArchived", isArchived()); return jsonWriter.writeEndObject(); } @@ -143,12 +142,12 @@ public static FeaturesetContainerProperties fromJson(JsonReader jsonReader) thro if ("description".equals(fieldName)) { deserializedFeaturesetContainerProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedFeaturesetContainerProperties.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedFeaturesetContainerProperties.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedFeaturesetContainerProperties.withTags(tags); } else if ("isArchived".equals(fieldName)) { deserializedFeaturesetContainerProperties .withIsArchived(reader.getNullable(JsonReader::getBoolean)); 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 index 22d59a12caa1e..06ca33207969a 100644 --- 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 @@ -20,14 +20,14 @@ public final class FeaturesetContainerResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type FeaturesetContainer. + * The link to the next page of FeaturesetContainer objects. If null, there are no additional pages. */ - private List value; + private String nextLink; /* - * The link to the next page of FeaturesetContainer objects. If null, there are no additional pages. + * An array of objects of type FeaturesetContainer. */ - private String nextLink; + private List value; /** * Creates an instance of FeaturesetContainerResourceArmPaginatedResult class. @@ -36,44 +36,44 @@ public FeaturesetContainerResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type FeaturesetContainer. + * Get the nextLink property: The link to the next page of FeaturesetContainer objects. If null, there are no + * additional pages. * - * @return the value value. + * @return the nextLink value. */ - public List value() { - return this.value; + public String nextLink() { + return this.nextLink; } /** - * Set the value property: An array of objects of type FeaturesetContainer. + * Set the nextLink property: The link to the next page of FeaturesetContainer objects. If null, there are no + * additional pages. * - * @param value the value value to set. + * @param nextLink the nextLink value to set. * @return the FeaturesetContainerResourceArmPaginatedResult object itself. */ - public FeaturesetContainerResourceArmPaginatedResult withValue(List value) { - this.value = value; + public FeaturesetContainerResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; return this; } /** - * Get the nextLink property: The link to the next page of FeaturesetContainer objects. If null, there are no - * additional pages. + * Get the value property: An array of objects of type FeaturesetContainer. * - * @return the nextLink value. + * @return the value value. */ - public String nextLink() { - return this.nextLink; + public List value() { + return this.value; } /** - * Set the nextLink property: The link to the next page of FeaturesetContainer objects. If null, there are no - * additional pages. + * Set the value property: An array of objects of type FeaturesetContainer. * - * @param nextLink the nextLink value to set. + * @param value the value value to set. * @return the FeaturesetContainerResourceArmPaginatedResult object itself. */ - public FeaturesetContainerResourceArmPaginatedResult withNextLink(String nextLink) { - this.nextLink = nextLink; + public FeaturesetContainerResourceArmPaginatedResult withValue(List value) { + this.value = value; return this; } @@ -94,8 +94,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -115,12 +115,12 @@ public static FeaturesetContainerResourceArmPaginatedResult fromJson(JsonReader String fieldName = reader.getFieldName(); reader.nextToken(); - if ("value".equals(fieldName)) { + if ("nextLink".equals(fieldName)) { + deserializedFeaturesetContainerResourceArmPaginatedResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> FeaturesetContainerInner.fromJson(reader1)); deserializedFeaturesetContainerResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedFeaturesetContainerResourceArmPaginatedResult.nextLink = reader.getString(); } else { reader.skipChildren(); } 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 index f8991e62d7886..0fab21a65154e 100644 --- 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 @@ -19,9 +19,9 @@ @Fluent public final class FeaturesetVersionBackfillRequest implements JsonSerializable { /* - * Specifies description + * Specified the data availability status that you want to backfill */ - private String displayName; + private List dataAvailabilityStatus; /* * Specifies description @@ -29,14 +29,14 @@ public final class FeaturesetVersionBackfillRequest implements JsonSerializable< private String description; /* - * Specifies the backfill feature window to be materialized + * Specifies description */ - private FeatureWindow featureWindow; + private String displayName; /* - * Specified the data availability status that you want to backfill + * Specifies the backfill feature window to be materialized */ - private List dataAvailabilityStatus; + private FeatureWindow featureWindow; /* * Specify the jobId to retry the failed materialization @@ -44,9 +44,9 @@ public final class FeaturesetVersionBackfillRequest implements JsonSerializable< private String jobId; /* - * Specifies the tags + * Specifies the properties */ - private Map tags; + private Map properties; /* * Specifies the compute resource settings @@ -59,9 +59,9 @@ public final class FeaturesetVersionBackfillRequest implements JsonSerializable< private Map sparkConfiguration; /* - * Specifies the properties + * Specifies the tags */ - private Map properties; + private Map tags; /** * Creates an instance of FeaturesetVersionBackfillRequest class. @@ -70,22 +70,23 @@ public FeaturesetVersionBackfillRequest() { } /** - * Get the displayName property: Specifies description. + * Get the dataAvailabilityStatus property: Specified the data availability status that you want to backfill. * - * @return the displayName value. + * @return the dataAvailabilityStatus value. */ - public String displayName() { - return this.displayName; + public List dataAvailabilityStatus() { + return this.dataAvailabilityStatus; } /** - * Set the displayName property: Specifies description. + * Set the dataAvailabilityStatus property: Specified the data availability status that you want to backfill. * - * @param displayName the displayName value to set. + * @param dataAvailabilityStatus the dataAvailabilityStatus value to set. * @return the FeaturesetVersionBackfillRequest object itself. */ - public FeaturesetVersionBackfillRequest withDisplayName(String displayName) { - this.displayName = displayName; + public FeaturesetVersionBackfillRequest + withDataAvailabilityStatus(List dataAvailabilityStatus) { + this.dataAvailabilityStatus = dataAvailabilityStatus; return this; } @@ -110,43 +111,42 @@ public FeaturesetVersionBackfillRequest withDescription(String description) { } /** - * Get the featureWindow property: Specifies the backfill feature window to be materialized. + * Get the displayName property: Specifies description. * - * @return the featureWindow value. + * @return the displayName value. */ - public FeatureWindow featureWindow() { - return this.featureWindow; + public String displayName() { + return this.displayName; } /** - * Set the featureWindow property: Specifies the backfill feature window to be materialized. + * Set the displayName property: Specifies description. * - * @param featureWindow the featureWindow value to set. + * @param displayName the displayName value to set. * @return the FeaturesetVersionBackfillRequest object itself. */ - public FeaturesetVersionBackfillRequest withFeatureWindow(FeatureWindow featureWindow) { - this.featureWindow = featureWindow; + public FeaturesetVersionBackfillRequest withDisplayName(String displayName) { + this.displayName = displayName; return this; } /** - * Get the dataAvailabilityStatus property: Specified the data availability status that you want to backfill. + * Get the featureWindow property: Specifies the backfill feature window to be materialized. * - * @return the dataAvailabilityStatus value. + * @return the featureWindow value. */ - public List dataAvailabilityStatus() { - return this.dataAvailabilityStatus; + public FeatureWindow featureWindow() { + return this.featureWindow; } /** - * Set the dataAvailabilityStatus property: Specified the data availability status that you want to backfill. + * Set the featureWindow property: Specifies the backfill feature window to be materialized. * - * @param dataAvailabilityStatus the dataAvailabilityStatus value to set. + * @param featureWindow the featureWindow value to set. * @return the FeaturesetVersionBackfillRequest object itself. */ - public FeaturesetVersionBackfillRequest - withDataAvailabilityStatus(List dataAvailabilityStatus) { - this.dataAvailabilityStatus = dataAvailabilityStatus; + public FeaturesetVersionBackfillRequest withFeatureWindow(FeatureWindow featureWindow) { + this.featureWindow = featureWindow; return this; } @@ -171,22 +171,22 @@ public FeaturesetVersionBackfillRequest withJobId(String jobId) { } /** - * Get the tags property: Specifies the tags. + * Get the properties property: Specifies the properties. * - * @return the tags value. + * @return the properties value. */ - public Map tags() { - return this.tags; + public Map properties() { + return this.properties; } /** - * Set the tags property: Specifies the tags. + * Set the properties property: Specifies the properties. * - * @param tags the tags value to set. + * @param properties the properties value to set. * @return the FeaturesetVersionBackfillRequest object itself. */ - public FeaturesetVersionBackfillRequest withTags(Map tags) { - this.tags = tags; + public FeaturesetVersionBackfillRequest withProperties(Map properties) { + this.properties = properties; return this; } @@ -231,22 +231,22 @@ public FeaturesetVersionBackfillRequest withSparkConfiguration(Map properties() { - return this.properties; + public Map tags() { + return this.tags; } /** - * Set the properties property: Specifies the properties. + * Set the tags property: Specifies the tags. * - * @param properties the properties value to set. + * @param tags the tags value to set. * @return the FeaturesetVersionBackfillRequest object itself. */ - public FeaturesetVersionBackfillRequest withProperties(Map properties) { - this.properties = properties; + public FeaturesetVersionBackfillRequest withTags(Map tags) { + this.tags = tags; return this; } @@ -270,17 +270,17 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("displayName", this.displayName); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeJsonField("featureWindow", this.featureWindow); jsonWriter.writeArrayField("dataAvailabilityStatus", this.dataAvailabilityStatus, (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeJsonField("featureWindow", this.featureWindow); jsonWriter.writeStringField("jobId", this.jobId); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("properties", this.properties, (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("resource", this.resource); jsonWriter.writeMapField("sparkConfiguration", this.sparkConfiguration, (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("properties", this.properties, (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -300,30 +300,30 @@ public static FeaturesetVersionBackfillRequest fromJson(JsonReader jsonReader) t String fieldName = reader.getFieldName(); reader.nextToken(); - if ("displayName".equals(fieldName)) { - deserializedFeaturesetVersionBackfillRequest.displayName = reader.getString(); + if ("dataAvailabilityStatus".equals(fieldName)) { + List dataAvailabilityStatus + = reader.readArray(reader1 -> DataAvailabilityStatus.fromString(reader1.getString())); + deserializedFeaturesetVersionBackfillRequest.dataAvailabilityStatus = dataAvailabilityStatus; } else if ("description".equals(fieldName)) { deserializedFeaturesetVersionBackfillRequest.description = reader.getString(); + } else if ("displayName".equals(fieldName)) { + deserializedFeaturesetVersionBackfillRequest.displayName = reader.getString(); } else if ("featureWindow".equals(fieldName)) { deserializedFeaturesetVersionBackfillRequest.featureWindow = FeatureWindow.fromJson(reader); - } else if ("dataAvailabilityStatus".equals(fieldName)) { - List dataAvailabilityStatus - = reader.readArray(reader1 -> DataAvailabilityStatus.fromString(reader1.getString())); - deserializedFeaturesetVersionBackfillRequest.dataAvailabilityStatus = dataAvailabilityStatus; } else if ("jobId".equals(fieldName)) { deserializedFeaturesetVersionBackfillRequest.jobId = reader.getString(); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedFeaturesetVersionBackfillRequest.tags = tags; + } else if ("properties".equals(fieldName)) { + Map properties = reader.readMap(reader1 -> reader1.getString()); + deserializedFeaturesetVersionBackfillRequest.properties = properties; } else if ("resource".equals(fieldName)) { deserializedFeaturesetVersionBackfillRequest.resource = MaterializationComputeResource.fromJson(reader); } else if ("sparkConfiguration".equals(fieldName)) { Map sparkConfiguration = reader.readMap(reader1 -> reader1.getString()); deserializedFeaturesetVersionBackfillRequest.sparkConfiguration = sparkConfiguration; - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedFeaturesetVersionBackfillRequest.properties = properties; + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedFeaturesetVersionBackfillRequest.tags = tags; } else { reader.skipChildren(); } 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 index 9925055344c7a..11a6004baa846 100644 --- 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 @@ -18,9 +18,9 @@ @Fluent public final class FeaturesetVersionProperties extends AssetBase { /* - * Specifies the feature spec details + * Specifies list of entities */ - private FeaturesetSpecification specification; + private List entities; /* * Specifies the materialization settings @@ -28,19 +28,19 @@ public final class FeaturesetVersionProperties extends AssetBase { private MaterializationSettings materializationSettings; /* - * Specifies the asset stage + * Provisioning state for the featureset version container. */ - private String stage; + private AssetProvisioningState provisioningState; /* - * Specifies list of entities + * Specifies the feature spec details */ - private List entities; + private FeaturesetSpecification specification; /* - * Provisioning state for the featureset version container. + * Specifies the asset stage */ - private AssetProvisioningState provisioningState; + private String stage; /** * Creates an instance of FeaturesetVersionProperties class. @@ -49,22 +49,22 @@ public FeaturesetVersionProperties() { } /** - * Get the specification property: Specifies the feature spec details. + * Get the entities property: Specifies list of entities. * - * @return the specification value. + * @return the entities value. */ - public FeaturesetSpecification specification() { - return this.specification; + public List entities() { + return this.entities; } /** - * Set the specification property: Specifies the feature spec details. + * Set the entities property: Specifies list of entities. * - * @param specification the specification value to set. + * @param entities the entities value to set. * @return the FeaturesetVersionProperties object itself. */ - public FeaturesetVersionProperties withSpecification(FeaturesetSpecification specification) { - this.specification = specification; + public FeaturesetVersionProperties withEntities(List entities) { + this.entities = entities; return this; } @@ -89,60 +89,60 @@ public FeaturesetVersionProperties withMaterializationSettings(MaterializationSe } /** - * Get the stage property: Specifies the asset stage. + * Get the provisioningState property: Provisioning state for the featureset version container. * - * @return the stage value. + * @return the provisioningState value. */ - public String stage() { - return this.stage; + public AssetProvisioningState provisioningState() { + return this.provisioningState; } /** - * Set the stage property: Specifies the asset stage. + * Get the specification property: Specifies the feature spec details. * - * @param stage the stage value to set. - * @return the FeaturesetVersionProperties object itself. + * @return the specification value. */ - public FeaturesetVersionProperties withStage(String stage) { - this.stage = stage; - return this; + public FeaturesetSpecification specification() { + return this.specification; } /** - * Get the entities property: Specifies list of entities. + * Set the specification property: Specifies the feature spec details. * - * @return the entities value. + * @param specification the specification value to set. + * @return the FeaturesetVersionProperties object itself. */ - public List entities() { - return this.entities; + public FeaturesetVersionProperties withSpecification(FeaturesetSpecification specification) { + this.specification = specification; + return this; } /** - * Set the entities property: Specifies list of entities. + * Get the stage property: Specifies the asset stage. * - * @param entities the entities value to set. - * @return the FeaturesetVersionProperties object itself. + * @return the stage value. */ - public FeaturesetVersionProperties withEntities(List entities) { - this.entities = entities; - return this; + public String stage() { + return this.stage; } /** - * Get the provisioningState property: Provisioning state for the featureset version container. + * Set the stage property: Specifies the asset stage. * - * @return the provisioningState value. + * @param stage the stage value to set. + * @return the FeaturesetVersionProperties object itself. */ - public AssetProvisioningState provisioningState() { - return this.provisioningState; + public FeaturesetVersionProperties withStage(String stage) { + this.stage = stage; + return this; } /** * {@inheritDoc} */ @Override - public FeaturesetVersionProperties withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); + public FeaturesetVersionProperties withIsAnonymous(Boolean isAnonymous) { + super.withIsAnonymous(isAnonymous); return this; } @@ -150,8 +150,8 @@ public FeaturesetVersionProperties withIsArchived(Boolean isArchived) { * {@inheritDoc} */ @Override - public FeaturesetVersionProperties withIsAnonymous(Boolean isAnonymous) { - super.withIsAnonymous(isAnonymous); + public FeaturesetVersionProperties withIsArchived(Boolean isArchived) { + super.withIsArchived(isArchived); return this; } @@ -168,8 +168,8 @@ public FeaturesetVersionProperties withDescription(String description) { * {@inheritDoc} */ @Override - public FeaturesetVersionProperties withTags(Map tags) { - super.withTags(tags); + public FeaturesetVersionProperties withProperties(Map properties) { + super.withProperties(properties); return this; } @@ -177,8 +177,8 @@ public FeaturesetVersionProperties withTags(Map tags) { * {@inheritDoc} */ @Override - public FeaturesetVersionProperties withProperties(Map properties) { - super.withProperties(properties); + public FeaturesetVersionProperties withTags(Map tags) { + super.withTags(tags); return this; } @@ -189,13 +189,12 @@ public FeaturesetVersionProperties withProperties(Map properties */ @Override public void validate() { - super.validate(); - if (specification() != null) { - specification().validate(); - } if (materializationSettings() != null) { materializationSettings().validate(); } + if (specification() != null) { + specification().validate(); + } } /** @@ -205,14 +204,14 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", isArchived()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isAnonymous", isAnonymous()); - jsonWriter.writeJsonField("specification", this.specification); + jsonWriter.writeBooleanField("isArchived", isArchived()); + jsonWriter.writeArrayField("entities", this.entities, (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("materializationSettings", this.materializationSettings); + jsonWriter.writeJsonField("specification", this.specification); jsonWriter.writeStringField("stage", this.stage); - jsonWriter.writeArrayField("entities", this.entities, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -233,29 +232,29 @@ public static FeaturesetVersionProperties fromJson(JsonReader jsonReader) throws if ("description".equals(fieldName)) { deserializedFeaturesetVersionProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedFeaturesetVersionProperties.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedFeaturesetVersionProperties.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedFeaturesetVersionProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedFeaturesetVersionProperties.withTags(tags); } else if ("isAnonymous".equals(fieldName)) { deserializedFeaturesetVersionProperties.withIsAnonymous(reader.getNullable(JsonReader::getBoolean)); - } else if ("specification".equals(fieldName)) { - deserializedFeaturesetVersionProperties.specification = FeaturesetSpecification.fromJson(reader); - } else if ("materializationSettings".equals(fieldName)) { - deserializedFeaturesetVersionProperties.materializationSettings - = MaterializationSettings.fromJson(reader); - } else if ("stage".equals(fieldName)) { - deserializedFeaturesetVersionProperties.stage = reader.getString(); + } else if ("isArchived".equals(fieldName)) { + deserializedFeaturesetVersionProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("entities".equals(fieldName)) { List entities = reader.readArray(reader1 -> reader1.getString()); deserializedFeaturesetVersionProperties.entities = entities; + } else if ("materializationSettings".equals(fieldName)) { + deserializedFeaturesetVersionProperties.materializationSettings + = MaterializationSettings.fromJson(reader); } else if ("provisioningState".equals(fieldName)) { deserializedFeaturesetVersionProperties.provisioningState = AssetProvisioningState.fromString(reader.getString()); + } else if ("specification".equals(fieldName)) { + deserializedFeaturesetVersionProperties.specification = FeaturesetSpecification.fromJson(reader); + } else if ("stage".equals(fieldName)) { + deserializedFeaturesetVersionProperties.stage = reader.getString(); } else { reader.skipChildren(); } 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 index bdbaf96053325..7f808b563d413 100644 --- 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 @@ -20,14 +20,14 @@ public final class FeaturesetVersionResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type FeaturesetVersion. + * The link to the next page of FeaturesetVersion objects. If null, there are no additional pages. */ - private List value; + private String nextLink; /* - * The link to the next page of FeaturesetVersion objects. If null, there are no additional pages. + * An array of objects of type FeaturesetVersion. */ - private String nextLink; + private List value; /** * Creates an instance of FeaturesetVersionResourceArmPaginatedResult class. @@ -36,44 +36,44 @@ public FeaturesetVersionResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type FeaturesetVersion. + * Get the nextLink property: The link to the next page of FeaturesetVersion objects. If null, there are no + * additional pages. * - * @return the value value. + * @return the nextLink value. */ - public List value() { - return this.value; + public String nextLink() { + return this.nextLink; } /** - * Set the value property: An array of objects of type FeaturesetVersion. + * Set the nextLink property: The link to the next page of FeaturesetVersion objects. If null, there are no + * additional pages. * - * @param value the value value to set. + * @param nextLink the nextLink value to set. * @return the FeaturesetVersionResourceArmPaginatedResult object itself. */ - public FeaturesetVersionResourceArmPaginatedResult withValue(List value) { - this.value = value; + public FeaturesetVersionResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; return this; } /** - * Get the nextLink property: The link to the next page of FeaturesetVersion objects. If null, there are no - * additional pages. + * Get the value property: An array of objects of type FeaturesetVersion. * - * @return the nextLink value. + * @return the value value. */ - public String nextLink() { - return this.nextLink; + public List value() { + return this.value; } /** - * Set the nextLink property: The link to the next page of FeaturesetVersion objects. If null, there are no - * additional pages. + * Set the value property: An array of objects of type FeaturesetVersion. * - * @param nextLink the nextLink value to set. + * @param value the value value to set. * @return the FeaturesetVersionResourceArmPaginatedResult object itself. */ - public FeaturesetVersionResourceArmPaginatedResult withNextLink(String nextLink) { - this.nextLink = nextLink; + public FeaturesetVersionResourceArmPaginatedResult withValue(List value) { + this.value = value; return this; } @@ -94,8 +94,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -115,12 +115,12 @@ public static FeaturesetVersionResourceArmPaginatedResult fromJson(JsonReader js String fieldName = reader.getFieldName(); reader.nextToken(); - if ("value".equals(fieldName)) { + if ("nextLink".equals(fieldName)) { + deserializedFeaturesetVersionResourceArmPaginatedResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> FeaturesetVersionInner.fromJson(reader1)); deserializedFeaturesetVersionResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedFeaturesetVersionResourceArmPaginatedResult.nextLink = reader.getString(); } else { reader.skipChildren(); } 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 index b4a3af6e1dfc6..9a277b9c746cb 100644 --- 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 @@ -22,14 +22,14 @@ public final class FeaturestoreEntityContainerProperties extends AssetContainer private AssetProvisioningState provisioningState; /* - * The latest version inside this container. + * The next auto incremental version */ - private String latestVersion; + private String nextVersion; /* - * The next auto incremental version + * The latest version inside this container. */ - private String nextVersion; + private String latestVersion; /** * Creates an instance of FeaturestoreEntityContainerProperties class. @@ -47,23 +47,23 @@ public AssetProvisioningState provisioningState() { } /** - * Get the latestVersion property: The latest version inside this container. + * Get the nextVersion property: The next auto incremental version. * - * @return the latestVersion value. + * @return the nextVersion value. */ @Override - public String latestVersion() { - return this.latestVersion; + public String nextVersion() { + return this.nextVersion; } /** - * Get the nextVersion property: The next auto incremental version. + * Get the latestVersion property: The latest version inside this container. * - * @return the nextVersion value. + * @return the latestVersion value. */ @Override - public String nextVersion() { - return this.nextVersion; + public String latestVersion() { + return this.latestVersion; } /** @@ -88,8 +88,8 @@ public FeaturestoreEntityContainerProperties withDescription(String description) * {@inheritDoc} */ @Override - public FeaturestoreEntityContainerProperties withTags(Map tags) { - super.withTags(tags); + public FeaturestoreEntityContainerProperties withProperties(Map properties) { + super.withProperties(properties); return this; } @@ -97,8 +97,8 @@ public FeaturestoreEntityContainerProperties withTags(Map tags) * {@inheritDoc} */ @Override - public FeaturestoreEntityContainerProperties withProperties(Map properties) { - super.withProperties(properties); + public FeaturestoreEntityContainerProperties withTags(Map tags) { + super.withTags(tags); return this; } @@ -109,7 +109,6 @@ public FeaturestoreEntityContainerProperties withProperties(Map */ @Override public void validate() { - super.validate(); } /** @@ -119,8 +118,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isArchived", isArchived()); return jsonWriter.writeEndObject(); } @@ -143,12 +142,12 @@ public static FeaturestoreEntityContainerProperties fromJson(JsonReader jsonRead if ("description".equals(fieldName)) { deserializedFeaturestoreEntityContainerProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedFeaturestoreEntityContainerProperties.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedFeaturestoreEntityContainerProperties.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedFeaturestoreEntityContainerProperties.withTags(tags); } else if ("isArchived".equals(fieldName)) { deserializedFeaturestoreEntityContainerProperties .withIsArchived(reader.getNullable(JsonReader::getBoolean)); 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 index 8f121b32e6b67..b5c4f068fbef6 100644 --- 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 @@ -20,14 +20,14 @@ public final class FeaturestoreEntityContainerResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type FeaturestoreEntityContainer. + * The link to the next page of FeaturestoreEntityContainer objects. If null, there are no additional pages. */ - private List value; + private String nextLink; /* - * The link to the next page of FeaturestoreEntityContainer objects. If null, there are no additional pages. + * An array of objects of type FeaturestoreEntityContainer. */ - private String nextLink; + private List value; /** * Creates an instance of FeaturestoreEntityContainerResourceArmPaginatedResult class. @@ -36,45 +36,45 @@ public FeaturestoreEntityContainerResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type FeaturestoreEntityContainer. + * Get the nextLink property: The link to the next page of FeaturestoreEntityContainer objects. If null, there are + * no additional pages. * - * @return the value value. + * @return the nextLink value. */ - public List value() { - return this.value; + public String nextLink() { + return this.nextLink; } /** - * Set the value property: An array of objects of type FeaturestoreEntityContainer. + * Set the nextLink property: The link to the next page of FeaturestoreEntityContainer objects. If null, there are + * no additional pages. * - * @param value the value value to set. + * @param nextLink the nextLink value to set. * @return the FeaturestoreEntityContainerResourceArmPaginatedResult object itself. */ - public FeaturestoreEntityContainerResourceArmPaginatedResult - withValue(List value) { - this.value = value; + public FeaturestoreEntityContainerResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; return this; } /** - * Get the nextLink property: The link to the next page of FeaturestoreEntityContainer objects. If null, there are - * no additional pages. + * Get the value property: An array of objects of type FeaturestoreEntityContainer. * - * @return the nextLink value. + * @return the value value. */ - public String nextLink() { - return this.nextLink; + public List value() { + return this.value; } /** - * Set the nextLink property: The link to the next page of FeaturestoreEntityContainer objects. If null, there are - * no additional pages. + * Set the value property: An array of objects of type FeaturestoreEntityContainer. * - * @param nextLink the nextLink value to set. + * @param value the value value to set. * @return the FeaturestoreEntityContainerResourceArmPaginatedResult object itself. */ - public FeaturestoreEntityContainerResourceArmPaginatedResult withNextLink(String nextLink) { - this.nextLink = nextLink; + public FeaturestoreEntityContainerResourceArmPaginatedResult + withValue(List value) { + this.value = value; return this; } @@ -95,8 +95,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -117,12 +117,12 @@ public static FeaturestoreEntityContainerResourceArmPaginatedResult fromJson(Jso String fieldName = reader.getFieldName(); reader.nextToken(); - if ("value".equals(fieldName)) { + if ("nextLink".equals(fieldName)) { + deserializedFeaturestoreEntityContainerResourceArmPaginatedResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> FeaturestoreEntityContainerInner.fromJson(reader1)); deserializedFeaturestoreEntityContainerResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedFeaturestoreEntityContainerResourceArmPaginatedResult.nextLink = reader.getString(); } else { reader.skipChildren(); } 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 index 95ca53688b24c..ad878ac2bc651 100644 --- 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 @@ -23,14 +23,14 @@ public final class FeaturestoreEntityVersionProperties extends AssetBase { private List indexColumns; /* - * Specifies the asset stage + * Provisioning state for the featurestore entity version. */ - private String stage; + private AssetProvisioningState provisioningState; /* - * Provisioning state for the featurestore entity version. + * Specifies the asset stage */ - private AssetProvisioningState provisioningState; + private String stage; /** * Creates an instance of FeaturestoreEntityVersionProperties class. @@ -58,6 +58,15 @@ public FeaturestoreEntityVersionProperties withIndexColumns(List in 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. * @@ -78,21 +87,12 @@ public FeaturestoreEntityVersionProperties withStage(String stage) { return this; } - /** - * Get the provisioningState property: Provisioning state for the featurestore entity version. - * - * @return the provisioningState value. - */ - public AssetProvisioningState provisioningState() { - return this.provisioningState; - } - /** * {@inheritDoc} */ @Override - public FeaturestoreEntityVersionProperties withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); + public FeaturestoreEntityVersionProperties withIsAnonymous(Boolean isAnonymous) { + super.withIsAnonymous(isAnonymous); return this; } @@ -100,8 +100,8 @@ public FeaturestoreEntityVersionProperties withIsArchived(Boolean isArchived) { * {@inheritDoc} */ @Override - public FeaturestoreEntityVersionProperties withIsAnonymous(Boolean isAnonymous) { - super.withIsAnonymous(isAnonymous); + public FeaturestoreEntityVersionProperties withIsArchived(Boolean isArchived) { + super.withIsArchived(isArchived); return this; } @@ -118,8 +118,8 @@ public FeaturestoreEntityVersionProperties withDescription(String description) { * {@inheritDoc} */ @Override - public FeaturestoreEntityVersionProperties withTags(Map tags) { - super.withTags(tags); + public FeaturestoreEntityVersionProperties withProperties(Map properties) { + super.withProperties(properties); return this; } @@ -127,8 +127,8 @@ public FeaturestoreEntityVersionProperties withTags(Map tags) { * {@inheritDoc} */ @Override - public FeaturestoreEntityVersionProperties withProperties(Map properties) { - super.withProperties(properties); + public FeaturestoreEntityVersionProperties withTags(Map tags) { + super.withTags(tags); return this; } @@ -139,7 +139,6 @@ public FeaturestoreEntityVersionProperties withProperties(Map pr */ @Override public void validate() { - super.validate(); if (indexColumns() != null) { indexColumns().forEach(e -> e.validate()); } @@ -152,10 +151,10 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", isArchived()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isAnonymous", isAnonymous()); + jsonWriter.writeBooleanField("isArchived", isArchived()); jsonWriter.writeArrayField("indexColumns", this.indexColumns, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("stage", this.stage); return jsonWriter.writeEndObject(); @@ -179,26 +178,26 @@ public static FeaturestoreEntityVersionProperties fromJson(JsonReader jsonReader if ("description".equals(fieldName)) { deserializedFeaturestoreEntityVersionProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedFeaturestoreEntityVersionProperties.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedFeaturestoreEntityVersionProperties.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedFeaturestoreEntityVersionProperties - .withIsArchived(reader.getNullable(JsonReader::getBoolean)); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedFeaturestoreEntityVersionProperties.withTags(tags); } else if ("isAnonymous".equals(fieldName)) { deserializedFeaturestoreEntityVersionProperties .withIsAnonymous(reader.getNullable(JsonReader::getBoolean)); + } else if ("isArchived".equals(fieldName)) { + deserializedFeaturestoreEntityVersionProperties + .withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("indexColumns".equals(fieldName)) { List indexColumns = reader.readArray(reader1 -> IndexColumn.fromJson(reader1)); deserializedFeaturestoreEntityVersionProperties.indexColumns = indexColumns; - } else if ("stage".equals(fieldName)) { - deserializedFeaturestoreEntityVersionProperties.stage = reader.getString(); } else if ("provisioningState".equals(fieldName)) { deserializedFeaturestoreEntityVersionProperties.provisioningState = AssetProvisioningState.fromString(reader.getString()); + } else if ("stage".equals(fieldName)) { + deserializedFeaturestoreEntityVersionProperties.stage = reader.getString(); } else { reader.skipChildren(); } 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 index 4508e8c424b24..1346ed89fc27d 100644 --- 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 @@ -20,14 +20,14 @@ public final class FeaturestoreEntityVersionResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type FeaturestoreEntityVersion. + * The link to the next page of FeaturestoreEntityVersion objects. If null, there are no additional pages. */ - private List value; + private String nextLink; /* - * The link to the next page of FeaturestoreEntityVersion objects. If null, there are no additional pages. + * An array of objects of type FeaturestoreEntityVersion. */ - private String nextLink; + private List value; /** * Creates an instance of FeaturestoreEntityVersionResourceArmPaginatedResult class. @@ -36,44 +36,44 @@ public FeaturestoreEntityVersionResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type FeaturestoreEntityVersion. + * Get the nextLink property: The link to the next page of FeaturestoreEntityVersion objects. If null, there are no + * additional pages. * - * @return the value value. + * @return the nextLink value. */ - public List value() { - return this.value; + public String nextLink() { + return this.nextLink; } /** - * Set the value property: An array of objects of type FeaturestoreEntityVersion. + * Set the nextLink property: The link to the next page of FeaturestoreEntityVersion objects. If null, there are no + * additional pages. * - * @param value the value value to set. + * @param nextLink the nextLink value to set. * @return the FeaturestoreEntityVersionResourceArmPaginatedResult object itself. */ - public FeaturestoreEntityVersionResourceArmPaginatedResult withValue(List value) { - this.value = value; + public FeaturestoreEntityVersionResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; return this; } /** - * Get the nextLink property: The link to the next page of FeaturestoreEntityVersion objects. If null, there are no - * additional pages. + * Get the value property: An array of objects of type FeaturestoreEntityVersion. * - * @return the nextLink value. + * @return the value value. */ - public String nextLink() { - return this.nextLink; + public List value() { + return this.value; } /** - * Set the nextLink property: The link to the next page of FeaturestoreEntityVersion objects. If null, there are no - * additional pages. + * Set the value property: An array of objects of type FeaturestoreEntityVersion. * - * @param nextLink the nextLink value to set. + * @param value the value value to set. * @return the FeaturestoreEntityVersionResourceArmPaginatedResult object itself. */ - public FeaturestoreEntityVersionResourceArmPaginatedResult withNextLink(String nextLink) { - this.nextLink = nextLink; + public FeaturestoreEntityVersionResourceArmPaginatedResult withValue(List value) { + this.value = value; return this; } @@ -94,8 +94,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -116,12 +116,12 @@ public static FeaturestoreEntityVersionResourceArmPaginatedResult fromJson(JsonR String fieldName = reader.getFieldName(); reader.nextToken(); - if ("value".equals(fieldName)) { + if ("nextLink".equals(fieldName)) { + deserializedFeaturestoreEntityVersionResourceArmPaginatedResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> FeaturestoreEntityVersionInner.fromJson(reader1)); deserializedFeaturestoreEntityVersionResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedFeaturestoreEntityVersionResourceArmPaginatedResult.nextLink = reader.getString(); } else { reader.skipChildren(); } 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..d52c7ebf1787a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FineTuningJob.java @@ -0,0 +1,386 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * FineTuning Job definition. + */ +@Fluent +public final class FineTuningJob extends JobBaseProperties { + /* + * [Required] Specifies the type of job. + */ + private JobType jobType = JobType.FINE_TUNING; + + /* + * [Required] + */ + private FineTuningVertical fineTuningDetails; + + /* + * [Required] + */ + private Map outputs; + + /* + * Queue settings for the job + */ + private QueueSettings queueSettings; + + /* + * Instance types and other resources for the job + */ + private JobResources resources; + + /** + * Creates an instance of FineTuningJob class. + */ + public FineTuningJob() { + } + + /** + * Get the jobType property: [Required] Specifies the type of job. + * + * @return the jobType value. + */ + @Override + public JobType jobType() { + return this.jobType; + } + + /** + * 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; + } + + /** + * 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 FineTuningJob object itself. + */ + public FineTuningJob withQueueSettings(QueueSettings queueSettings) { + this.queueSettings = queueSettings; + return this; + } + + /** + * Get the resources property: Instance types and other resources for the job. + * + * @return the resources value. + */ + public JobResources resources() { + return this.resources; + } + + /** + * Set the resources property: Instance types and other resources for the job. + * + * @param resources the resources value to set. + * @return the FineTuningJob object itself. + */ + public FineTuningJob withResources(JobResources resources) { + this.resources = resources; + 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 withParentJobName(String parentJobName) { + super.withParentJobName(parentJobName); + 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() { + if (fineTuningDetails() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property fineTuningDetails in model FineTuningJob")); + } else { + fineTuningDetails().validate(); + } + if (outputs() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property outputs in model FineTuningJob")); + } else { + outputs().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); + } + if (queueSettings() != null) { + queueSettings().validate(); + } + if (resources() != null) { + resources().validate(); + } + if (identity() != null) { + identity().validate(); + } + if (notificationSetting() != null) { + notificationSetting().validate(); + } + if (services() != null) { + services().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FineTuningJob.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("description", description()); + jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("componentId", componentId()); + jsonWriter.writeStringField("computeId", computeId()); + jsonWriter.writeStringField("displayName", displayName()); + jsonWriter.writeStringField("experimentName", experimentName()); + jsonWriter.writeJsonField("identity", identity()); + jsonWriter.writeBooleanField("isArchived", isArchived()); + jsonWriter.writeJsonField("notificationSetting", notificationSetting()); + jsonWriter.writeStringField("parentJobName", parentJobName()); + jsonWriter.writeMapField("services", services(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("fineTuningDetails", this.fineTuningDetails); + jsonWriter.writeMapField("outputs", this.outputs, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); + jsonWriter.writeJsonField("queueSettings", this.queueSettings); + jsonWriter.writeJsonField("resources", this.resources); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FineTuningJob from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FineTuningJob if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the FineTuningJob. + */ + public static FineTuningJob fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FineTuningJob deserializedFineTuningJob = new FineTuningJob(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("description".equals(fieldName)) { + deserializedFineTuningJob.withDescription(reader.getString()); + } else if ("properties".equals(fieldName)) { + Map properties = reader.readMap(reader1 -> reader1.getString()); + deserializedFineTuningJob.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedFineTuningJob.withTags(tags); + } else if ("componentId".equals(fieldName)) { + deserializedFineTuningJob.withComponentId(reader.getString()); + } else if ("computeId".equals(fieldName)) { + deserializedFineTuningJob.withComputeId(reader.getString()); + } else if ("displayName".equals(fieldName)) { + deserializedFineTuningJob.withDisplayName(reader.getString()); + } else if ("experimentName".equals(fieldName)) { + deserializedFineTuningJob.withExperimentName(reader.getString()); + } else if ("identity".equals(fieldName)) { + deserializedFineTuningJob.withIdentity(IdentityConfiguration.fromJson(reader)); + } else if ("isArchived".equals(fieldName)) { + deserializedFineTuningJob.withIsArchived(reader.getNullable(JsonReader::getBoolean)); + } else if ("notificationSetting".equals(fieldName)) { + deserializedFineTuningJob.withNotificationSetting(NotificationSetting.fromJson(reader)); + } else if ("parentJobName".equals(fieldName)) { + deserializedFineTuningJob.withParentJobName(reader.getString()); + } else if ("services".equals(fieldName)) { + Map services = reader.readMap(reader1 -> JobService.fromJson(reader1)); + deserializedFineTuningJob.withServices(services); + } else if ("status".equals(fieldName)) { + deserializedFineTuningJob.withStatus(JobStatus.fromString(reader.getString())); + } else if ("fineTuningDetails".equals(fieldName)) { + deserializedFineTuningJob.fineTuningDetails = FineTuningVertical.fromJson(reader); + } else if ("outputs".equals(fieldName)) { + Map outputs = reader.readMap(reader1 -> JobOutput.fromJson(reader1)); + deserializedFineTuningJob.outputs = outputs; + } else if ("jobType".equals(fieldName)) { + deserializedFineTuningJob.jobType = JobType.fromString(reader.getString()); + } else if ("queueSettings".equals(fieldName)) { + deserializedFineTuningJob.queueSettings = QueueSettings.fromJson(reader); + } else if ("resources".equals(fieldName)) { + deserializedFineTuningJob.resources = JobResources.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedFineTuningJob; + }); + } +} 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..f85ce1cdd1030 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FineTuningTaskType.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +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. + */ + 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..fedee9aad6d46 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FineTuningVertical.java @@ -0,0 +1,245 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the 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.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The FineTuningVertical model. + */ +@Fluent +public class FineTuningVertical implements JsonSerializable { + /* + * [Required] Enum to determine the type of fine tuning. + */ + private ModelProvider modelProvider = ModelProvider.fromString("FineTuningVertical"); + + /* + * [Required] Input model for fine tuning. + */ + private JobInput model; + + /* + * [Required] Fine tuning task type. + */ + private FineTuningTaskType taskType; + + /* + * [Required] Training data for fine tuning. + */ + private JobInput trainingData; + + /* + * Validation data for fine tuning. + */ + private JobInput validationData; + + /** + * Creates an instance of FineTuningVertical class. + */ + public FineTuningVertical() { + } + + /** + * Get the modelProvider property: [Required] Enum to determine the type of fine tuning. + * + * @return the modelProvider value. + */ + public ModelProvider modelProvider() { + return this.modelProvider; + } + + /** + * Get the model property: [Required] Input model for fine tuning. + * + * @return the model value. + */ + public JobInput 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(JobInput 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.atError() + .log(new IllegalArgumentException("Missing required property model in model FineTuningVertical")); + } else { + model().validate(); + } + if (taskType() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property taskType in model FineTuningVertical")); + } + if (trainingData() == null) { + throw LOGGER.atError() + .log( + 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); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("model", this.model); + jsonWriter.writeStringField("taskType", this.taskType == null ? null : this.taskType.toString()); + jsonWriter.writeJsonField("trainingData", this.trainingData); + jsonWriter.writeStringField("modelProvider", this.modelProvider == null ? null : this.modelProvider.toString()); + jsonWriter.writeJsonField("validationData", this.validationData); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FineTuningVertical from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FineTuningVertical if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the FineTuningVertical. + */ + public static FineTuningVertical fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("modelProvider".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("AzureOpenAI".equals(discriminatorValue)) { + return AzureOpenAiFineTuning.fromJson(readerToUse.reset()); + } else if ("Custom".equals(discriminatorValue)) { + return CustomModelFineTuning.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + static FineTuningVertical fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FineTuningVertical deserializedFineTuningVertical = new FineTuningVertical(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("model".equals(fieldName)) { + deserializedFineTuningVertical.model = JobInput.fromJson(reader); + } else if ("taskType".equals(fieldName)) { + deserializedFineTuningVertical.taskType = FineTuningTaskType.fromString(reader.getString()); + } else if ("trainingData".equals(fieldName)) { + deserializedFineTuningVertical.trainingData = JobInput.fromJson(reader); + } else if ("modelProvider".equals(fieldName)) { + deserializedFineTuningVertical.modelProvider = ModelProvider.fromString(reader.getString()); + } else if ("validationData".equals(fieldName)) { + deserializedFineTuningVertical.validationData = JobInput.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedFineTuningVertical; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FirewallSku.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FirewallSku.java new file mode 100644 index 0000000000000..ab5727715c25c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FirewallSku.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Firewall Sku used for FQDN Rules. + */ +public final class FirewallSku extends ExpandableStringEnum { + /** + * Static value Standard for FirewallSku. + */ + public static final FirewallSku STANDARD = fromString("Standard"); + + /** + * Static value Basic for FirewallSku. + */ + public static final FirewallSku BASIC = fromString("Basic"); + + /** + * Creates a new instance of FirewallSku value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public FirewallSku() { + } + + /** + * Creates or finds a FirewallSku from its string representation. + * + * @param name a name to look for. + * @return the corresponding FirewallSku. + */ + public static FirewallSku fromString(String name) { + return fromString(name, FirewallSku.class); + } + + /** + * Gets known FirewallSku values. + * + * @return known FirewallSku values. + */ + public static Collection values() { + return values(FirewallSku.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 index a15fec20a97e8..50c94bbcd2985 100644 --- 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 @@ -5,6 +5,7 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -41,8 +42,8 @@ public MonitoringInputDataType inputDataType() { * {@inheritDoc} */ @Override - public FixedInputData withDataContext(String dataContext) { - super.withDataContext(dataContext); + public FixedInputData withColumns(Map columns) { + super.withColumns(columns); return this; } @@ -50,8 +51,8 @@ public FixedInputData withDataContext(String dataContext) { * {@inheritDoc} */ @Override - public FixedInputData withJobInputType(JobInputType jobInputType) { - super.withJobInputType(jobInputType); + public FixedInputData withDataContext(String dataContext) { + super.withDataContext(dataContext); return this; } @@ -59,8 +60,8 @@ public FixedInputData withJobInputType(JobInputType jobInputType) { * {@inheritDoc} */ @Override - public FixedInputData withUri(String uri) { - super.withUri(uri); + public FixedInputData withJobInputType(JobInputType jobInputType) { + super.withJobInputType(jobInputType); return this; } @@ -68,8 +69,8 @@ public FixedInputData withUri(String uri) { * {@inheritDoc} */ @Override - public FixedInputData withColumns(Map columns) { - super.withColumns(columns); + public FixedInputData withUri(String uri) { + super.withUri(uri); return this; } @@ -80,9 +81,18 @@ public FixedInputData withColumns(Map columns) { */ @Override public void validate() { - super.validate(); + if (jobInputType() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property jobInputType in model FixedInputData")); + } + if (uri() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property uri in model FixedInputData")); + } } + private static final ClientLogger LOGGER = new ClientLogger(FixedInputData.class); + /** * {@inheritDoc} */ @@ -91,8 +101,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("jobInputType", jobInputType() == null ? null : jobInputType().toString()); jsonWriter.writeStringField("uri", uri()); - jsonWriter.writeStringField("dataContext", dataContext()); jsonWriter.writeMapField("columns", columns(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("dataContext", dataContext()); jsonWriter.writeStringField("inputDataType", this.inputDataType == null ? null : this.inputDataType.toString()); return jsonWriter.writeEndObject(); } @@ -117,11 +127,11 @@ public static FixedInputData fromJson(JsonReader jsonReader) throws IOException deserializedFixedInputData.withJobInputType(JobInputType.fromString(reader.getString())); } else if ("uri".equals(fieldName)) { deserializedFixedInputData.withUri(reader.getString()); - } else if ("dataContext".equals(fieldName)) { - deserializedFixedInputData.withDataContext(reader.getString()); } else if ("columns".equals(fieldName)) { Map columns = reader.readMap(reader1 -> reader1.getString()); deserializedFixedInputData.withColumns(columns); + } else if ("dataContext".equals(fieldName)) { + deserializedFixedInputData.withDataContext(reader.getString()); } else if ("inputDataType".equals(fieldName)) { deserializedFixedInputData.inputDataType = MonitoringInputDataType.fromString(reader.getString()); } else { 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 df9177f376325..8b91500a38c5e 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 @@ -5,6 +5,7 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -22,20 +23,30 @@ public final class Forecasting extends AutoMLVertical { private TaskType taskType = TaskType.FORECASTING; /* - * Primary metric for forecasting task. + * Forecasting task specific inputs. */ - private ForecastingPrimaryMetrics primaryMetric; + private ForecastingSettings forecastingSettings; /* - * Forecasting task specific inputs. + * Primary metric for forecasting task. */ - private ForecastingSettings forecastingSettings; + private ForecastingPrimaryMetrics primaryMetric; /* * Inputs for training phase for an AutoML Job. */ private ForecastingTrainingSettings trainingSettings; + /* + * Columns to use for CVSplit data. + */ + private List cvSplitColumnNames; + + /* + * Featurization inputs needed for AutoML job. + */ + private TableVerticalFeaturizationSettings featurizationSettings; + /* * Execution constraints for AutoMLJob. */ @@ -48,26 +59,22 @@ public final class Forecasting extends AutoMLVertical { private NCrossValidations nCrossValidations; /* - * Columns to use for CVSplit data. + * Test data input. */ - private List cvSplitColumnNames; + private MLTableJobInput testData; /* - * 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. + * 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. */ - private String weightColumnName; + private Double testDataSize; /* * Validation data inputs. */ private MLTableJobInput validationData; - /* - * Test data input. - */ - private MLTableJobInput testData; - /* * The fraction of training dataset that needs to be set aside for validation purpose. * Values between (0.0 , 1.0) @@ -76,16 +83,10 @@ public final class Forecasting extends AutoMLVertical { private Double validationDataSize; /* - * 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. - */ - private Double testDataSize; - - /* - * Featurization inputs needed for AutoML job. + * 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. */ - private TableVerticalFeaturizationSettings featurizationSettings; + private String weightColumnName; /** * Creates an instance of Forecasting class. @@ -104,42 +105,42 @@ public TaskType taskType() { } /** - * Get the primaryMetric property: Primary metric for forecasting task. + * Get the forecastingSettings property: Forecasting task specific inputs. * - * @return the primaryMetric value. + * @return the forecastingSettings value. */ - public ForecastingPrimaryMetrics primaryMetric() { - return this.primaryMetric; + public ForecastingSettings forecastingSettings() { + return this.forecastingSettings; } /** - * Set the primaryMetric property: Primary metric for forecasting task. + * Set the forecastingSettings property: Forecasting task specific inputs. * - * @param primaryMetric the primaryMetric value to set. + * @param forecastingSettings the forecastingSettings value to set. * @return the Forecasting object itself. */ - public Forecasting withPrimaryMetric(ForecastingPrimaryMetrics primaryMetric) { - this.primaryMetric = primaryMetric; + public Forecasting withForecastingSettings(ForecastingSettings forecastingSettings) { + this.forecastingSettings = forecastingSettings; return this; } /** - * Get the forecastingSettings property: Forecasting task specific inputs. + * Get the primaryMetric property: Primary metric for forecasting task. * - * @return the forecastingSettings value. + * @return the primaryMetric value. */ - public ForecastingSettings forecastingSettings() { - return this.forecastingSettings; + public ForecastingPrimaryMetrics primaryMetric() { + return this.primaryMetric; } /** - * Set the forecastingSettings property: Forecasting task specific inputs. + * Set the primaryMetric property: Primary metric for forecasting task. * - * @param forecastingSettings the forecastingSettings value to set. + * @param primaryMetric the primaryMetric value to set. * @return the Forecasting object itself. */ - public Forecasting withForecastingSettings(ForecastingSettings forecastingSettings) { - this.forecastingSettings = forecastingSettings; + public Forecasting withPrimaryMetric(ForecastingPrimaryMetrics primaryMetric) { + this.primaryMetric = primaryMetric; return this; } @@ -163,6 +164,46 @@ public Forecasting withTrainingSettings(ForecastingTrainingSettings trainingSett return this; } + /** + * Get the cvSplitColumnNames property: Columns to use for CVSplit data. + * + * @return the cvSplitColumnNames value. + */ + public List cvSplitColumnNames() { + return this.cvSplitColumnNames; + } + + /** + * Set the cvSplitColumnNames property: Columns to use for CVSplit data. + * + * @param cvSplitColumnNames the cvSplitColumnNames value to set. + * @return the Forecasting object itself. + */ + public Forecasting withCvSplitColumnNames(List cvSplitColumnNames) { + this.cvSplitColumnNames = cvSplitColumnNames; + return this; + } + + /** + * Get the featurizationSettings property: Featurization inputs needed for AutoML job. + * + * @return the featurizationSettings value. + */ + public TableVerticalFeaturizationSettings featurizationSettings() { + return this.featurizationSettings; + } + + /** + * Set the featurizationSettings property: Featurization inputs needed for AutoML job. + * + * @param featurizationSettings the featurizationSettings value to set. + * @return the Forecasting object itself. + */ + public Forecasting withFeaturizationSettings(TableVerticalFeaturizationSettings featurizationSettings) { + this.featurizationSettings = featurizationSettings; + return this; + } + /** * Get the limitSettings property: Execution constraints for AutoMLJob. * @@ -206,44 +247,46 @@ public Forecasting withNCrossValidations(NCrossValidations nCrossValidations) { } /** - * Get the cvSplitColumnNames property: Columns to use for CVSplit data. + * Get the testData property: Test data input. * - * @return the cvSplitColumnNames value. + * @return the testData value. */ - public List cvSplitColumnNames() { - return this.cvSplitColumnNames; + public MLTableJobInput testData() { + return this.testData; } /** - * Set the cvSplitColumnNames property: Columns to use for CVSplit data. + * Set the testData property: Test data input. * - * @param cvSplitColumnNames the cvSplitColumnNames value to set. + * @param testData the testData value to set. * @return the Forecasting object itself. */ - public Forecasting withCvSplitColumnNames(List cvSplitColumnNames) { - this.cvSplitColumnNames = cvSplitColumnNames; + public Forecasting withTestData(MLTableJobInput testData) { + this.testData = testData; return this; } /** - * 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. + * 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. * - * @return the weightColumnName value. + * @return the testDataSize value. */ - public String weightColumnName() { - return this.weightColumnName; + public Double testDataSize() { + return this.testDataSize; } /** - * 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. + * 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. * - * @param weightColumnName the weightColumnName value to set. + * @param testDataSize the testDataSize value to set. * @return the Forecasting object itself. */ - public Forecasting withWeightColumnName(String weightColumnName) { - this.weightColumnName = weightColumnName; + public Forecasting withTestDataSize(Double testDataSize) { + this.testDataSize = testDataSize; return this; } @@ -267,26 +310,6 @@ public Forecasting withValidationData(MLTableJobInput validationData) { return this; } - /** - * Get the testData property: Test data input. - * - * @return the testData value. - */ - public MLTableJobInput testData() { - return this.testData; - } - - /** - * Set the testData property: Test data input. - * - * @param testData the testData value to set. - * @return the Forecasting object itself. - */ - public Forecasting withTestData(MLTableJobInput testData) { - this.testData = testData; - return this; - } - /** * Get the validationDataSize property: The fraction of training dataset that needs to be set aside for validation * purpose. @@ -314,46 +337,24 @@ public Forecasting withValidationDataSize(Double validationDataSize) { } /** - * 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. - * - * @return the testDataSize value. - */ - public Double testDataSize() { - return this.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. - * - * @param testDataSize the testDataSize value to set. - * @return the Forecasting object itself. - */ - public Forecasting withTestDataSize(Double testDataSize) { - this.testDataSize = testDataSize; - return this; - } - - /** - * Get the featurizationSettings property: Featurization inputs needed for AutoML job. + * 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 featurizationSettings value. + * @return the weightColumnName value. */ - public TableVerticalFeaturizationSettings featurizationSettings() { - return this.featurizationSettings; + public String weightColumnName() { + return this.weightColumnName; } /** - * Set the featurizationSettings property: Featurization inputs needed for AutoML job. + * 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 featurizationSettings the featurizationSettings value to set. + * @param weightColumnName the weightColumnName value to set. * @return the Forecasting object itself. */ - public Forecasting withFeaturizationSettings(TableVerticalFeaturizationSettings featurizationSettings) { - this.featurizationSettings = featurizationSettings; + public Forecasting withWeightColumnName(String weightColumnName) { + this.weightColumnName = weightColumnName; return this; } @@ -370,8 +371,8 @@ public Forecasting withLogVerbosity(LogVerbosity logVerbosity) { * {@inheritDoc} */ @Override - public Forecasting withTrainingData(MLTableJobInput trainingData) { - super.withTrainingData(trainingData); + public Forecasting withTargetColumnName(String targetColumnName) { + super.withTargetColumnName(targetColumnName); return this; } @@ -379,8 +380,8 @@ public Forecasting withTrainingData(MLTableJobInput trainingData) { * {@inheritDoc} */ @Override - public Forecasting withTargetColumnName(String targetColumnName) { - super.withTargetColumnName(targetColumnName); + public Forecasting withTrainingData(MLTableJobInput trainingData) { + super.withTrainingData(trainingData); return this; } @@ -391,30 +392,37 @@ public Forecasting withTargetColumnName(String targetColumnName) { */ @Override public void validate() { - super.validate(); if (forecastingSettings() != null) { forecastingSettings().validate(); } if (trainingSettings() != null) { trainingSettings().validate(); } + if (featurizationSettings() != null) { + featurizationSettings().validate(); + } if (limitSettings() != null) { limitSettings().validate(); } if (nCrossValidations() != null) { nCrossValidations().validate(); } - if (validationData() != null) { - validationData().validate(); - } if (testData() != null) { testData().validate(); } - if (featurizationSettings() != null) { - featurizationSettings().validate(); + if (validationData() != null) { + validationData().validate(); + } + if (trainingData() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property trainingData in model Forecasting")); + } else { + trainingData().validate(); } } + private static final ClientLogger LOGGER = new ClientLogger(Forecasting.class); + /** * {@inheritDoc} */ @@ -425,19 +433,19 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("logVerbosity", logVerbosity() == null ? null : logVerbosity().toString()); jsonWriter.writeStringField("targetColumnName", targetColumnName()); jsonWriter.writeStringField("taskType", this.taskType == null ? null : this.taskType.toString()); - jsonWriter.writeStringField("primaryMetric", this.primaryMetric == null ? null : this.primaryMetric.toString()); jsonWriter.writeJsonField("forecastingSettings", this.forecastingSettings); + jsonWriter.writeStringField("primaryMetric", this.primaryMetric == null ? null : this.primaryMetric.toString()); jsonWriter.writeJsonField("trainingSettings", this.trainingSettings); - jsonWriter.writeJsonField("limitSettings", this.limitSettings); - jsonWriter.writeJsonField("nCrossValidations", this.nCrossValidations); jsonWriter.writeArrayField("cvSplitColumnNames", this.cvSplitColumnNames, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("weightColumnName", this.weightColumnName); - jsonWriter.writeJsonField("validationData", this.validationData); + jsonWriter.writeJsonField("featurizationSettings", this.featurizationSettings); + jsonWriter.writeJsonField("limitSettings", this.limitSettings); + jsonWriter.writeJsonField("nCrossValidations", this.nCrossValidations); jsonWriter.writeJsonField("testData", this.testData); - jsonWriter.writeNumberField("validationDataSize", this.validationDataSize); jsonWriter.writeNumberField("testDataSize", this.testDataSize); - jsonWriter.writeJsonField("featurizationSettings", this.featurizationSettings); + jsonWriter.writeJsonField("validationData", this.validationData); + jsonWriter.writeNumberField("validationDataSize", this.validationDataSize); + jsonWriter.writeStringField("weightColumnName", this.weightColumnName); return jsonWriter.writeEndObject(); } @@ -465,31 +473,31 @@ public static Forecasting fromJson(JsonReader jsonReader) throws IOException { deserializedForecasting.withTargetColumnName(reader.getString()); } else if ("taskType".equals(fieldName)) { deserializedForecasting.taskType = TaskType.fromString(reader.getString()); - } else if ("primaryMetric".equals(fieldName)) { - deserializedForecasting.primaryMetric = ForecastingPrimaryMetrics.fromString(reader.getString()); } else if ("forecastingSettings".equals(fieldName)) { deserializedForecasting.forecastingSettings = ForecastingSettings.fromJson(reader); + } else if ("primaryMetric".equals(fieldName)) { + deserializedForecasting.primaryMetric = ForecastingPrimaryMetrics.fromString(reader.getString()); } else if ("trainingSettings".equals(fieldName)) { deserializedForecasting.trainingSettings = ForecastingTrainingSettings.fromJson(reader); + } else if ("cvSplitColumnNames".equals(fieldName)) { + List cvSplitColumnNames = reader.readArray(reader1 -> reader1.getString()); + deserializedForecasting.cvSplitColumnNames = cvSplitColumnNames; + } else if ("featurizationSettings".equals(fieldName)) { + deserializedForecasting.featurizationSettings = TableVerticalFeaturizationSettings.fromJson(reader); } else if ("limitSettings".equals(fieldName)) { deserializedForecasting.limitSettings = TableVerticalLimitSettings.fromJson(reader); } else if ("nCrossValidations".equals(fieldName)) { deserializedForecasting.nCrossValidations = NCrossValidations.fromJson(reader); - } else if ("cvSplitColumnNames".equals(fieldName)) { - List cvSplitColumnNames = reader.readArray(reader1 -> reader1.getString()); - deserializedForecasting.cvSplitColumnNames = cvSplitColumnNames; - } else if ("weightColumnName".equals(fieldName)) { - deserializedForecasting.weightColumnName = reader.getString(); - } else if ("validationData".equals(fieldName)) { - deserializedForecasting.validationData = MLTableJobInput.fromJson(reader); } else if ("testData".equals(fieldName)) { deserializedForecasting.testData = MLTableJobInput.fromJson(reader); - } else if ("validationDataSize".equals(fieldName)) { - deserializedForecasting.validationDataSize = reader.getNullable(JsonReader::getDouble); } else if ("testDataSize".equals(fieldName)) { deserializedForecasting.testDataSize = reader.getNullable(JsonReader::getDouble); - } else if ("featurizationSettings".equals(fieldName)) { - deserializedForecasting.featurizationSettings = TableVerticalFeaturizationSettings.fromJson(reader); + } else if ("validationData".equals(fieldName)) { + deserializedForecasting.validationData = MLTableJobInput.fromJson(reader); + } else if ("validationDataSize".equals(fieldName)) { + deserializedForecasting.validationDataSize = reader.getNullable(JsonReader::getDouble); + } else if ("weightColumnName".equals(fieldName)) { + deserializedForecasting.weightColumnName = reader.getString(); } else { reader.skipChildren(); } 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 f074478e59fc0..78d19ef2521f1 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 @@ -24,44 +24,28 @@ public final class ForecastingSettings implements JsonSerializable timeSeriesIdColumnNames; - /* * 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. */ private String frequency; - /* - * Flag for generating lags for the numeric features with 'auto' or null. - */ - private FeatureLags featureLags; - /* * Set time series seasonality as an integer multiple of the series frequency. * If seasonality is set to 'auto', it will be inferred. @@ -73,11 +57,6 @@ public final class ForecastingSettings implements JsonSerializable timeSeriesIdColumnNames; + + /* + * Configure STL Decomposition of the time-series target column. + */ + private UseStl useStl; /** * Creates an instance of ForecastingSettings class. @@ -121,66 +121,46 @@ public ForecastingSettings withCountryOrRegionForHolidays(String countryOrRegion } /** - * 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() { - return this.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. - */ - public ForecastingSettings withTimeColumnName(String timeColumnName) { - this.timeColumnName = timeColumnName; - return this; - } - - /** - * Get the targetLags property: The number of past periods to lag from the target column. + * 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. * - * @return the targetLags value. + * @return the cvStepSize value. */ - public TargetLags targetLags() { - return this.targetLags; + public Integer cvStepSize() { + return this.cvStepSize; } /** - * Set the targetLags property: The number of past periods to lag from the target column. + * 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. * - * @param targetLags the targetLags value to set. + * @param cvStepSize the cvStepSize value to set. * @return the ForecastingSettings object itself. */ - public ForecastingSettings withTargetLags(TargetLags targetLags) { - this.targetLags = targetLags; + public ForecastingSettings withCvStepSize(Integer cvStepSize) { + this.cvStepSize = cvStepSize; return this; } /** - * Get the targetRollingWindowSize property: The number of past periods used to create a rolling window average of - * the target column. + * Get the featureLags property: Flag for generating lags for the numeric features with 'auto' or null. * - * @return the targetRollingWindowSize value. + * @return the featureLags value. */ - public TargetRollingWindowSize targetRollingWindowSize() { - return this.targetRollingWindowSize; + public FeatureLags featureLags() { + return this.featureLags; } /** - * Set the targetRollingWindowSize property: The number of past periods used to create a rolling window average of - * the target column. + * Set the featureLags property: Flag for generating lags for the numeric features with 'auto' or null. * - * @param targetRollingWindowSize the targetRollingWindowSize value to set. + * @param featureLags the featureLags value to set. * @return the ForecastingSettings object itself. */ - public ForecastingSettings withTargetRollingWindowSize(TargetRollingWindowSize targetRollingWindowSize) { - this.targetRollingWindowSize = targetRollingWindowSize; + public ForecastingSettings withFeatureLags(FeatureLags featureLags) { + this.featureLags = featureLags; return this; } @@ -204,32 +184,6 @@ public ForecastingSettings withForecastHorizon(ForecastHorizon forecastHorizon) return this; } - /** - * 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. - * - * @return the timeSeriesIdColumnNames value. - */ - public List timeSeriesIdColumnNames() { - return this.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. - * - * @param timeSeriesIdColumnNames the timeSeriesIdColumnNames value to set. - * @return the ForecastingSettings object itself. - */ - public ForecastingSettings withTimeSeriesIdColumnNames(List timeSeriesIdColumnNames) { - this.timeSeriesIdColumnNames = timeSeriesIdColumnNames; - return this; - } - /** * 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. @@ -252,26 +206,6 @@ public ForecastingSettings withFrequency(String frequency) { return this; } - /** - * Get the featureLags property: Flag for generating lags for the numeric features with 'auto' or null. - * - * @return the featureLags value. - */ - public FeatureLags featureLags() { - return this.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. - */ - public ForecastingSettings withFeatureLags(FeatureLags featureLags) { - this.featureLags = featureLags; - return this; - } - /** * 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. @@ -315,26 +249,6 @@ public ShortSeriesHandlingConfiguration shortSeriesHandlingConfig() { return this; } - /** - * Get the useStl property: Configure STL Decomposition of the time-series target column. - * - * @return the useStl value. - */ - public UseStl useStl() { - return this.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. - */ - public ForecastingSettings withUseStl(UseStl useStl) { - this.useStl = useStl; - 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. @@ -362,26 +276,112 @@ public ForecastingSettings withTargetAggregateFunction(TargetAggregationFunction } /** - * 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. + * Get the targetLags property: The number of past periods to lag from the target column. * - * @return the cvStepSize value. + * @return the targetLags value. */ - public Integer cvStepSize() { - return this.cvStepSize; + public TargetLags targetLags() { + return this.targetLags; } /** - * 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. + * Set the targetLags property: The number of past periods to lag from the target column. * - * @param cvStepSize the cvStepSize value to set. + * @param targetLags the targetLags value to set. * @return the ForecastingSettings object itself. */ - public ForecastingSettings withCvStepSize(Integer cvStepSize) { - this.cvStepSize = cvStepSize; + public ForecastingSettings withTargetLags(TargetLags targetLags) { + this.targetLags = targetLags; + return this; + } + + /** + * 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() { + return this.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. + */ + public ForecastingSettings withTargetRollingWindowSize(TargetRollingWindowSize targetRollingWindowSize) { + this.targetRollingWindowSize = targetRollingWindowSize; + return this; + } + + /** + * 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() { + return this.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. + */ + public ForecastingSettings withTimeColumnName(String timeColumnName) { + this.timeColumnName = timeColumnName; + return this; + } + + /** + * 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. + * + * @return the timeSeriesIdColumnNames value. + */ + public List timeSeriesIdColumnNames() { + return this.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. + * + * @param timeSeriesIdColumnNames the timeSeriesIdColumnNames value to set. + * @return the ForecastingSettings object itself. + */ + public ForecastingSettings withTimeSeriesIdColumnNames(List timeSeriesIdColumnNames) { + this.timeSeriesIdColumnNames = timeSeriesIdColumnNames; + return this; + } + + /** + * Get the useStl property: Configure STL Decomposition of the time-series target column. + * + * @return the useStl value. + */ + public UseStl useStl() { + return this.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. + */ + public ForecastingSettings withUseStl(UseStl useStl) { + this.useStl = useStl; return this; } @@ -391,18 +391,18 @@ public ForecastingSettings withCvStepSize(Integer cvStepSize) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (targetLags() != null) { - targetLags().validate(); - } - if (targetRollingWindowSize() != null) { - targetRollingWindowSize().validate(); - } if (forecastHorizon() != null) { forecastHorizon().validate(); } if (seasonality() != null) { seasonality().validate(); } + if (targetLags() != null) { + targetLags().validate(); + } + if (targetRollingWindowSize() != null) { + targetRollingWindowSize().validate(); + } } /** @@ -412,21 +412,21 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("countryOrRegionForHolidays", this.countryOrRegionForHolidays); - jsonWriter.writeStringField("timeColumnName", this.timeColumnName); - jsonWriter.writeJsonField("targetLags", this.targetLags); - jsonWriter.writeJsonField("targetRollingWindowSize", this.targetRollingWindowSize); + jsonWriter.writeNumberField("cvStepSize", this.cvStepSize); + jsonWriter.writeStringField("featureLags", this.featureLags == null ? null : this.featureLags.toString()); jsonWriter.writeJsonField("forecastHorizon", this.forecastHorizon); - jsonWriter.writeArrayField("timeSeriesIdColumnNames", this.timeSeriesIdColumnNames, - (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("frequency", this.frequency); - jsonWriter.writeStringField("featureLags", this.featureLags == null ? null : this.featureLags.toString()); jsonWriter.writeJsonField("seasonality", this.seasonality); jsonWriter.writeStringField("shortSeriesHandlingConfig", this.shortSeriesHandlingConfig == null ? null : this.shortSeriesHandlingConfig.toString()); - jsonWriter.writeStringField("useStl", this.useStl == null ? null : this.useStl.toString()); jsonWriter.writeStringField("targetAggregateFunction", this.targetAggregateFunction == null ? null : this.targetAggregateFunction.toString()); - jsonWriter.writeNumberField("cvStepSize", this.cvStepSize); + jsonWriter.writeJsonField("targetLags", this.targetLags); + jsonWriter.writeJsonField("targetRollingWindowSize", this.targetRollingWindowSize); + jsonWriter.writeStringField("timeColumnName", this.timeColumnName); + jsonWriter.writeArrayField("timeSeriesIdColumnNames", this.timeSeriesIdColumnNames, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("useStl", this.useStl == null ? null : this.useStl.toString()); return jsonWriter.writeEndObject(); } @@ -447,33 +447,33 @@ public static ForecastingSettings fromJson(JsonReader jsonReader) throws IOExcep if ("countryOrRegionForHolidays".equals(fieldName)) { deserializedForecastingSettings.countryOrRegionForHolidays = reader.getString(); - } else if ("timeColumnName".equals(fieldName)) { - deserializedForecastingSettings.timeColumnName = reader.getString(); - } else if ("targetLags".equals(fieldName)) { - deserializedForecastingSettings.targetLags = TargetLags.fromJson(reader); - } else if ("targetRollingWindowSize".equals(fieldName)) { - deserializedForecastingSettings.targetRollingWindowSize = TargetRollingWindowSize.fromJson(reader); + } else if ("cvStepSize".equals(fieldName)) { + deserializedForecastingSettings.cvStepSize = reader.getNullable(JsonReader::getInt); + } else if ("featureLags".equals(fieldName)) { + deserializedForecastingSettings.featureLags = FeatureLags.fromString(reader.getString()); } else if ("forecastHorizon".equals(fieldName)) { deserializedForecastingSettings.forecastHorizon = ForecastHorizon.fromJson(reader); - } else if ("timeSeriesIdColumnNames".equals(fieldName)) { - List timeSeriesIdColumnNames = reader.readArray(reader1 -> reader1.getString()); - deserializedForecastingSettings.timeSeriesIdColumnNames = timeSeriesIdColumnNames; } else if ("frequency".equals(fieldName)) { deserializedForecastingSettings.frequency = reader.getString(); - } else if ("featureLags".equals(fieldName)) { - deserializedForecastingSettings.featureLags = FeatureLags.fromString(reader.getString()); } else if ("seasonality".equals(fieldName)) { deserializedForecastingSettings.seasonality = Seasonality.fromJson(reader); } else if ("shortSeriesHandlingConfig".equals(fieldName)) { deserializedForecastingSettings.shortSeriesHandlingConfig = ShortSeriesHandlingConfiguration.fromString(reader.getString()); - } else if ("useStl".equals(fieldName)) { - deserializedForecastingSettings.useStl = UseStl.fromString(reader.getString()); } else if ("targetAggregateFunction".equals(fieldName)) { deserializedForecastingSettings.targetAggregateFunction = TargetAggregationFunction.fromString(reader.getString()); - } else if ("cvStepSize".equals(fieldName)) { - deserializedForecastingSettings.cvStepSize = reader.getNullable(JsonReader::getInt); + } else if ("targetLags".equals(fieldName)) { + deserializedForecastingSettings.targetLags = TargetLags.fromJson(reader); + } else if ("targetRollingWindowSize".equals(fieldName)) { + deserializedForecastingSettings.targetRollingWindowSize = TargetRollingWindowSize.fromJson(reader); + } else if ("timeColumnName".equals(fieldName)) { + deserializedForecastingSettings.timeColumnName = reader.getString(); + } else if ("timeSeriesIdColumnNames".equals(fieldName)) { + List timeSeriesIdColumnNames = reader.readArray(reader1 -> reader1.getString()); + deserializedForecastingSettings.timeSeriesIdColumnNames = timeSeriesIdColumnNames; + } else if ("useStl".equals(fieldName)) { + deserializedForecastingSettings.useStl = UseStl.fromString(reader.getString()); } else { reader.skipChildren(); } 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 a554a03862434..4d1cc5ff80182 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 @@ -80,8 +80,8 @@ public List blockedTrainingAlgorithms() { * {@inheritDoc} */ @Override - public ForecastingTrainingSettings withEnableOnnxCompatibleModels(Boolean enableOnnxCompatibleModels) { - super.withEnableOnnxCompatibleModels(enableOnnxCompatibleModels); + public ForecastingTrainingSettings withEnableDnnTraining(Boolean enableDnnTraining) { + super.withEnableDnnTraining(enableDnnTraining); return this; } @@ -89,8 +89,8 @@ public ForecastingTrainingSettings withEnableOnnxCompatibleModels(Boolean enable * {@inheritDoc} */ @Override - public ForecastingTrainingSettings withStackEnsembleSettings(StackEnsembleSettings stackEnsembleSettings) { - super.withStackEnsembleSettings(stackEnsembleSettings); + public ForecastingTrainingSettings withEnableModelExplainability(Boolean enableModelExplainability) { + super.withEnableModelExplainability(enableModelExplainability); return this; } @@ -98,8 +98,8 @@ public ForecastingTrainingSettings withStackEnsembleSettings(StackEnsembleSettin * {@inheritDoc} */ @Override - public ForecastingTrainingSettings withEnableStackEnsemble(Boolean enableStackEnsemble) { - super.withEnableStackEnsemble(enableStackEnsemble); + public ForecastingTrainingSettings withEnableOnnxCompatibleModels(Boolean enableOnnxCompatibleModels) { + super.withEnableOnnxCompatibleModels(enableOnnxCompatibleModels); return this; } @@ -107,8 +107,8 @@ public ForecastingTrainingSettings withEnableStackEnsemble(Boolean enableStackEn * {@inheritDoc} */ @Override - public ForecastingTrainingSettings withEnableVoteEnsemble(Boolean enableVoteEnsemble) { - super.withEnableVoteEnsemble(enableVoteEnsemble); + public ForecastingTrainingSettings withEnableStackEnsemble(Boolean enableStackEnsemble) { + super.withEnableStackEnsemble(enableStackEnsemble); return this; } @@ -116,8 +116,8 @@ public ForecastingTrainingSettings withEnableVoteEnsemble(Boolean enableVoteEnse * {@inheritDoc} */ @Override - public ForecastingTrainingSettings withEnsembleModelDownloadTimeout(Duration ensembleModelDownloadTimeout) { - super.withEnsembleModelDownloadTimeout(ensembleModelDownloadTimeout); + public ForecastingTrainingSettings withEnableVoteEnsemble(Boolean enableVoteEnsemble) { + super.withEnableVoteEnsemble(enableVoteEnsemble); return this; } @@ -125,8 +125,8 @@ public ForecastingTrainingSettings withEnsembleModelDownloadTimeout(Duration ens * {@inheritDoc} */ @Override - public ForecastingTrainingSettings withEnableModelExplainability(Boolean enableModelExplainability) { - super.withEnableModelExplainability(enableModelExplainability); + public ForecastingTrainingSettings withEnsembleModelDownloadTimeout(Duration ensembleModelDownloadTimeout) { + super.withEnsembleModelDownloadTimeout(ensembleModelDownloadTimeout); return this; } @@ -134,8 +134,8 @@ public ForecastingTrainingSettings withEnableModelExplainability(Boolean enableM * {@inheritDoc} */ @Override - public ForecastingTrainingSettings withEnableDnnTraining(Boolean enableDnnTraining) { - super.withEnableDnnTraining(enableDnnTraining); + public ForecastingTrainingSettings withStackEnsembleSettings(StackEnsembleSettings stackEnsembleSettings) { + super.withStackEnsembleSettings(stackEnsembleSettings); return this; } @@ -146,7 +146,9 @@ public ForecastingTrainingSettings withEnableDnnTraining(Boolean enableDnnTraini */ @Override public void validate() { - super.validate(); + if (stackEnsembleSettings() != null) { + stackEnsembleSettings().validate(); + } } /** @@ -155,14 +157,14 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enableDnnTraining", enableDnnTraining()); + jsonWriter.writeBooleanField("enableModelExplainability", enableModelExplainability()); jsonWriter.writeBooleanField("enableOnnxCompatibleModels", enableOnnxCompatibleModels()); - jsonWriter.writeJsonField("stackEnsembleSettings", stackEnsembleSettings()); jsonWriter.writeBooleanField("enableStackEnsemble", enableStackEnsemble()); jsonWriter.writeBooleanField("enableVoteEnsemble", enableVoteEnsemble()); jsonWriter.writeStringField("ensembleModelDownloadTimeout", CoreUtils.durationToStringWithDays(ensembleModelDownloadTimeout())); - jsonWriter.writeBooleanField("enableModelExplainability", enableModelExplainability()); - jsonWriter.writeBooleanField("enableDnnTraining", enableDnnTraining()); + jsonWriter.writeJsonField("stackEnsembleSettings", stackEnsembleSettings()); jsonWriter.writeArrayField("allowedTrainingAlgorithms", this.allowedTrainingAlgorithms, (writer, element) -> writer.writeString(element == null ? null : element.toString())); jsonWriter.writeArrayField("blockedTrainingAlgorithms", this.blockedTrainingAlgorithms, @@ -185,12 +187,15 @@ public static ForecastingTrainingSettings fromJson(JsonReader jsonReader) throws String fieldName = reader.getFieldName(); reader.nextToken(); - if ("enableOnnxCompatibleModels".equals(fieldName)) { + if ("enableDnnTraining".equals(fieldName)) { deserializedForecastingTrainingSettings - .withEnableOnnxCompatibleModels(reader.getNullable(JsonReader::getBoolean)); - } else if ("stackEnsembleSettings".equals(fieldName)) { + .withEnableDnnTraining(reader.getNullable(JsonReader::getBoolean)); + } else if ("enableModelExplainability".equals(fieldName)) { deserializedForecastingTrainingSettings - .withStackEnsembleSettings(StackEnsembleSettings.fromJson(reader)); + .withEnableModelExplainability(reader.getNullable(JsonReader::getBoolean)); + } else if ("enableOnnxCompatibleModels".equals(fieldName)) { + deserializedForecastingTrainingSettings + .withEnableOnnxCompatibleModels(reader.getNullable(JsonReader::getBoolean)); } else if ("enableStackEnsemble".equals(fieldName)) { deserializedForecastingTrainingSettings .withEnableStackEnsemble(reader.getNullable(JsonReader::getBoolean)); @@ -200,12 +205,9 @@ public static ForecastingTrainingSettings fromJson(JsonReader jsonReader) throws } else if ("ensembleModelDownloadTimeout".equals(fieldName)) { deserializedForecastingTrainingSettings.withEnsembleModelDownloadTimeout( reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString()))); - } else if ("enableModelExplainability".equals(fieldName)) { - deserializedForecastingTrainingSettings - .withEnableModelExplainability(reader.getNullable(JsonReader::getBoolean)); - } else if ("enableDnnTraining".equals(fieldName)) { + } else if ("stackEnsembleSettings".equals(fieldName)) { deserializedForecastingTrainingSettings - .withEnableDnnTraining(reader.getNullable(JsonReader::getBoolean)); + .withStackEnsembleSettings(StackEnsembleSettings.fromJson(reader)); } else if ("allowedTrainingAlgorithms".equals(fieldName)) { List allowedTrainingAlgorithms = reader.readArray(reader1 -> ForecastingModels.fromString(reader1.getString())); 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 a7fb5758a764c..a36e563865068 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 @@ -10,6 +10,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.util.List; /** * The FqdnEndpoints model. @@ -17,9 +18,14 @@ @Fluent public final class FqdnEndpoints implements JsonSerializable { /* - * The properties property. + * The category property. */ - private FqdnEndpointsProperties properties; + private String category; + + /* + * The endpoints property. + */ + private List endpoints; /** * Creates an instance of FqdnEndpoints class. @@ -28,22 +34,42 @@ public FqdnEndpoints() { } /** - * Get the properties property: The properties property. + * 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 properties value. + * @return the endpoints value. */ - public FqdnEndpointsProperties properties() { - return this.properties; + public List endpoints() { + return this.endpoints; } /** - * Set the properties property: The properties property. + * Set the endpoints property: The endpoints property. * - * @param properties the properties value to set. + * @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; } @@ -53,8 +79,8 @@ public FqdnEndpoints withProperties(FqdnEndpointsProperties properties) { * @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()); } } @@ -64,7 +90,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeStringField("category", this.category); + jsonWriter.writeArrayField("endpoints", this.endpoints, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -83,8 +110,11 @@ public static FqdnEndpoints fromJson(JsonReader jsonReader) throws IOException { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("properties".equals(fieldName)) { - deserializedFqdnEndpoints.properties = FqdnEndpointsProperties.fromJson(reader); + if ("category".equals(fieldName)) { + deserializedFqdnEndpoints.category = reader.getString(); + } else if ("endpoints".equals(fieldName)) { + List endpoints = reader.readArray(reader1 -> FqdnEndpoint.fromJson(reader1)); + deserializedFqdnEndpoints.endpoints = endpoints; } else { reader.skipChildren(); } 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 481775542a4c4..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointsProperties.java +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the 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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The FqdnEndpointsProperties model. - */ -@Fluent -public final class FqdnEndpointsProperties implements JsonSerializable { - /* - * The category property. - */ - private String category; - - /* - * The endpoints property. - */ - 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("category", this.category); - jsonWriter.writeArrayField("endpoints", this.endpoints, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FqdnEndpointsProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FqdnEndpointsProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the FqdnEndpointsProperties. - */ - public static FqdnEndpointsProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FqdnEndpointsProperties deserializedFqdnEndpointsProperties = new FqdnEndpointsProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("category".equals(fieldName)) { - deserializedFqdnEndpointsProperties.category = reader.getString(); - } else if ("endpoints".equals(fieldName)) { - List endpoints = reader.readArray(reader1 -> FqdnEndpoint.fromJson(reader1)); - deserializedFqdnEndpointsProperties.endpoints = endpoints; - } else { - reader.skipChildren(); - } - } - - return deserializedFqdnEndpointsProperties; - }); - } -} 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..34107357bc130 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointsPropertyBag.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Property bag for FQDN endpoints result. + */ +@Fluent +public final class FqdnEndpointsPropertyBag implements JsonSerializable { + /* + * The properties property. + */ + 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(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FqdnEndpointsPropertyBag from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FqdnEndpointsPropertyBag if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the FqdnEndpointsPropertyBag. + */ + public static FqdnEndpointsPropertyBag fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FqdnEndpointsPropertyBag deserializedFqdnEndpointsPropertyBag = new FqdnEndpointsPropertyBag(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedFqdnEndpointsPropertyBag.properties = FqdnEndpoints.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedFqdnEndpointsPropertyBag; + }); + } +} 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 index ab1445fcb8dcc..5634fd2bffe7e 100644 --- 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 @@ -9,6 +9,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.util.List; /** * FQDN Outbound Rule for the managed network of a machine learning workspace. @@ -86,7 +87,6 @@ public FqdnOutboundRule withStatus(RuleStatus status) { */ @Override public void validate() { - super.validate(); } /** @@ -119,6 +119,9 @@ public static FqdnOutboundRule fromJson(JsonReader jsonReader) throws IOExceptio if ("category".equals(fieldName)) { deserializedFqdnOutboundRule.withCategory(RuleCategory.fromString(reader.getString())); + } else if ("parentRuleNames".equals(fieldName)) { + List parentRuleNames = reader.readArray(reader1 -> reader1.getString()); + deserializedFqdnOutboundRule.withParentRuleNames(parentRuleNames); } else if ("status".equals(fieldName)) { deserializedFqdnOutboundRule.withStatus(RuleStatus.fromString(reader.getString())); } else if ("type".equals(fieldName)) { 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 index 5d2ffe5cb7eff..81793801b6665 100644 --- 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 @@ -22,14 +22,14 @@ public final class GetBlobReferenceForConsumptionDto implements JsonSerializable private String blobUri; /* - * The ARM id of the storage account + * Credential info to access storage account */ - private String storageAccountArmId; + private DataReferenceCredential credential; /* - * Credential info to access storage account + * The ARM id of the storage account */ - private DataReferenceCredential credential; + private String storageAccountArmId; /** * Creates an instance of GetBlobReferenceForConsumptionDto class. @@ -58,42 +58,42 @@ public GetBlobReferenceForConsumptionDto withBlobUri(String blobUri) { } /** - * Get the storageAccountArmId property: The ARM id of the storage account. + * Get the credential property: Credential info to access storage account. * - * @return the storageAccountArmId value. + * @return the credential value. */ - public String storageAccountArmId() { - return this.storageAccountArmId; + public DataReferenceCredential credential() { + return this.credential; } /** - * Set the storageAccountArmId property: The ARM id of the storage account. + * Set the credential property: Credential info to access storage account. * - * @param storageAccountArmId the storageAccountArmId value to set. + * @param credential the credential value to set. * @return the GetBlobReferenceForConsumptionDto object itself. */ - public GetBlobReferenceForConsumptionDto withStorageAccountArmId(String storageAccountArmId) { - this.storageAccountArmId = storageAccountArmId; + public GetBlobReferenceForConsumptionDto withCredential(DataReferenceCredential credential) { + this.credential = credential; return this; } /** - * Get the credential property: Credential info to access storage account. + * Get the storageAccountArmId property: The ARM id of the storage account. * - * @return the credential value. + * @return the storageAccountArmId value. */ - public DataReferenceCredential credential() { - return this.credential; + public String storageAccountArmId() { + return this.storageAccountArmId; } /** - * Set the credential property: Credential info to access storage account. + * Set the storageAccountArmId property: The ARM id of the storage account. * - * @param credential the credential value to set. + * @param storageAccountArmId the storageAccountArmId value to set. * @return the GetBlobReferenceForConsumptionDto object itself. */ - public GetBlobReferenceForConsumptionDto withCredential(DataReferenceCredential credential) { - this.credential = credential; + public GetBlobReferenceForConsumptionDto withStorageAccountArmId(String storageAccountArmId) { + this.storageAccountArmId = storageAccountArmId; return this; } @@ -115,8 +115,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("blobUri", this.blobUri); - jsonWriter.writeStringField("storageAccountArmId", this.storageAccountArmId); jsonWriter.writeJsonField("credential", this.credential); + jsonWriter.writeStringField("storageAccountArmId", this.storageAccountArmId); return jsonWriter.writeEndObject(); } @@ -138,10 +138,10 @@ public static GetBlobReferenceForConsumptionDto fromJson(JsonReader jsonReader) if ("blobUri".equals(fieldName)) { deserializedGetBlobReferenceForConsumptionDto.blobUri = reader.getString(); - } else if ("storageAccountArmId".equals(fieldName)) { - deserializedGetBlobReferenceForConsumptionDto.storageAccountArmId = reader.getString(); } else if ("credential".equals(fieldName)) { deserializedGetBlobReferenceForConsumptionDto.credential = DataReferenceCredential.fromJson(reader); + } else if ("storageAccountArmId".equals(fieldName)) { + deserializedGetBlobReferenceForConsumptionDto.storageAccountArmId = reader.getString(); } else { reader.skipChildren(); } 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 16f0f5beaf4cd..d3be0e34f7ef2 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 @@ -44,7 +44,6 @@ public SamplingAlgorithmType samplingAlgorithmType() { */ @Override public void validate() { - super.validate(); } /** diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GroupEnvironmentConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GroupEnvironmentConfiguration.java new file mode 100644 index 0000000000000..a34410bb46a65 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GroupEnvironmentConfiguration.java @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the 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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Environment configuration options. + */ +@Fluent +public final class GroupEnvironmentConfiguration implements JsonSerializable { + /* + * ARM resource ID of the environment specification for the inference pool. + */ + private String environmentId; + + /* + * Environment variables configuration for the inference pool. + */ + private List environmentVariables; + + /* + * Liveness probe monitors the health of the container regularly. + */ + private ProbeSettings livenessProbe; + + /* + * Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as + * liveness probe. + */ + 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. + */ + private ProbeSettings startupProbe; + + /** + * Creates an instance of GroupEnvironmentConfiguration class. + */ + public GroupEnvironmentConfiguration() { + } + + /** + * 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 GroupEnvironmentConfiguration object itself. + */ + public GroupEnvironmentConfiguration withEnvironmentId(String environmentId) { + this.environmentId = environmentId; + return this; + } + + /** + * Get the environmentVariables property: Environment variables configuration for the inference pool. + * + * @return the environmentVariables value. + */ + public List environmentVariables() { + return this.environmentVariables; + } + + /** + * Set the environmentVariables property: Environment variables configuration for the inference pool. + * + * @param environmentVariables the environmentVariables value to set. + * @return the GroupEnvironmentConfiguration object itself. + */ + public GroupEnvironmentConfiguration withEnvironmentVariables(List 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 GroupEnvironmentConfiguration object itself. + */ + public GroupEnvironmentConfiguration 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 GroupEnvironmentConfiguration object itself. + */ + public GroupEnvironmentConfiguration 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 GroupEnvironmentConfiguration object itself. + */ + public GroupEnvironmentConfiguration withStartupProbe(ProbeSettings startupProbe) { + this.startupProbe = startupProbe; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (environmentVariables() != null) { + environmentVariables().forEach(e -> e.validate()); + } + if (livenessProbe() != null) { + livenessProbe().validate(); + } + if (readinessProbe() != null) { + readinessProbe().validate(); + } + if (startupProbe() != null) { + startupProbe().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("environmentId", this.environmentId); + jsonWriter.writeArrayField("environmentVariables", this.environmentVariables, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("livenessProbe", this.livenessProbe); + jsonWriter.writeJsonField("readinessProbe", this.readinessProbe); + jsonWriter.writeJsonField("startupProbe", this.startupProbe); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GroupEnvironmentConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GroupEnvironmentConfiguration if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the GroupEnvironmentConfiguration. + */ + public static GroupEnvironmentConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GroupEnvironmentConfiguration deserializedGroupEnvironmentConfiguration + = new GroupEnvironmentConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("environmentId".equals(fieldName)) { + deserializedGroupEnvironmentConfiguration.environmentId = reader.getString(); + } else if ("environmentVariables".equals(fieldName)) { + List environmentVariables + = reader.readArray(reader1 -> StringKeyValuePair.fromJson(reader1)); + deserializedGroupEnvironmentConfiguration.environmentVariables = environmentVariables; + } else if ("livenessProbe".equals(fieldName)) { + deserializedGroupEnvironmentConfiguration.livenessProbe = ProbeSettings.fromJson(reader); + } else if ("readinessProbe".equals(fieldName)) { + deserializedGroupEnvironmentConfiguration.readinessProbe = ProbeSettings.fromJson(reader); + } else if ("startupProbe".equals(fieldName)) { + deserializedGroupEnvironmentConfiguration.startupProbe = ProbeSettings.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedGroupEnvironmentConfiguration; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GroupModelConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GroupModelConfiguration.java new file mode 100644 index 0000000000000..ccbb203ee12a4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GroupModelConfiguration.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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Model configuration options. + */ +@Fluent +public final class GroupModelConfiguration implements JsonSerializable { + /* + * The URI path to the model. + */ + private String modelId; + + /** + * Creates an instance of GroupModelConfiguration class. + */ + public GroupModelConfiguration() { + } + + /** + * 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 GroupModelConfiguration object itself. + */ + public GroupModelConfiguration withModelId(String modelId) { + this.modelId = modelId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("modelId", this.modelId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GroupModelConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GroupModelConfiguration if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the GroupModelConfiguration. + */ + public static GroupModelConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GroupModelConfiguration deserializedGroupModelConfiguration = new GroupModelConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("modelId".equals(fieldName)) { + deserializedGroupModelConfiguration.modelId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedGroupModelConfiguration; + }); + } +} 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..caf10906fee23 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GroupStatus.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.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 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 e757fd131a478..5df6b10cb6c8d 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 @@ -11,7 +11,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.time.OffsetDateTime; import java.util.List; /** @@ -29,32 +28,6 @@ public final class HDInsight extends Compute { */ private HDInsightProperties properties; - /* - * The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - */ - private ProvisioningState provisioningState; - - /* - * The time at which the compute was created. - */ - private OffsetDateTime createdOn; - - /* - * The time at which the compute was last modified. - */ - private OffsetDateTime modifiedOn; - - /* - * Errors during provisioning - */ - private List provisioningErrors; - - /* - * Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning - * service provisioned it if false. - */ - private Boolean isAttachedCompute; - /** * Creates an instance of HDInsight class. */ @@ -91,58 +64,6 @@ public HDInsight withProperties(HDInsightProperties properties) { return this; } - /** - * Get the provisioningState property: The provision state of the cluster. Valid values are Unknown, Updating, - * Provisioning, Succeeded, and Failed. - * - * @return the provisioningState value. - */ - @Override - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the createdOn property: The time at which the compute was created. - * - * @return the createdOn value. - */ - @Override - public OffsetDateTime createdOn() { - return this.createdOn; - } - - /** - * Get the modifiedOn property: The time at which the compute was last modified. - * - * @return the modifiedOn value. - */ - @Override - public OffsetDateTime modifiedOn() { - return this.modifiedOn; - } - - /** - * Get the provisioningErrors property: Errors during provisioning. - * - * @return the provisioningErrors value. - */ - @Override - public List provisioningErrors() { - return this.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. - */ - @Override - public Boolean isAttachedCompute() { - return this.isAttachedCompute; - } - /** * {@inheritDoc} */ @@ -186,7 +107,6 @@ public HDInsight withDisableLocalAuth(Boolean disableLocalAuth) { */ @Override public void validate() { - super.validate(); if (properties() != null) { properties().validate(); } @@ -225,23 +145,23 @@ public static HDInsight fromJson(JsonReader jsonReader) throws IOException { if ("computeLocation".equals(fieldName)) { deserializedHDInsight.withComputeLocation(reader.getString()); } else if ("provisioningState".equals(fieldName)) { - deserializedHDInsight.provisioningState = ProvisioningState.fromString(reader.getString()); + deserializedHDInsight.withProvisioningState(ProvisioningState.fromString(reader.getString())); } else if ("description".equals(fieldName)) { deserializedHDInsight.withDescription(reader.getString()); } else if ("createdOn".equals(fieldName)) { - deserializedHDInsight.createdOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedHDInsight.withCreatedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("modifiedOn".equals(fieldName)) { - deserializedHDInsight.modifiedOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedHDInsight.withModifiedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("resourceId".equals(fieldName)) { deserializedHDInsight.withResourceId(reader.getString()); } else if ("provisioningErrors".equals(fieldName)) { List provisioningErrors = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); - deserializedHDInsight.provisioningErrors = provisioningErrors; + deserializedHDInsight.withProvisioningErrors(provisioningErrors); } else if ("isAttachedCompute".equals(fieldName)) { - deserializedHDInsight.isAttachedCompute = reader.getNullable(JsonReader::getBoolean); + deserializedHDInsight.withIsAttachedCompute(reader.getNullable(JsonReader::getBoolean)); } else if ("disableLocalAuth".equals(fieldName)) { deserializedHDInsight.withDisableLocalAuth(reader.getNullable(JsonReader::getBoolean)); } else if ("computeType".equals(fieldName)) { 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 2e462d48e5284..e7e14dce96e62 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 @@ -69,7 +69,6 @@ public IdAssetReference withAssetId(String assetId) { */ @Override public void validate() { - super.validate(); if (assetId() == null) { throw LOGGER.atError() .log(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/IdentityForCmk.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityForCmk.java index 005ee944ae134..65eaf73afaa55 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 @@ -12,12 +12,12 @@ import java.io.IOException; /** - * Identity that will be used to access key vault for encryption at rest. + * Identity object used for encryption. */ @Fluent public final class IdentityForCmk implements JsonSerializable { /* - * 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 */ private String userAssignedIdentity; @@ -28,8 +28,7 @@ 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. */ @@ -38,8 +37,7 @@ 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. 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..3ae056f8ee696 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdleShutdownSetting.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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Stops compute instance after user defined period of inactivity. + */ +@Fluent +public final class IdleShutdownSetting implements JsonSerializable { + /* + * Time is defined in ISO8601 format. Minimum is 15 min, maximum is 3 days. + */ + 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() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("idleTimeBeforeShutdown", this.idleTimeBeforeShutdown); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IdleShutdownSetting from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IdleShutdownSetting if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the IdleShutdownSetting. + */ + public static IdleShutdownSetting fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IdleShutdownSetting deserializedIdleShutdownSetting = new IdleShutdownSetting(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("idleTimeBeforeShutdown".equals(fieldName)) { + deserializedIdleShutdownSetting.idleTimeBeforeShutdown = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedIdleShutdownSetting; + }); + } +} 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 index f47808eb59747..d9e46197675cd 100644 --- 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 @@ -14,22 +14,28 @@ import java.util.Map; /** - * Describes the Image Specifications. + * The Image model. */ @Fluent public final class Image implements JsonSerializable { /* - * Type of the image. Possible values are: docker - For docker images. azureml - For AzureML images + * Type of the image. Possible values are: docker - For docker images. azureml - For AzureML Environment images + * (custom and curated) */ private ImageType type; /* - * Image reference + * Image reference URL if type is docker. Environment name if type is azureml */ private String reference; /* - * Describes the Image Specifications + * Version of image being used. If latest then skip this field + */ + private String version; + + /* + * Dictionary of */ private Map additionalProperties; @@ -41,7 +47,7 @@ public Image() { /** * Get the type property: Type of the image. Possible values are: docker - For docker images. azureml - For AzureML - * images. + * Environment images (custom and curated). * * @return the type value. */ @@ -51,7 +57,7 @@ public ImageType type() { /** * Set the type property: Type of the image. Possible values are: docker - For docker images. azureml - For AzureML - * images. + * Environment images (custom and curated). * * @param type the type value to set. * @return the Image object itself. @@ -62,7 +68,7 @@ public Image withType(ImageType type) { } /** - * Get the reference property: Image reference. + * Get the reference property: Image reference URL if type is docker. Environment name if type is azureml. * * @return the reference value. */ @@ -71,7 +77,7 @@ public String reference() { } /** - * Set the reference property: Image 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. @@ -82,7 +88,27 @@ public Image withReference(String reference) { } /** - * Get the additionalProperties property: Describes the Image Specifications. + * 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. */ @@ -91,7 +117,7 @@ public Map additionalProperties() { } /** - * Set the additionalProperties property: Describes the Image Specifications. + * Set the additionalProperties property: Dictionary of <any>. * * @param additionalProperties the additionalProperties value to set. * @return the Image object itself. @@ -117,6 +143,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); jsonWriter.writeStringField("reference", this.reference); + jsonWriter.writeStringField("version", this.version); if (additionalProperties != null) { for (Map.Entry additionalProperty : additionalProperties.entrySet()) { jsonWriter.writeUntypedField(additionalProperty.getKey(), additionalProperty.getValue()); @@ -145,6 +172,8 @@ public static Image fromJson(JsonReader jsonReader) throws IOException { deserializedImage.type = ImageType.fromString(reader.getString()); } else if ("reference".equals(fieldName)) { deserializedImage.reference = reader.getString(); + } else if ("version".equals(fieldName)) { + deserializedImage.version = reader.getString(); } else { if (additionalProperties == null) { additionalProperties = new LinkedHashMap<>(); 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 fddff7e1c2c5c..20cf3a13b0fab 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 @@ -237,8 +237,8 @@ public ImageClassification withLogVerbosity(LogVerbosity logVerbosity) { * {@inheritDoc} */ @Override - public ImageClassification withTrainingData(MLTableJobInput trainingData) { - super.withTrainingData(trainingData); + public ImageClassification withTargetColumnName(String targetColumnName) { + super.withTargetColumnName(targetColumnName); return this; } @@ -246,8 +246,8 @@ public ImageClassification withTrainingData(MLTableJobInput trainingData) { * {@inheritDoc} */ @Override - public ImageClassification withTargetColumnName(String targetColumnName) { - super.withTargetColumnName(targetColumnName); + public ImageClassification withTrainingData(MLTableJobInput trainingData) { + super.withTrainingData(trainingData); return this; } @@ -258,7 +258,6 @@ public ImageClassification withTargetColumnName(String targetColumnName) { */ @Override public void validate() { - super.validate(); if (modelSettings() != null) { modelSettings().validate(); } @@ -278,6 +277,13 @@ public void validate() { if (validationData() != null) { validationData().validate(); } + if (trainingData() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property trainingData in model ImageClassification")); + } else { + trainingData().validate(); + } } private static final ClientLogger LOGGER = new ClientLogger(ImageClassification.class); 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 84339846a46fb..f4c0aaa86d9b7 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 @@ -5,6 +5,7 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -117,15 +118,29 @@ public ImageClassificationBase withValidationDataSize(Double validationDataSize) */ @Override public void validate() { - super.validate(); if (modelSettings() != null) { modelSettings().validate(); } if (searchSpace() != null) { searchSpace().forEach(e -> e.validate()); } + if (limitSettings() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property limitSettings in model ImageClassificationBase")); + } else { + limitSettings().validate(); + } + if (sweepSettings() != null) { + sweepSettings().validate(); + } + if (validationData() != null) { + validationData().validate(); + } } + private static final ClientLogger LOGGER = new ClientLogger(ImageClassificationBase.class); + /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassificationMultilabel.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassificationMultilabel.java index b0f14d55141c3..75ee257cebf5f 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassificationMultilabel.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassificationMultilabel.java @@ -238,8 +238,8 @@ public ImageClassificationMultilabel withLogVerbosity(LogVerbosity logVerbosity) * {@inheritDoc} */ @Override - public ImageClassificationMultilabel withTrainingData(MLTableJobInput trainingData) { - super.withTrainingData(trainingData); + public ImageClassificationMultilabel withTargetColumnName(String targetColumnName) { + super.withTargetColumnName(targetColumnName); return this; } @@ -247,8 +247,8 @@ public ImageClassificationMultilabel withTrainingData(MLTableJobInput trainingDa * {@inheritDoc} */ @Override - public ImageClassificationMultilabel withTargetColumnName(String targetColumnName) { - super.withTargetColumnName(targetColumnName); + public ImageClassificationMultilabel withTrainingData(MLTableJobInput trainingData) { + super.withTrainingData(trainingData); return this; } @@ -259,7 +259,6 @@ public ImageClassificationMultilabel withTargetColumnName(String targetColumnNam */ @Override public void validate() { - super.validate(); if (modelSettings() != null) { modelSettings().validate(); } @@ -279,6 +278,13 @@ public void validate() { if (validationData() != null) { validationData().validate(); } + if (trainingData() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property trainingData in model ImageClassificationMultilabel")); + } else { + trainingData().validate(); + } } private static final ClientLogger LOGGER = new ClientLogger(ImageClassificationMultilabel.class); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageDetails.java new file mode 100644 index 0000000000000..0caf9772047f6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageDetails.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.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The ImageDetails model. + */ +@Fluent +public final class ImageDetails implements JsonSerializable { + /* + * Indicates if image exists + */ + private Boolean exists; + + /* + * Container image details + */ + private ImageInfo image; + + /* + * Vulnerability findings details + */ + private VulnerabilityFindings vulnerabilityFindings; + + /** + * Creates an instance of ImageDetails class. + */ + public ImageDetails() { + } + + /** + * Get the exists property: Indicates if image exists. + * + * @return the exists value. + */ + public Boolean exists() { + return this.exists; + } + + /** + * Set the exists property: Indicates if image exists. + * + * @param exists the exists value to set. + * @return the ImageDetails object itself. + */ + public ImageDetails withExists(Boolean exists) { + this.exists = exists; + return this; + } + + /** + * Get the image property: Container image details. + * + * @return the image value. + */ + public ImageInfo image() { + return this.image; + } + + /** + * Set the image property: Container image details. + * + * @param image the image value to set. + * @return the ImageDetails object itself. + */ + public ImageDetails withImage(ImageInfo image) { + this.image = image; + return this; + } + + /** + * Get the vulnerabilityFindings property: Vulnerability findings details. + * + * @return the vulnerabilityFindings value. + */ + public VulnerabilityFindings vulnerabilityFindings() { + return this.vulnerabilityFindings; + } + + /** + * Set the vulnerabilityFindings property: Vulnerability findings details. + * + * @param vulnerabilityFindings the vulnerabilityFindings value to set. + * @return the ImageDetails object itself. + */ + public ImageDetails withVulnerabilityFindings(VulnerabilityFindings vulnerabilityFindings) { + this.vulnerabilityFindings = vulnerabilityFindings; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (image() != null) { + image().validate(); + } + if (vulnerabilityFindings() != null) { + vulnerabilityFindings().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("exists", this.exists); + jsonWriter.writeJsonField("image", this.image); + jsonWriter.writeJsonField("vulnerabilityFindings", this.vulnerabilityFindings); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ImageDetails from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ImageDetails if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ImageDetails. + */ + public static ImageDetails fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ImageDetails deserializedImageDetails = new ImageDetails(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("exists".equals(fieldName)) { + deserializedImageDetails.exists = reader.getNullable(JsonReader::getBoolean); + } else if ("image".equals(fieldName)) { + deserializedImageDetails.image = ImageInfo.fromJson(reader); + } else if ("vulnerabilityFindings".equals(fieldName)) { + deserializedImageDetails.vulnerabilityFindings = VulnerabilityFindings.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedImageDetails; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageInfo.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageInfo.java new file mode 100644 index 0000000000000..1a4d614ab1c47 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageInfo.java @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the 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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The ImageInfo model. + */ +@Fluent +public final class ImageInfo implements JsonSerializable { + /* + * Image digest + */ + private String digest; + + /* + * Container registry host name + */ + private String hostname; + + /* + * Repository name + */ + private String repository; + + /* + * Image tag + */ + private String tag; + + /** + * Creates an instance of ImageInfo class. + */ + public ImageInfo() { + } + + /** + * Get the digest property: Image digest. + * + * @return the digest value. + */ + public String digest() { + return this.digest; + } + + /** + * Set the digest property: Image digest. + * + * @param digest the digest value to set. + * @return the ImageInfo object itself. + */ + public ImageInfo withDigest(String digest) { + this.digest = digest; + return this; + } + + /** + * Get the hostname property: Container registry host name. + * + * @return the hostname value. + */ + public String hostname() { + return this.hostname; + } + + /** + * Set the hostname property: Container registry host name. + * + * @param hostname the hostname value to set. + * @return the ImageInfo object itself. + */ + public ImageInfo withHostname(String hostname) { + this.hostname = hostname; + return this; + } + + /** + * Get the repository property: Repository name. + * + * @return the repository value. + */ + public String repository() { + return this.repository; + } + + /** + * Set the repository property: Repository name. + * + * @param repository the repository value to set. + * @return the ImageInfo object itself. + */ + public ImageInfo withRepository(String repository) { + this.repository = repository; + return this; + } + + /** + * Get the tag property: Image tag. + * + * @return the tag value. + */ + public String tag() { + return this.tag; + } + + /** + * Set the tag property: Image tag. + * + * @param tag the tag value to set. + * @return the ImageInfo object itself. + */ + public ImageInfo withTag(String tag) { + this.tag = tag; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("digest", this.digest); + jsonWriter.writeStringField("hostname", this.hostname); + jsonWriter.writeStringField("repository", this.repository); + jsonWriter.writeStringField("tag", this.tag); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ImageInfo from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ImageInfo if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the ImageInfo. + */ + public static ImageInfo fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ImageInfo deserializedImageInfo = new ImageInfo(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("digest".equals(fieldName)) { + deserializedImageInfo.digest = reader.getString(); + } else if ("hostname".equals(fieldName)) { + deserializedImageInfo.hostname = reader.getString(); + } else if ("repository".equals(fieldName)) { + deserializedImageInfo.repository = reader.getString(); + } else if ("tag".equals(fieldName)) { + deserializedImageInfo.tag = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedImageInfo; + }); + } +} 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 d393255a2ea18..d1ff20aadeb99 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 @@ -237,8 +237,8 @@ public ImageInstanceSegmentation withLogVerbosity(LogVerbosity logVerbosity) { * {@inheritDoc} */ @Override - public ImageInstanceSegmentation withTrainingData(MLTableJobInput trainingData) { - super.withTrainingData(trainingData); + public ImageInstanceSegmentation withTargetColumnName(String targetColumnName) { + super.withTargetColumnName(targetColumnName); return this; } @@ -246,8 +246,8 @@ public ImageInstanceSegmentation withTrainingData(MLTableJobInput trainingData) * {@inheritDoc} */ @Override - public ImageInstanceSegmentation withTargetColumnName(String targetColumnName) { - super.withTargetColumnName(targetColumnName); + public ImageInstanceSegmentation withTrainingData(MLTableJobInput trainingData) { + super.withTrainingData(trainingData); return this; } @@ -258,7 +258,6 @@ public ImageInstanceSegmentation withTargetColumnName(String targetColumnName) { */ @Override public void validate() { - super.validate(); if (modelSettings() != null) { modelSettings().validate(); } @@ -278,6 +277,13 @@ public void validate() { if (validationData() != null) { validationData().validate(); } + if (trainingData() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property trainingData in model ImageInstanceSegmentation")); + } else { + trainingData().validate(); + } } private static final ClientLogger LOGGER = new ClientLogger(ImageInstanceSegmentation.class); 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 b003370fed911..6b77c84bd1d67 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 @@ -18,6 +18,11 @@ */ @Fluent public final class ImageLimitSettings implements JsonSerializable { + /* + * Maximum number of concurrent AutoML iterations. + */ + private Integer maxConcurrentTrials; + /* * Maximum number of AutoML iterations. */ @@ -28,17 +33,32 @@ public final class ImageLimitSettings implements JsonSerializable Duration.parse(nonNullReader.getString())); - } else if ("maxConcurrentTrials".equals(fieldName)) { - deserializedImageLimitSettings.maxConcurrentTrials = reader.getNullable(JsonReader::getInt); } else { reader.skipChildren(); } 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 index 751e4968480d4..6fc6808c84d04 100644 --- 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 @@ -31,6 +31,11 @@ public final class ImageMetadata implements JsonSerializable { */ private Boolean isLatestOsImageVersion; + /* + * Metadata about the os patching. + */ + private OsPatchingStatus osPatchingStatus; + /** * Creates an instance of ImageMetadata class. */ @@ -101,12 +106,24 @@ public ImageMetadata withIsLatestOsImageVersion(Boolean 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(); + } } /** @@ -142,6 +159,8 @@ public static ImageMetadata fromJson(JsonReader jsonReader) throws IOException { deserializedImageMetadata.latestImageVersion = reader.getString(); } else if ("isLatestOsImageVersion".equals(fieldName)) { deserializedImageMetadata.isLatestOsImageVersion = reader.getNullable(JsonReader::getBoolean); + } else if ("osPatchingStatus".equals(fieldName)) { + deserializedImageMetadata.osPatchingStatus = OsPatchingStatus.fromJson(reader); } else { reader.skipChildren(); } 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 4963e43c01e7b..260a57e548af9 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 @@ -72,14 +72,14 @@ public class ImageModelDistributionSettings implements JsonSerializable { /* - * Enable AMSGrad when optimizer is 'adam' or 'adamw'. + * Settings for advanced scenarios. */ - private Boolean amsGradient; + private String advancedSettings; /* - * Settings for advanced scenarios. + * Enable AMSGrad when optimizer is 'adam' or 'adamw'. */ - private String advancedSettings; + private Boolean amsGradient; /* * Settings for using Augmentations. @@ -49,14 +49,14 @@ public class ImageModelSettings implements JsonSerializable private Integer checkpointFrequency; /* - * The id of a previous run that has a pretrained checkpoint for incremental training. + * The pretrained checkpoint model for incremental training. */ - private String checkpointRunId; + private MLFlowModelJobInput checkpointModel; /* - * The pretrained checkpoint model for incremental training. + * The id of a previous run that has a pretrained checkpoint for incremental training. */ - private MLFlowModelJobInput checkpointModel; + private String checkpointRunId; /* * Whether to use distributed training. @@ -81,14 +81,14 @@ public class ImageModelSettings implements JsonSerializable private Integer earlyStoppingPatience; /* - * Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. + * Enable normalization when exporting ONNX model. */ - private Integer evaluationFrequency; + private Boolean enableOnnxNormalization; /* - * Enable normalization when exporting ONNX model. + * Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. */ - private Boolean enableOnnxNormalization; + private Integer evaluationFrequency; /* * Gradient accumulation means running a configured number of "GradAccumulationStep" steps without @@ -194,42 +194,42 @@ public ImageModelSettings() { } /** - * Get the amsGradient property: Enable AMSGrad when optimizer is 'adam' or 'adamw'. + * Get the advancedSettings property: Settings for advanced scenarios. * - * @return the amsGradient value. + * @return the advancedSettings value. */ - public Boolean amsGradient() { - return this.amsGradient; + public String advancedSettings() { + return this.advancedSettings; } /** - * Set the amsGradient property: Enable AMSGrad when optimizer is 'adam' or 'adamw'. + * Set the advancedSettings property: Settings for advanced scenarios. * - * @param amsGradient the amsGradient value to set. + * @param advancedSettings the advancedSettings value to set. * @return the ImageModelSettings object itself. */ - public ImageModelSettings withAmsGradient(Boolean amsGradient) { - this.amsGradient = amsGradient; + public ImageModelSettings withAdvancedSettings(String advancedSettings) { + this.advancedSettings = advancedSettings; return this; } /** - * Get the advancedSettings property: Settings for advanced scenarios. + * Get the amsGradient property: Enable AMSGrad when optimizer is 'adam' or 'adamw'. * - * @return the advancedSettings value. + * @return the amsGradient value. */ - public String advancedSettings() { - return this.advancedSettings; + public Boolean amsGradient() { + return this.amsGradient; } /** - * Set the advancedSettings property: Settings for advanced scenarios. + * Set the amsGradient property: Enable AMSGrad when optimizer is 'adam' or 'adamw'. * - * @param advancedSettings the advancedSettings value to set. + * @param amsGradient the amsGradient value to set. * @return the ImageModelSettings object itself. */ - public ImageModelSettings withAdvancedSettings(String advancedSettings) { - this.advancedSettings = advancedSettings; + public ImageModelSettings withAmsGradient(Boolean amsGradient) { + this.amsGradient = amsGradient; return this; } @@ -318,44 +318,44 @@ public ImageModelSettings withCheckpointFrequency(Integer checkpointFrequency) { } /** - * Get the checkpointRunId property: The id of a previous run that has a pretrained checkpoint for incremental - * training. + * Get the checkpointModel property: The pretrained checkpoint model for incremental training. * - * @return the checkpointRunId value. + * @return the checkpointModel value. */ - public String checkpointRunId() { - return this.checkpointRunId; + public MLFlowModelJobInput checkpointModel() { + return this.checkpointModel; } /** - * Set the checkpointRunId property: The id of a previous run that has a pretrained checkpoint for incremental - * training. + * Set the checkpointModel property: The pretrained checkpoint model for incremental training. * - * @param checkpointRunId the checkpointRunId value to set. + * @param checkpointModel the checkpointModel value to set. * @return the ImageModelSettings object itself. */ - public ImageModelSettings withCheckpointRunId(String checkpointRunId) { - this.checkpointRunId = checkpointRunId; + public ImageModelSettings withCheckpointModel(MLFlowModelJobInput checkpointModel) { + this.checkpointModel = checkpointModel; return this; } /** - * Get the checkpointModel property: The pretrained checkpoint model for incremental training. + * Get the checkpointRunId property: The id of a previous run that has a pretrained checkpoint for incremental + * training. * - * @return the checkpointModel value. + * @return the checkpointRunId value. */ - public MLFlowModelJobInput checkpointModel() { - return this.checkpointModel; + public String checkpointRunId() { + return this.checkpointRunId; } /** - * Set the checkpointModel property: The pretrained checkpoint model for incremental training. + * Set the checkpointRunId property: The id of a previous run that has a pretrained checkpoint for incremental + * training. * - * @param checkpointModel the checkpointModel value to set. + * @param checkpointRunId the checkpointRunId value to set. * @return the ImageModelSettings object itself. */ - public ImageModelSettings withCheckpointModel(MLFlowModelJobInput checkpointModel) { - this.checkpointModel = checkpointModel; + public ImageModelSettings withCheckpointRunId(String checkpointRunId) { + this.checkpointRunId = checkpointRunId; return this; } @@ -448,44 +448,44 @@ public ImageModelSettings withEarlyStoppingPatience(Integer earlyStoppingPatienc } /** - * Get the evaluationFrequency property: Frequency to evaluate validation dataset to get metric scores. Must be a - * positive integer. + * Get the enableOnnxNormalization property: Enable normalization when exporting ONNX model. * - * @return the evaluationFrequency value. + * @return the enableOnnxNormalization value. */ - public Integer evaluationFrequency() { - return this.evaluationFrequency; + public Boolean enableOnnxNormalization() { + return this.enableOnnxNormalization; } /** - * Set the evaluationFrequency property: Frequency to evaluate validation dataset to get metric scores. Must be a - * positive integer. + * Set the enableOnnxNormalization property: Enable normalization when exporting ONNX model. * - * @param evaluationFrequency the evaluationFrequency value to set. + * @param enableOnnxNormalization the enableOnnxNormalization value to set. * @return the ImageModelSettings object itself. */ - public ImageModelSettings withEvaluationFrequency(Integer evaluationFrequency) { - this.evaluationFrequency = evaluationFrequency; + public ImageModelSettings withEnableOnnxNormalization(Boolean enableOnnxNormalization) { + this.enableOnnxNormalization = enableOnnxNormalization; return this; } /** - * Get the enableOnnxNormalization property: Enable normalization when exporting ONNX model. + * Get the evaluationFrequency property: Frequency to evaluate validation dataset to get metric scores. Must be a + * positive integer. * - * @return the enableOnnxNormalization value. + * @return the evaluationFrequency value. */ - public Boolean enableOnnxNormalization() { - return this.enableOnnxNormalization; + public Integer evaluationFrequency() { + return this.evaluationFrequency; } /** - * Set the enableOnnxNormalization property: Enable normalization when exporting ONNX model. + * Set the evaluationFrequency property: Frequency to evaluate validation dataset to get metric scores. Must be a + * positive integer. * - * @param enableOnnxNormalization the enableOnnxNormalization value to set. + * @param evaluationFrequency the evaluationFrequency value to set. * @return the ImageModelSettings object itself. */ - public ImageModelSettings withEnableOnnxNormalization(Boolean enableOnnxNormalization) { - this.enableOnnxNormalization = enableOnnxNormalization; + public ImageModelSettings withEvaluationFrequency(Integer evaluationFrequency) { + this.evaluationFrequency = evaluationFrequency; return this; } @@ -892,20 +892,20 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("amsGradient", this.amsGradient); jsonWriter.writeStringField("advancedSettings", this.advancedSettings); + jsonWriter.writeBooleanField("amsGradient", this.amsGradient); jsonWriter.writeStringField("augmentations", this.augmentations); jsonWriter.writeNumberField("beta1", this.beta1); jsonWriter.writeNumberField("beta2", this.beta2); jsonWriter.writeNumberField("checkpointFrequency", this.checkpointFrequency); - jsonWriter.writeStringField("checkpointRunId", this.checkpointRunId); jsonWriter.writeJsonField("checkpointModel", this.checkpointModel); + jsonWriter.writeStringField("checkpointRunId", this.checkpointRunId); jsonWriter.writeBooleanField("distributed", this.distributed); jsonWriter.writeBooleanField("earlyStopping", this.earlyStopping); jsonWriter.writeNumberField("earlyStoppingDelay", this.earlyStoppingDelay); jsonWriter.writeNumberField("earlyStoppingPatience", this.earlyStoppingPatience); - jsonWriter.writeNumberField("evaluationFrequency", this.evaluationFrequency); jsonWriter.writeBooleanField("enableOnnxNormalization", this.enableOnnxNormalization); + jsonWriter.writeNumberField("evaluationFrequency", this.evaluationFrequency); jsonWriter.writeNumberField("gradientAccumulationStep", this.gradientAccumulationStep); jsonWriter.writeNumberField("layersToFreeze", this.layersToFreeze); jsonWriter.writeNumberField("learningRate", this.learningRate); @@ -943,10 +943,10 @@ public static ImageModelSettings fromJson(JsonReader jsonReader) throws IOExcept String fieldName = reader.getFieldName(); reader.nextToken(); - if ("amsGradient".equals(fieldName)) { - deserializedImageModelSettings.amsGradient = reader.getNullable(JsonReader::getBoolean); - } else if ("advancedSettings".equals(fieldName)) { + if ("advancedSettings".equals(fieldName)) { deserializedImageModelSettings.advancedSettings = reader.getString(); + } else if ("amsGradient".equals(fieldName)) { + deserializedImageModelSettings.amsGradient = reader.getNullable(JsonReader::getBoolean); } else if ("augmentations".equals(fieldName)) { deserializedImageModelSettings.augmentations = reader.getString(); } else if ("beta1".equals(fieldName)) { @@ -955,10 +955,10 @@ public static ImageModelSettings fromJson(JsonReader jsonReader) throws IOExcept deserializedImageModelSettings.beta2 = reader.getNullable(JsonReader::getFloat); } else if ("checkpointFrequency".equals(fieldName)) { deserializedImageModelSettings.checkpointFrequency = reader.getNullable(JsonReader::getInt); - } else if ("checkpointRunId".equals(fieldName)) { - deserializedImageModelSettings.checkpointRunId = reader.getString(); } else if ("checkpointModel".equals(fieldName)) { deserializedImageModelSettings.checkpointModel = MLFlowModelJobInput.fromJson(reader); + } else if ("checkpointRunId".equals(fieldName)) { + deserializedImageModelSettings.checkpointRunId = reader.getString(); } else if ("distributed".equals(fieldName)) { deserializedImageModelSettings.distributed = reader.getNullable(JsonReader::getBoolean); } else if ("earlyStopping".equals(fieldName)) { @@ -967,10 +967,10 @@ public static ImageModelSettings fromJson(JsonReader jsonReader) throws IOExcept deserializedImageModelSettings.earlyStoppingDelay = reader.getNullable(JsonReader::getInt); } else if ("earlyStoppingPatience".equals(fieldName)) { deserializedImageModelSettings.earlyStoppingPatience = reader.getNullable(JsonReader::getInt); - } else if ("evaluationFrequency".equals(fieldName)) { - deserializedImageModelSettings.evaluationFrequency = reader.getNullable(JsonReader::getInt); } else if ("enableOnnxNormalization".equals(fieldName)) { deserializedImageModelSettings.enableOnnxNormalization = reader.getNullable(JsonReader::getBoolean); + } else if ("evaluationFrequency".equals(fieldName)) { + deserializedImageModelSettings.evaluationFrequency = reader.getNullable(JsonReader::getInt); } else if ("gradientAccumulationStep".equals(fieldName)) { deserializedImageModelSettings.gradientAccumulationStep = reader.getNullable(JsonReader::getInt); } else if ("layersToFreeze".equals(fieldName)) { 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 3869388e983e1..3a3dc4c08b221 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 @@ -136,8 +136,8 @@ public ImageModelSettingsClassification withWeightedLoss(Integer weightedLoss) { * {@inheritDoc} */ @Override - public ImageModelSettingsClassification withAmsGradient(Boolean amsGradient) { - super.withAmsGradient(amsGradient); + public ImageModelSettingsClassification withAdvancedSettings(String advancedSettings) { + super.withAdvancedSettings(advancedSettings); return this; } @@ -145,8 +145,8 @@ public ImageModelSettingsClassification withAmsGradient(Boolean amsGradient) { * {@inheritDoc} */ @Override - public ImageModelSettingsClassification withAdvancedSettings(String advancedSettings) { - super.withAdvancedSettings(advancedSettings); + public ImageModelSettingsClassification withAmsGradient(Boolean amsGradient) { + super.withAmsGradient(amsGradient); return this; } @@ -190,8 +190,8 @@ public ImageModelSettingsClassification withCheckpointFrequency(Integer checkpoi * {@inheritDoc} */ @Override - public ImageModelSettingsClassification withCheckpointRunId(String checkpointRunId) { - super.withCheckpointRunId(checkpointRunId); + public ImageModelSettingsClassification withCheckpointModel(MLFlowModelJobInput checkpointModel) { + super.withCheckpointModel(checkpointModel); return this; } @@ -199,8 +199,8 @@ public ImageModelSettingsClassification withCheckpointRunId(String checkpointRun * {@inheritDoc} */ @Override - public ImageModelSettingsClassification withCheckpointModel(MLFlowModelJobInput checkpointModel) { - super.withCheckpointModel(checkpointModel); + public ImageModelSettingsClassification withCheckpointRunId(String checkpointRunId) { + super.withCheckpointRunId(checkpointRunId); return this; } @@ -244,8 +244,8 @@ public ImageModelSettingsClassification withEarlyStoppingPatience(Integer earlyS * {@inheritDoc} */ @Override - public ImageModelSettingsClassification withEvaluationFrequency(Integer evaluationFrequency) { - super.withEvaluationFrequency(evaluationFrequency); + public ImageModelSettingsClassification withEnableOnnxNormalization(Boolean enableOnnxNormalization) { + super.withEnableOnnxNormalization(enableOnnxNormalization); return this; } @@ -253,8 +253,8 @@ public ImageModelSettingsClassification withEvaluationFrequency(Integer evaluati * {@inheritDoc} */ @Override - public ImageModelSettingsClassification withEnableOnnxNormalization(Boolean enableOnnxNormalization) { - super.withEnableOnnxNormalization(enableOnnxNormalization); + public ImageModelSettingsClassification withEvaluationFrequency(Integer evaluationFrequency) { + super.withEvaluationFrequency(evaluationFrequency); return this; } @@ -427,7 +427,9 @@ public ImageModelSettingsClassification withWeightDecay(Float weightDecay) { */ @Override public void validate() { - super.validate(); + if (checkpointModel() != null) { + checkpointModel().validate(); + } } /** @@ -436,20 +438,20 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("amsGradient", amsGradient()); jsonWriter.writeStringField("advancedSettings", advancedSettings()); + jsonWriter.writeBooleanField("amsGradient", amsGradient()); jsonWriter.writeStringField("augmentations", augmentations()); jsonWriter.writeNumberField("beta1", beta1()); jsonWriter.writeNumberField("beta2", beta2()); jsonWriter.writeNumberField("checkpointFrequency", checkpointFrequency()); - jsonWriter.writeStringField("checkpointRunId", checkpointRunId()); jsonWriter.writeJsonField("checkpointModel", checkpointModel()); + jsonWriter.writeStringField("checkpointRunId", checkpointRunId()); jsonWriter.writeBooleanField("distributed", distributed()); jsonWriter.writeBooleanField("earlyStopping", earlyStopping()); jsonWriter.writeNumberField("earlyStoppingDelay", earlyStoppingDelay()); jsonWriter.writeNumberField("earlyStoppingPatience", earlyStoppingPatience()); - jsonWriter.writeNumberField("evaluationFrequency", evaluationFrequency()); jsonWriter.writeBooleanField("enableOnnxNormalization", enableOnnxNormalization()); + jsonWriter.writeNumberField("evaluationFrequency", evaluationFrequency()); jsonWriter.writeNumberField("gradientAccumulationStep", gradientAccumulationStep()); jsonWriter.writeNumberField("layersToFreeze", layersToFreeze()); jsonWriter.writeNumberField("learningRate", learningRate()); @@ -492,11 +494,11 @@ public static ImageModelSettingsClassification fromJson(JsonReader jsonReader) t String fieldName = reader.getFieldName(); reader.nextToken(); - if ("amsGradient".equals(fieldName)) { + if ("advancedSettings".equals(fieldName)) { + deserializedImageModelSettingsClassification.withAdvancedSettings(reader.getString()); + } else if ("amsGradient".equals(fieldName)) { deserializedImageModelSettingsClassification .withAmsGradient(reader.getNullable(JsonReader::getBoolean)); - } else if ("advancedSettings".equals(fieldName)) { - deserializedImageModelSettingsClassification.withAdvancedSettings(reader.getString()); } else if ("augmentations".equals(fieldName)) { deserializedImageModelSettingsClassification.withAugmentations(reader.getString()); } else if ("beta1".equals(fieldName)) { @@ -506,11 +508,11 @@ public static ImageModelSettingsClassification fromJson(JsonReader jsonReader) t } else if ("checkpointFrequency".equals(fieldName)) { deserializedImageModelSettingsClassification .withCheckpointFrequency(reader.getNullable(JsonReader::getInt)); - } else if ("checkpointRunId".equals(fieldName)) { - deserializedImageModelSettingsClassification.withCheckpointRunId(reader.getString()); } else if ("checkpointModel".equals(fieldName)) { deserializedImageModelSettingsClassification .withCheckpointModel(MLFlowModelJobInput.fromJson(reader)); + } else if ("checkpointRunId".equals(fieldName)) { + deserializedImageModelSettingsClassification.withCheckpointRunId(reader.getString()); } else if ("distributed".equals(fieldName)) { deserializedImageModelSettingsClassification .withDistributed(reader.getNullable(JsonReader::getBoolean)); @@ -523,12 +525,12 @@ public static ImageModelSettingsClassification fromJson(JsonReader jsonReader) t } else if ("earlyStoppingPatience".equals(fieldName)) { deserializedImageModelSettingsClassification .withEarlyStoppingPatience(reader.getNullable(JsonReader::getInt)); - } else if ("evaluationFrequency".equals(fieldName)) { - deserializedImageModelSettingsClassification - .withEvaluationFrequency(reader.getNullable(JsonReader::getInt)); } else if ("enableOnnxNormalization".equals(fieldName)) { deserializedImageModelSettingsClassification .withEnableOnnxNormalization(reader.getNullable(JsonReader::getBoolean)); + } else if ("evaluationFrequency".equals(fieldName)) { + deserializedImageModelSettingsClassification + .withEvaluationFrequency(reader.getNullable(JsonReader::getInt)); } else if ("gradientAccumulationStep".equals(fieldName)) { deserializedImageModelSettingsClassification .withGradientAccumulationStep(reader.getNullable(JsonReader::getInt)); 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 6ff6a94d99ca1..2fb882174f48c 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 @@ -415,8 +415,8 @@ public ImageModelSettingsObjectDetection withValidationMetricType(ValidationMetr * {@inheritDoc} */ @Override - public ImageModelSettingsObjectDetection withAmsGradient(Boolean amsGradient) { - super.withAmsGradient(amsGradient); + public ImageModelSettingsObjectDetection withAdvancedSettings(String advancedSettings) { + super.withAdvancedSettings(advancedSettings); return this; } @@ -424,8 +424,8 @@ public ImageModelSettingsObjectDetection withAmsGradient(Boolean amsGradient) { * {@inheritDoc} */ @Override - public ImageModelSettingsObjectDetection withAdvancedSettings(String advancedSettings) { - super.withAdvancedSettings(advancedSettings); + public ImageModelSettingsObjectDetection withAmsGradient(Boolean amsGradient) { + super.withAmsGradient(amsGradient); return this; } @@ -469,8 +469,8 @@ public ImageModelSettingsObjectDetection withCheckpointFrequency(Integer checkpo * {@inheritDoc} */ @Override - public ImageModelSettingsObjectDetection withCheckpointRunId(String checkpointRunId) { - super.withCheckpointRunId(checkpointRunId); + public ImageModelSettingsObjectDetection withCheckpointModel(MLFlowModelJobInput checkpointModel) { + super.withCheckpointModel(checkpointModel); return this; } @@ -478,8 +478,8 @@ public ImageModelSettingsObjectDetection withCheckpointRunId(String checkpointRu * {@inheritDoc} */ @Override - public ImageModelSettingsObjectDetection withCheckpointModel(MLFlowModelJobInput checkpointModel) { - super.withCheckpointModel(checkpointModel); + public ImageModelSettingsObjectDetection withCheckpointRunId(String checkpointRunId) { + super.withCheckpointRunId(checkpointRunId); return this; } @@ -523,8 +523,8 @@ public ImageModelSettingsObjectDetection withEarlyStoppingPatience(Integer early * {@inheritDoc} */ @Override - public ImageModelSettingsObjectDetection withEvaluationFrequency(Integer evaluationFrequency) { - super.withEvaluationFrequency(evaluationFrequency); + public ImageModelSettingsObjectDetection withEnableOnnxNormalization(Boolean enableOnnxNormalization) { + super.withEnableOnnxNormalization(enableOnnxNormalization); return this; } @@ -532,8 +532,8 @@ public ImageModelSettingsObjectDetection withEvaluationFrequency(Integer evaluat * {@inheritDoc} */ @Override - public ImageModelSettingsObjectDetection withEnableOnnxNormalization(Boolean enableOnnxNormalization) { - super.withEnableOnnxNormalization(enableOnnxNormalization); + public ImageModelSettingsObjectDetection withEvaluationFrequency(Integer evaluationFrequency) { + super.withEvaluationFrequency(evaluationFrequency); return this; } @@ -706,7 +706,9 @@ public ImageModelSettingsObjectDetection withWeightDecay(Float weightDecay) { */ @Override public void validate() { - super.validate(); + if (checkpointModel() != null) { + checkpointModel().validate(); + } } /** @@ -715,20 +717,20 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("amsGradient", amsGradient()); jsonWriter.writeStringField("advancedSettings", advancedSettings()); + jsonWriter.writeBooleanField("amsGradient", amsGradient()); jsonWriter.writeStringField("augmentations", augmentations()); jsonWriter.writeNumberField("beta1", beta1()); jsonWriter.writeNumberField("beta2", beta2()); jsonWriter.writeNumberField("checkpointFrequency", checkpointFrequency()); - jsonWriter.writeStringField("checkpointRunId", checkpointRunId()); jsonWriter.writeJsonField("checkpointModel", checkpointModel()); + jsonWriter.writeStringField("checkpointRunId", checkpointRunId()); jsonWriter.writeBooleanField("distributed", distributed()); jsonWriter.writeBooleanField("earlyStopping", earlyStopping()); jsonWriter.writeNumberField("earlyStoppingDelay", earlyStoppingDelay()); jsonWriter.writeNumberField("earlyStoppingPatience", earlyStoppingPatience()); - jsonWriter.writeNumberField("evaluationFrequency", evaluationFrequency()); jsonWriter.writeBooleanField("enableOnnxNormalization", enableOnnxNormalization()); + jsonWriter.writeNumberField("evaluationFrequency", evaluationFrequency()); jsonWriter.writeNumberField("gradientAccumulationStep", gradientAccumulationStep()); jsonWriter.writeNumberField("layersToFreeze", layersToFreeze()); jsonWriter.writeNumberField("learningRate", learningRate()); @@ -781,11 +783,11 @@ public static ImageModelSettingsObjectDetection fromJson(JsonReader jsonReader) String fieldName = reader.getFieldName(); reader.nextToken(); - if ("amsGradient".equals(fieldName)) { + if ("advancedSettings".equals(fieldName)) { + deserializedImageModelSettingsObjectDetection.withAdvancedSettings(reader.getString()); + } else if ("amsGradient".equals(fieldName)) { deserializedImageModelSettingsObjectDetection .withAmsGradient(reader.getNullable(JsonReader::getBoolean)); - } else if ("advancedSettings".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection.withAdvancedSettings(reader.getString()); } else if ("augmentations".equals(fieldName)) { deserializedImageModelSettingsObjectDetection.withAugmentations(reader.getString()); } else if ("beta1".equals(fieldName)) { @@ -795,11 +797,11 @@ public static ImageModelSettingsObjectDetection fromJson(JsonReader jsonReader) } else if ("checkpointFrequency".equals(fieldName)) { deserializedImageModelSettingsObjectDetection .withCheckpointFrequency(reader.getNullable(JsonReader::getInt)); - } else if ("checkpointRunId".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection.withCheckpointRunId(reader.getString()); } else if ("checkpointModel".equals(fieldName)) { deserializedImageModelSettingsObjectDetection .withCheckpointModel(MLFlowModelJobInput.fromJson(reader)); + } else if ("checkpointRunId".equals(fieldName)) { + deserializedImageModelSettingsObjectDetection.withCheckpointRunId(reader.getString()); } else if ("distributed".equals(fieldName)) { deserializedImageModelSettingsObjectDetection .withDistributed(reader.getNullable(JsonReader::getBoolean)); @@ -812,12 +814,12 @@ public static ImageModelSettingsObjectDetection fromJson(JsonReader jsonReader) } else if ("earlyStoppingPatience".equals(fieldName)) { deserializedImageModelSettingsObjectDetection .withEarlyStoppingPatience(reader.getNullable(JsonReader::getInt)); - } else if ("evaluationFrequency".equals(fieldName)) { - deserializedImageModelSettingsObjectDetection - .withEvaluationFrequency(reader.getNullable(JsonReader::getInt)); } else if ("enableOnnxNormalization".equals(fieldName)) { deserializedImageModelSettingsObjectDetection .withEnableOnnxNormalization(reader.getNullable(JsonReader::getBoolean)); + } else if ("evaluationFrequency".equals(fieldName)) { + deserializedImageModelSettingsObjectDetection + .withEvaluationFrequency(reader.getNullable(JsonReader::getInt)); } else if ("gradientAccumulationStep".equals(fieldName)) { deserializedImageModelSettingsObjectDetection .withGradientAccumulationStep(reader.getNullable(JsonReader::getInt)); 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 99f1efb1404ad..5173f12da2031 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 @@ -237,8 +237,8 @@ public ImageObjectDetection withLogVerbosity(LogVerbosity logVerbosity) { * {@inheritDoc} */ @Override - public ImageObjectDetection withTrainingData(MLTableJobInput trainingData) { - super.withTrainingData(trainingData); + public ImageObjectDetection withTargetColumnName(String targetColumnName) { + super.withTargetColumnName(targetColumnName); return this; } @@ -246,8 +246,8 @@ public ImageObjectDetection withTrainingData(MLTableJobInput trainingData) { * {@inheritDoc} */ @Override - public ImageObjectDetection withTargetColumnName(String targetColumnName) { - super.withTargetColumnName(targetColumnName); + public ImageObjectDetection withTrainingData(MLTableJobInput trainingData) { + super.withTrainingData(trainingData); return this; } @@ -258,7 +258,6 @@ public ImageObjectDetection withTargetColumnName(String targetColumnName) { */ @Override public void validate() { - super.validate(); if (modelSettings() != null) { modelSettings().validate(); } @@ -278,6 +277,13 @@ public void validate() { if (validationData() != null) { validationData().validate(); } + if (trainingData() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property trainingData in model ImageObjectDetection")); + } else { + trainingData().validate(); + } } private static final ClientLogger LOGGER = new ClientLogger(ImageObjectDetection.class); 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 23d39931454c9..0642a07a57591 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 @@ -5,6 +5,7 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -117,15 +118,29 @@ public ImageObjectDetectionBase withValidationDataSize(Double validationDataSize */ @Override public void validate() { - super.validate(); if (modelSettings() != null) { modelSettings().validate(); } if (searchSpace() != null) { searchSpace().forEach(e -> e.validate()); } + if (limitSettings() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property limitSettings in model ImageObjectDetectionBase")); + } else { + limitSettings().validate(); + } + if (sweepSettings() != null) { + sweepSettings().validate(); + } + if (validationData() != null) { + validationData().validate(); + } } + private static final ClientLogger LOGGER = new ClientLogger(ImageObjectDetectionBase.class); + /** * {@inheritDoc} */ diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageSweepSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageSweepSettings.java index cbe5ebe1e8015..2fa1ef673c3b8 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageSweepSettings.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageSweepSettings.java @@ -18,14 +18,14 @@ @Fluent public final class ImageSweepSettings implements JsonSerializable { /* - * [Required] Type of the hyperparameter sampling algorithms. + * Type of early termination policy. */ - private SamplingAlgorithmType samplingAlgorithm; + private EarlyTerminationPolicy earlyTermination; /* - * Type of early termination policy. + * [Required] Type of the hyperparameter sampling algorithms. */ - private EarlyTerminationPolicy earlyTermination; + private SamplingAlgorithmType samplingAlgorithm; /** * Creates an instance of ImageSweepSettings class. @@ -34,42 +34,42 @@ public ImageSweepSettings() { } /** - * Get the samplingAlgorithm property: [Required] Type of the hyperparameter sampling algorithms. + * Get the earlyTermination property: Type of early termination policy. * - * @return the samplingAlgorithm value. + * @return the earlyTermination value. */ - public SamplingAlgorithmType samplingAlgorithm() { - return this.samplingAlgorithm; + public EarlyTerminationPolicy earlyTermination() { + return this.earlyTermination; } /** - * Set the samplingAlgorithm property: [Required] Type of the hyperparameter sampling algorithms. + * Set the earlyTermination property: Type of early termination policy. * - * @param samplingAlgorithm the samplingAlgorithm value to set. + * @param earlyTermination the earlyTermination value to set. * @return the ImageSweepSettings object itself. */ - public ImageSweepSettings withSamplingAlgorithm(SamplingAlgorithmType samplingAlgorithm) { - this.samplingAlgorithm = samplingAlgorithm; + public ImageSweepSettings withEarlyTermination(EarlyTerminationPolicy earlyTermination) { + this.earlyTermination = earlyTermination; return this; } /** - * Get the earlyTermination property: Type of early termination policy. + * Get the samplingAlgorithm property: [Required] Type of the hyperparameter sampling algorithms. * - * @return the earlyTermination value. + * @return the samplingAlgorithm value. */ - public EarlyTerminationPolicy earlyTermination() { - return this.earlyTermination; + public SamplingAlgorithmType samplingAlgorithm() { + return this.samplingAlgorithm; } /** - * Set the earlyTermination property: Type of early termination policy. + * Set the samplingAlgorithm property: [Required] Type of the hyperparameter sampling algorithms. * - * @param earlyTermination the earlyTermination value to set. + * @param samplingAlgorithm the samplingAlgorithm value to set. * @return the ImageSweepSettings object itself. */ - public ImageSweepSettings withEarlyTermination(EarlyTerminationPolicy earlyTermination) { - this.earlyTermination = earlyTermination; + public ImageSweepSettings withSamplingAlgorithm(SamplingAlgorithmType samplingAlgorithm) { + this.samplingAlgorithm = samplingAlgorithm; return this; } @@ -79,14 +79,14 @@ public ImageSweepSettings withEarlyTermination(EarlyTerminationPolicy earlyTermi * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (earlyTermination() != null) { + earlyTermination().validate(); + } if (samplingAlgorithm() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( "Missing required property samplingAlgorithm in model ImageSweepSettings")); } - if (earlyTermination() != null) { - earlyTermination().validate(); - } } private static final ClientLogger LOGGER = new ClientLogger(ImageSweepSettings.class); diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageType.java index ae3c83ed0d012..10e3f551fe02b 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageType.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageType.java @@ -10,7 +10,8 @@ /** * Type of the image * - * Type of the image. Possible values are: docker - For docker images. azureml - For AzureML images. + * Type of the image. Possible values are: docker - For docker images. azureml - For AzureML Environment images (custom + * and curated). */ public final class ImageType extends ExpandableStringEnum { /** 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 index 48f9ec428282d..4377a4a37a9cf 100644 --- 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 @@ -17,14 +17,14 @@ @Fluent public final class IndexColumn implements JsonSerializable { /* - * Specifies the data type + * Specifies the column name */ - private FeatureDataType dataType; + private String columnName; /* - * Specifies the column name + * Specifies the data type */ - private String columnName; + private FeatureDataType dataType; /** * Creates an instance of IndexColumn class. @@ -33,42 +33,42 @@ public IndexColumn() { } /** - * Get the dataType property: Specifies the data type. + * Get the columnName property: Specifies the column name. * - * @return the dataType value. + * @return the columnName value. */ - public FeatureDataType dataType() { - return this.dataType; + public String columnName() { + return this.columnName; } /** - * Set the dataType property: Specifies the data type. + * Set the columnName property: Specifies the column name. * - * @param dataType the dataType value to set. + * @param columnName the columnName value to set. * @return the IndexColumn object itself. */ - public IndexColumn withDataType(FeatureDataType dataType) { - this.dataType = dataType; + public IndexColumn withColumnName(String columnName) { + this.columnName = columnName; return this; } /** - * Get the columnName property: Specifies the column name. + * Get the dataType property: Specifies the data type. * - * @return the columnName value. + * @return the dataType value. */ - public String columnName() { - return this.columnName; + public FeatureDataType dataType() { + return this.dataType; } /** - * Set the columnName property: Specifies the column name. + * Set the dataType property: Specifies the data type. * - * @param columnName the columnName value to set. + * @param dataType the dataType value to set. * @return the IndexColumn object itself. */ - public IndexColumn withColumnName(String columnName) { - this.columnName = columnName; + public IndexColumn withDataType(FeatureDataType dataType) { + this.dataType = dataType; return this; } @@ -86,8 +86,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dataType", this.dataType == null ? null : this.dataType.toString()); jsonWriter.writeStringField("columnName", this.columnName); + jsonWriter.writeStringField("dataType", this.dataType == null ? null : this.dataType.toString()); return jsonWriter.writeEndObject(); } @@ -106,10 +106,10 @@ public static IndexColumn fromJson(JsonReader jsonReader) throws IOException { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("dataType".equals(fieldName)) { - deserializedIndexColumn.dataType = FeatureDataType.fromString(reader.getString()); - } else if ("columnName".equals(fieldName)) { + if ("columnName".equals(fieldName)) { deserializedIndexColumn.columnName = reader.getString(); + } else if ("dataType".equals(fieldName)) { + deserializedIndexColumn.dataType = FeatureDataType.fromString(reader.getString()); } else { reader.skipChildren(); } 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..2b4c6214fd94f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceEndpointProperties.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.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * InferenceEndpoint configuration. + */ +@Fluent +public final class InferenceEndpointProperties extends PropertiesBase { + /* + * [Required] Authentication mode for the endpoint. + */ + private AuthMode authMode; + + /* + * Endpoint URI for the inference endpoint. + */ + private String endpointUri; + + /* + * [Required] Group within the same pool with which this endpoint needs to be associated with. + */ + private String groupName; + + /* + * Provisioning state for the endpoint. + */ + private PoolProvisioningState provisioningState; + + /* + * RequestConfiguration for endpoint. + */ + private RequestConfiguration requestConfiguration; + + /** + * 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 groupName property: [Required] Group within the same pool with which this endpoint needs to be associated + * with. + * + * @return the groupName value. + */ + public String groupName() { + return this.groupName; + } + + /** + * Set the groupName property: [Required] Group within the same pool with which this endpoint needs to be associated + * with. + * + * @param groupName the groupName value to set. + * @return the InferenceEndpointProperties object itself. + */ + public InferenceEndpointProperties withGroupName(String groupName) { + this.groupName = groupName; + return this; + } + + /** + * Get the provisioningState property: Provisioning state for the endpoint. + * + * @return the provisioningState value. + */ + public PoolProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the requestConfiguration property: RequestConfiguration for endpoint. + * + * @return the requestConfiguration value. + */ + public RequestConfiguration requestConfiguration() { + return this.requestConfiguration; + } + + /** + * Set the requestConfiguration property: RequestConfiguration for endpoint. + * + * @param requestConfiguration the requestConfiguration value to set. + * @return the InferenceEndpointProperties object itself. + */ + public InferenceEndpointProperties withRequestConfiguration(RequestConfiguration requestConfiguration) { + this.requestConfiguration = requestConfiguration; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public InferenceEndpointProperties withDescription(String description) { + super.withDescription(description); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public InferenceEndpointProperties withProperties(List properties) { + super.withProperties(properties); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (authMode() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property authMode in model InferenceEndpointProperties")); + } + if (groupName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property groupName in model InferenceEndpointProperties")); + } + if (requestConfiguration() != null) { + requestConfiguration().validate(); + } + if (properties() != null) { + properties().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(InferenceEndpointProperties.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("description", description()); + jsonWriter.writeArrayField("properties", properties(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("authMode", this.authMode == null ? null : this.authMode.toString()); + jsonWriter.writeStringField("groupName", this.groupName); + jsonWriter.writeJsonField("requestConfiguration", this.requestConfiguration); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InferenceEndpointProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InferenceEndpointProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the InferenceEndpointProperties. + */ + public static InferenceEndpointProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InferenceEndpointProperties deserializedInferenceEndpointProperties = new InferenceEndpointProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("description".equals(fieldName)) { + deserializedInferenceEndpointProperties.withDescription(reader.getString()); + } else if ("properties".equals(fieldName)) { + List properties + = reader.readArray(reader1 -> StringKeyValuePair.fromJson(reader1)); + deserializedInferenceEndpointProperties.withProperties(properties); + } else if ("authMode".equals(fieldName)) { + deserializedInferenceEndpointProperties.authMode = AuthMode.fromString(reader.getString()); + } else if ("groupName".equals(fieldName)) { + deserializedInferenceEndpointProperties.groupName = reader.getString(); + } else if ("endpointUri".equals(fieldName)) { + deserializedInferenceEndpointProperties.endpointUri = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedInferenceEndpointProperties.provisioningState + = PoolProvisioningState.fromString(reader.getString()); + } else if ("requestConfiguration".equals(fieldName)) { + deserializedInferenceEndpointProperties.requestConfiguration + = RequestConfiguration.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedInferenceEndpointProperties; + }); + } +} 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..94675c61c1cc8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceEndpointTrackedResourceArmPaginatedResult.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.fluent.models.InferenceEndpointInner; +import java.io.IOException; +import java.util.List; + +/** + * A paginated list of InferenceEndpoint entities. + */ +@Fluent +public final class InferenceEndpointTrackedResourceArmPaginatedResult + implements JsonSerializable { + /* + * The link to the next page of InferenceEndpoint objects. If null, there are no additional pages. + */ + private String nextLink; + + /* + * An array of objects of type InferenceEndpoint. + */ + 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()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InferenceEndpointTrackedResourceArmPaginatedResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InferenceEndpointTrackedResourceArmPaginatedResult if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the InferenceEndpointTrackedResourceArmPaginatedResult. + */ + public static InferenceEndpointTrackedResourceArmPaginatedResult fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + InferenceEndpointTrackedResourceArmPaginatedResult deserializedInferenceEndpointTrackedResourceArmPaginatedResult + = new InferenceEndpointTrackedResourceArmPaginatedResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nextLink".equals(fieldName)) { + deserializedInferenceEndpointTrackedResourceArmPaginatedResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> InferenceEndpointInner.fromJson(reader1)); + deserializedInferenceEndpointTrackedResourceArmPaginatedResult.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedInferenceEndpointTrackedResourceArmPaginatedResult; + }); + } +} 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..df685d9eee34f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroupProperties.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.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Inference group configuration. + */ +@Fluent +public final class InferenceGroupProperties extends PropertiesBase { + /* + * Gets or sets environment configuration for the inference group. Used if PoolType=ScaleUnit. + */ + private GroupEnvironmentConfiguration environmentConfiguration; + + /* + * Gets or sets model configuration for the inference group. Used if PoolType=ScaleUnit. + */ + private GroupModelConfiguration modelConfiguration; + + /* + * Gets or sets compute instance type. + */ + private String nodeSkuType; + + /* + * Provisioning state for the inference group. + */ + private PoolProvisioningState provisioningState; + + /* + * Gets or sets Scale Unit size. + */ + private Integer scaleUnitSize; + + /** + * Creates an instance of InferenceGroupProperties class. + */ + public InferenceGroupProperties() { + } + + /** + * Get the environmentConfiguration property: Gets or sets environment configuration for the inference group. Used + * if PoolType=ScaleUnit. + * + * @return the environmentConfiguration value. + */ + public GroupEnvironmentConfiguration environmentConfiguration() { + return this.environmentConfiguration; + } + + /** + * Set the environmentConfiguration property: Gets or sets environment configuration for the inference group. Used + * if PoolType=ScaleUnit. + * + * @param environmentConfiguration the environmentConfiguration value to set. + * @return the InferenceGroupProperties object itself. + */ + public InferenceGroupProperties + withEnvironmentConfiguration(GroupEnvironmentConfiguration environmentConfiguration) { + this.environmentConfiguration = environmentConfiguration; + return this; + } + + /** + * Get the modelConfiguration property: Gets or sets model configuration for the inference group. Used if + * PoolType=ScaleUnit. + * + * @return the modelConfiguration value. + */ + public GroupModelConfiguration modelConfiguration() { + return this.modelConfiguration; + } + + /** + * Set the modelConfiguration property: Gets or sets model configuration for the inference group. Used if + * PoolType=ScaleUnit. + * + * @param modelConfiguration the modelConfiguration value to set. + * @return the InferenceGroupProperties object itself. + */ + public InferenceGroupProperties withModelConfiguration(GroupModelConfiguration modelConfiguration) { + this.modelConfiguration = modelConfiguration; + return this; + } + + /** + * Get the nodeSkuType property: Gets or sets compute instance type. + * + * @return the nodeSkuType value. + */ + public String nodeSkuType() { + return this.nodeSkuType; + } + + /** + * Set the nodeSkuType property: Gets or sets compute instance type. + * + * @param nodeSkuType the nodeSkuType value to set. + * @return the InferenceGroupProperties object itself. + */ + public InferenceGroupProperties withNodeSkuType(String nodeSkuType) { + this.nodeSkuType = nodeSkuType; + return this; + } + + /** + * Get the provisioningState property: Provisioning state for the inference group. + * + * @return the provisioningState value. + */ + public PoolProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the scaleUnitSize property: Gets or sets Scale Unit size. + * + * @return the scaleUnitSize value. + */ + public Integer scaleUnitSize() { + return this.scaleUnitSize; + } + + /** + * Set the scaleUnitSize property: Gets or sets Scale Unit size. + * + * @param scaleUnitSize the scaleUnitSize value to set. + * @return the InferenceGroupProperties object itself. + */ + public InferenceGroupProperties withScaleUnitSize(Integer scaleUnitSize) { + this.scaleUnitSize = scaleUnitSize; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public InferenceGroupProperties withDescription(String description) { + super.withDescription(description); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public InferenceGroupProperties withProperties(List properties) { + super.withProperties(properties); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (environmentConfiguration() != null) { + environmentConfiguration().validate(); + } + if (modelConfiguration() != null) { + modelConfiguration().validate(); + } + if (properties() != null) { + properties().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("description", description()); + jsonWriter.writeArrayField("properties", properties(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("environmentConfiguration", this.environmentConfiguration); + jsonWriter.writeJsonField("modelConfiguration", this.modelConfiguration); + jsonWriter.writeStringField("nodeSkuType", this.nodeSkuType); + jsonWriter.writeNumberField("scaleUnitSize", this.scaleUnitSize); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InferenceGroupProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InferenceGroupProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the InferenceGroupProperties. + */ + public static InferenceGroupProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InferenceGroupProperties deserializedInferenceGroupProperties = new InferenceGroupProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("description".equals(fieldName)) { + deserializedInferenceGroupProperties.withDescription(reader.getString()); + } else if ("properties".equals(fieldName)) { + List properties + = reader.readArray(reader1 -> StringKeyValuePair.fromJson(reader1)); + deserializedInferenceGroupProperties.withProperties(properties); + } else if ("environmentConfiguration".equals(fieldName)) { + deserializedInferenceGroupProperties.environmentConfiguration + = GroupEnvironmentConfiguration.fromJson(reader); + } else if ("modelConfiguration".equals(fieldName)) { + deserializedInferenceGroupProperties.modelConfiguration = GroupModelConfiguration.fromJson(reader); + } else if ("nodeSkuType".equals(fieldName)) { + deserializedInferenceGroupProperties.nodeSkuType = reader.getString(); + } else if ("provisioningState".equals(fieldName)) { + deserializedInferenceGroupProperties.provisioningState + = PoolProvisioningState.fromString(reader.getString()); + } else if ("scaleUnitSize".equals(fieldName)) { + deserializedInferenceGroupProperties.scaleUnitSize = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedInferenceGroupProperties; + }); + } +} 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..de8ec0dbb9908 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroupTrackedResourceArmPaginatedResult.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.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.fluent.models.InferenceGroupInner; +import java.io.IOException; +import java.util.List; + +/** + * A paginated list of InferenceGroup entities. + */ +@Fluent +public final class InferenceGroupTrackedResourceArmPaginatedResult + implements JsonSerializable { + /* + * The link to the next page of InferenceGroup objects. If null, there are no additional pages. + */ + private String nextLink; + + /* + * An array of objects of type InferenceGroup. + */ + 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()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InferenceGroupTrackedResourceArmPaginatedResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InferenceGroupTrackedResourceArmPaginatedResult if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the InferenceGroupTrackedResourceArmPaginatedResult. + */ + public static InferenceGroupTrackedResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InferenceGroupTrackedResourceArmPaginatedResult deserializedInferenceGroupTrackedResourceArmPaginatedResult + = new InferenceGroupTrackedResourceArmPaginatedResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nextLink".equals(fieldName)) { + deserializedInferenceGroupTrackedResourceArmPaginatedResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> InferenceGroupInner.fromJson(reader1)); + deserializedInferenceGroupTrackedResourceArmPaginatedResult.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedInferenceGroupTrackedResourceArmPaginatedResult; + }); + } +} 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..8bd0daa016f31 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceGroups.java @@ -0,0 +1,318 @@ +// Copyright (c) Microsoft Corporation. All rights 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 status of delta models associated with the InferenceGroup and the target base model. + * + * @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 DeltaModelBaseRequest. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return contract returning to user the delta models along with {@link Response}. + */ + Response getDeltaModelsStatusAsyncWithResponse(String resourceGroupName, + String workspaceName, String poolName, String groupName, DeltaModelStatusRequest body, Context context); + + /** + * Retrieve status of delta models associated with the InferenceGroup and the target base model. + * + * @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 DeltaModelBaseRequest. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return contract returning to user the delta models. + */ + DeltaModelStatusResponse getDeltaModelsStatusAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName, DeltaModelStatusRequest body); + + /** + * List delta models associated with the InferenceGroup and the target base model. + * + * @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 DeltaModelBaseRequest. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of String entities as paginated response with {@link PagedIterable}. + */ + PagedIterable listDeltaModelsAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName, DeltaModelListRequest body); + + /** + * List delta models associated with the InferenceGroup and the target base model. + * + * @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 DeltaModelBaseRequest. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of String entities as paginated response with {@link PagedIterable}. + */ + PagedIterable listDeltaModelsAsync(String resourceGroupName, String workspaceName, String poolName, + String groupName, DeltaModelListRequest body, Context context); + + /** + * Modify delta models associated with the InferenceGroup and the target base model. + * + * @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 DeltaModelModifyRequest. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 modifyDeltaModelsAsync(String resourceGroupName, String workspaceName, String poolName, String groupName, + DeltaModelModifyRequest body); + + /** + * Modify delta models associated with the InferenceGroup and the target base model. + * + * @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 DeltaModelModifyRequest. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 modifyDeltaModelsAsync(String resourceGroupName, String workspaceName, String poolName, String groupName, + DeltaModelModifyRequest 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}. + */ + 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..7746c4b4769a0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePool.java @@ -0,0 +1,345 @@ +// Copyright (c) Microsoft Corporation. All rights 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.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); +} 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..a595520b8fe8a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePoolProperties.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.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Inference pool configuration. + */ +@Fluent +public final class InferencePoolProperties extends PropertiesBase { + /* + * Provisioning state for the pool. + */ + private PoolProvisioningState provisioningState; + + /* + * Gets or sets ScaleUnitConfiguration for the inference pool. Used if PoolType=ScaleUnit. + */ + private ScaleUnitConfiguration scaleUnitConfiguration; + + /** + * Creates an instance of InferencePoolProperties class. + */ + public InferencePoolProperties() { + } + + /** + * Get the provisioningState property: Provisioning state for the pool. + * + * @return the provisioningState value. + */ + public PoolProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the scaleUnitConfiguration property: Gets or sets ScaleUnitConfiguration for the inference pool. Used if + * PoolType=ScaleUnit. + * + * @return the scaleUnitConfiguration value. + */ + public ScaleUnitConfiguration scaleUnitConfiguration() { + return this.scaleUnitConfiguration; + } + + /** + * Set the scaleUnitConfiguration property: Gets or sets ScaleUnitConfiguration for the inference pool. Used if + * PoolType=ScaleUnit. + * + * @param scaleUnitConfiguration the scaleUnitConfiguration value to set. + * @return the InferencePoolProperties object itself. + */ + public InferencePoolProperties withScaleUnitConfiguration(ScaleUnitConfiguration scaleUnitConfiguration) { + this.scaleUnitConfiguration = scaleUnitConfiguration; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public InferencePoolProperties withDescription(String description) { + super.withDescription(description); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public InferencePoolProperties withProperties(List properties) { + super.withProperties(properties); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (scaleUnitConfiguration() != null) { + scaleUnitConfiguration().validate(); + } + if (properties() != null) { + properties().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("description", description()); + jsonWriter.writeArrayField("properties", properties(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("scaleUnitConfiguration", this.scaleUnitConfiguration); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InferencePoolProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InferencePoolProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the InferencePoolProperties. + */ + public static InferencePoolProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InferencePoolProperties deserializedInferencePoolProperties = new InferencePoolProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("description".equals(fieldName)) { + deserializedInferencePoolProperties.withDescription(reader.getString()); + } else if ("properties".equals(fieldName)) { + List properties + = reader.readArray(reader1 -> StringKeyValuePair.fromJson(reader1)); + deserializedInferencePoolProperties.withProperties(properties); + } else if ("provisioningState".equals(fieldName)) { + deserializedInferencePoolProperties.provisioningState + = PoolProvisioningState.fromString(reader.getString()); + } else if ("scaleUnitConfiguration".equals(fieldName)) { + deserializedInferencePoolProperties.scaleUnitConfiguration + = ScaleUnitConfiguration.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedInferencePoolProperties; + }); + } +} 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..8ef5de0c7cf24 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePoolTrackedResourceArmPaginatedResult.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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.fluent.models.InferencePoolInner; +import java.io.IOException; +import java.util.List; + +/** + * A paginated list of InferencePool entities. + */ +@Fluent +public final class InferencePoolTrackedResourceArmPaginatedResult + implements JsonSerializable { + /* + * The link to the next page of InferencePool objects. If null, there are no additional pages. + */ + private String nextLink; + + /* + * An array of objects of type InferencePool. + */ + 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()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of InferencePoolTrackedResourceArmPaginatedResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of InferencePoolTrackedResourceArmPaginatedResult if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the InferencePoolTrackedResourceArmPaginatedResult. + */ + public static InferencePoolTrackedResourceArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + InferencePoolTrackedResourceArmPaginatedResult deserializedInferencePoolTrackedResourceArmPaginatedResult + = new InferencePoolTrackedResourceArmPaginatedResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nextLink".equals(fieldName)) { + deserializedInferencePoolTrackedResourceArmPaginatedResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> InferencePoolInner.fromJson(reader1)); + deserializedInferencePoolTrackedResourceArmPaginatedResult.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedInferencePoolTrackedResourceArmPaginatedResult; + }); + } +} 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..edbdb93b2b61a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferencePools.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.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); + + /** + * 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/IpRule.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IpRule.java new file mode 100644 index 0000000000000..5f66de33e12e5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IpRule.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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Contains an IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) or '124.56.78.0/24' (all + * addresses that start with 124.56.78). Value could be 'Allow' or 'Deny'. + */ +@Fluent +public final class IpRule implements JsonSerializable { + /* + * An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) or '124.56.78.0/24' (all + * addresses that start with 124.56.78). Value could be 'Allow' or 'Deny'. + */ + private String value; + + /** + * Creates an instance of IpRule class. + */ + public IpRule() { + } + + /** + * Get the value property: An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) or + * '124.56.78.0/24' (all addresses that start with 124.56.78). Value could be 'Allow' or 'Deny'. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) or + * '124.56.78.0/24' (all addresses that start with 124.56.78). Value could be 'Allow' or 'Deny'. + * + * @param value the value value to set. + * @return the IpRule object itself. + */ + public IpRule withValue(String value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("value", this.value); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IpRule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IpRule if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IOException If an error occurs while reading the IpRule. + */ + public static IpRule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IpRule deserializedIpRule = new IpRule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + deserializedIpRule.value = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedIpRule; + }); + } +} 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 4ef82aaabab8d..7803f97687ae2 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 @@ -22,30 +22,30 @@ public class JobBaseProperties extends ResourceBase { private JobType jobType = JobType.fromString("JobBaseProperties"); /* - * Display name of job. + * ARM resource ID of the component resource. */ - private String displayName; + private String componentId; /* - * Status of the job. + * ARM resource ID of the compute resource. */ - private JobStatus status; + private String computeId; /* - * The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. + * Display name of job. */ - private String experimentName; + private String displayName; /* - * List of JobEndpoints. - * For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + * The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. */ - private Map services; + private String experimentName; /* - * ARM resource ID of the compute resource. + * Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. + * Defaults to AmlToken if null. */ - private String computeId; + private IdentityConfiguration identity; /* * Is the asset archived? @@ -53,20 +53,25 @@ public class JobBaseProperties extends ResourceBase { private Boolean isArchived; /* - * Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. - * Defaults to AmlToken if null. + * Notification setting for the job */ - private IdentityConfiguration identity; + private NotificationSetting notificationSetting; /* - * ARM resource ID of the component resource. + * Parent job name. */ - private String componentId; + private String parentJobName; /* - * Notification setting for the job + * List of JobEndpoints. + * For local jobs, a job endpoint will have an endpoint value of FileStreamObject. */ - private NotificationSetting notificationSetting; + private Map services; + + /* + * Status of the job. + */ + private JobStatus status; /** * Creates an instance of JobBaseProperties class. @@ -84,42 +89,62 @@ public JobType jobType() { } /** - * Get the displayName property: Display name of job. + * Get the componentId property: ARM resource ID of the component resource. * - * @return the displayName value. + * @return the componentId value. */ - public String displayName() { - return this.displayName; + public String componentId() { + return this.componentId; } /** - * Set the displayName property: Display name of job. + * Set the componentId property: ARM resource ID of the component resource. * - * @param displayName the displayName value to set. + * @param componentId the componentId value to set. * @return the JobBaseProperties object itself. */ - public JobBaseProperties withDisplayName(String displayName) { - this.displayName = displayName; + public JobBaseProperties withComponentId(String componentId) { + this.componentId = componentId; return this; } /** - * Get the status property: Status of the job. + * Get the computeId property: ARM resource ID of the compute resource. * - * @return the status value. + * @return the computeId value. */ - public JobStatus status() { - return this.status; + public String computeId() { + return this.computeId; } /** - * Set the status property: Status of the job. + * Set the computeId property: ARM resource ID of the compute resource. * - * @param status the status value to set. + * @param computeId the computeId value to set. * @return the JobBaseProperties object itself. */ - JobBaseProperties withStatus(JobStatus status) { - this.status = status; + public JobBaseProperties withComputeId(String computeId) { + this.computeId = computeId; + return this; + } + + /** + * Get the displayName property: Display name of job. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: Display name of job. + * + * @param displayName the displayName value to set. + * @return the JobBaseProperties object itself. + */ + public JobBaseProperties withDisplayName(String displayName) { + this.displayName = displayName; return this; } @@ -146,128 +171,128 @@ public JobBaseProperties withExperimentName(String experimentName) { } /** - * Get the services property: List of JobEndpoints. - * For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + * Get the identity property: Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, + * UserIdentity or null. + * Defaults to AmlToken if null. * - * @return the services value. + * @return the identity value. */ - public Map services() { - return this.services; + public IdentityConfiguration identity() { + return this.identity; } /** - * Set the services property: List of JobEndpoints. - * For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + * Set the identity property: Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, + * UserIdentity or null. + * Defaults to AmlToken if null. * - * @param services the services value to set. + * @param identity the identity value to set. * @return the JobBaseProperties object itself. */ - public JobBaseProperties withServices(Map services) { - this.services = services; + public JobBaseProperties withIdentity(IdentityConfiguration identity) { + this.identity = identity; return this; } /** - * Get the computeId property: ARM resource ID of the compute resource. + * Get the isArchived property: Is the asset archived?. * - * @return the computeId value. + * @return the isArchived value. */ - public String computeId() { - return this.computeId; + public Boolean isArchived() { + return this.isArchived; } /** - * Set the computeId property: ARM resource ID of the compute resource. + * Set the isArchived property: Is the asset archived?. * - * @param computeId the computeId value to set. + * @param isArchived the isArchived value to set. * @return the JobBaseProperties object itself. */ - public JobBaseProperties withComputeId(String computeId) { - this.computeId = computeId; + public JobBaseProperties withIsArchived(Boolean isArchived) { + this.isArchived = isArchived; return this; } /** - * Get the isArchived property: Is the asset archived?. + * Get the notificationSetting property: Notification setting for the job. * - * @return the isArchived value. + * @return the notificationSetting value. */ - public Boolean isArchived() { - return this.isArchived; + public NotificationSetting notificationSetting() { + return this.notificationSetting; } /** - * Set the isArchived property: Is the asset archived?. + * Set the notificationSetting property: Notification setting for the job. * - * @param isArchived the isArchived value to set. + * @param notificationSetting the notificationSetting value to set. * @return the JobBaseProperties object itself. */ - public JobBaseProperties withIsArchived(Boolean isArchived) { - this.isArchived = isArchived; + public JobBaseProperties withNotificationSetting(NotificationSetting notificationSetting) { + this.notificationSetting = notificationSetting; return this; } /** - * Get the identity property: Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, - * UserIdentity or null. - * Defaults to AmlToken if null. + * Get the parentJobName property: Parent job name. * - * @return the identity value. + * @return the parentJobName value. */ - public IdentityConfiguration identity() { - return this.identity; + public String parentJobName() { + return this.parentJobName; } /** - * Set the identity property: Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, - * UserIdentity or null. - * Defaults to AmlToken if null. + * Set the parentJobName property: Parent job name. * - * @param identity the identity value to set. + * @param parentJobName the parentJobName value to set. * @return the JobBaseProperties object itself. */ - public JobBaseProperties withIdentity(IdentityConfiguration identity) { - this.identity = identity; + public JobBaseProperties withParentJobName(String parentJobName) { + this.parentJobName = parentJobName; return this; } /** - * Get the componentId property: ARM resource ID of the component resource. + * Get the services property: List of JobEndpoints. + * For local jobs, a job endpoint will have an endpoint value of FileStreamObject. * - * @return the componentId value. + * @return the services value. */ - public String componentId() { - return this.componentId; + public Map services() { + return this.services; } /** - * Set the componentId property: ARM resource ID of the component resource. + * Set the services property: List of JobEndpoints. + * For local jobs, a job endpoint will have an endpoint value of FileStreamObject. * - * @param componentId the componentId value to set. + * @param services the services value to set. * @return the JobBaseProperties object itself. */ - public JobBaseProperties withComponentId(String componentId) { - this.componentId = componentId; + public JobBaseProperties withServices(Map services) { + this.services = services; return this; } /** - * Get the notificationSetting property: Notification setting for the job. + * Get the status property: Status of the job. * - * @return the notificationSetting value. + * @return the status value. */ - public NotificationSetting notificationSetting() { - return this.notificationSetting; + public JobStatus status() { + return this.status; } /** - * Set the notificationSetting property: Notification setting for the job. + * Set the status property: Status of the job. * - * @param notificationSetting the notificationSetting value to set. + * @param status the status value to set. * @return the JobBaseProperties object itself. */ - public JobBaseProperties withNotificationSetting(NotificationSetting notificationSetting) { - this.notificationSetting = notificationSetting; + JobBaseProperties withStatus(JobStatus status) { + this.status = status; return this; } @@ -284,8 +309,8 @@ public JobBaseProperties withDescription(String description) { * {@inheritDoc} */ @Override - public JobBaseProperties withTags(Map tags) { - super.withTags(tags); + public JobBaseProperties withProperties(Map properties) { + super.withProperties(properties); return this; } @@ -293,8 +318,8 @@ public JobBaseProperties withTags(Map tags) { * {@inheritDoc} */ @Override - public JobBaseProperties withProperties(Map properties) { - super.withProperties(properties); + public JobBaseProperties withTags(Map tags) { + super.withTags(tags); return this; } @@ -305,7 +330,12 @@ public JobBaseProperties withProperties(Map properties) { */ @Override public void validate() { - super.validate(); + if (identity() != null) { + identity().validate(); + } + if (notificationSetting() != null) { + notificationSetting().validate(); + } if (services() != null) { services().values().forEach(e -> { if (e != null) { @@ -313,12 +343,6 @@ public void validate() { } }); } - if (identity() != null) { - identity().validate(); - } - if (notificationSetting() != null) { - notificationSetting().validate(); - } } /** @@ -328,17 +352,18 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); + jsonWriter.writeStringField("componentId", this.componentId); + jsonWriter.writeStringField("computeId", this.computeId); jsonWriter.writeStringField("displayName", this.displayName); jsonWriter.writeStringField("experimentName", this.experimentName); - jsonWriter.writeMapField("services", this.services, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("computeId", this.computeId); - jsonWriter.writeBooleanField("isArchived", this.isArchived); jsonWriter.writeJsonField("identity", this.identity); - jsonWriter.writeStringField("componentId", this.componentId); + jsonWriter.writeBooleanField("isArchived", this.isArchived); jsonWriter.writeJsonField("notificationSetting", this.notificationSetting); + jsonWriter.writeStringField("parentJobName", this.parentJobName); + jsonWriter.writeMapField("services", this.services, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -370,6 +395,8 @@ public static JobBaseProperties fromJson(JsonReader jsonReader) throws IOExcepti return AutoMLJob.fromJson(readerToUse.reset()); } else if ("Command".equals(discriminatorValue)) { return CommandJob.fromJson(readerToUse.reset()); + } else if ("FineTuning".equals(discriminatorValue)) { + return FineTuningJob.fromJson(readerToUse.reset()); } else if ("Pipeline".equals(discriminatorValue)) { return PipelineJob.fromJson(readerToUse.reset()); } else if ("Spark".equals(discriminatorValue)) { @@ -392,33 +419,35 @@ static JobBaseProperties fromJsonKnownDiscriminator(JsonReader jsonReader) throw if ("description".equals(fieldName)) { deserializedJobBaseProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedJobBaseProperties.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedJobBaseProperties.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedJobBaseProperties.withTags(tags); } else if ("jobType".equals(fieldName)) { deserializedJobBaseProperties.jobType = JobType.fromString(reader.getString()); + } else if ("componentId".equals(fieldName)) { + deserializedJobBaseProperties.componentId = reader.getString(); + } else if ("computeId".equals(fieldName)) { + deserializedJobBaseProperties.computeId = reader.getString(); } else if ("displayName".equals(fieldName)) { deserializedJobBaseProperties.displayName = reader.getString(); - } else if ("status".equals(fieldName)) { - deserializedJobBaseProperties.status = JobStatus.fromString(reader.getString()); } else if ("experimentName".equals(fieldName)) { deserializedJobBaseProperties.experimentName = reader.getString(); - } else if ("services".equals(fieldName)) { - Map services = reader.readMap(reader1 -> JobService.fromJson(reader1)); - deserializedJobBaseProperties.services = services; - } else if ("computeId".equals(fieldName)) { - deserializedJobBaseProperties.computeId = reader.getString(); - } else if ("isArchived".equals(fieldName)) { - deserializedJobBaseProperties.isArchived = reader.getNullable(JsonReader::getBoolean); } else if ("identity".equals(fieldName)) { deserializedJobBaseProperties.identity = IdentityConfiguration.fromJson(reader); - } else if ("componentId".equals(fieldName)) { - deserializedJobBaseProperties.componentId = reader.getString(); + } else if ("isArchived".equals(fieldName)) { + deserializedJobBaseProperties.isArchived = reader.getNullable(JsonReader::getBoolean); } else if ("notificationSetting".equals(fieldName)) { deserializedJobBaseProperties.notificationSetting = NotificationSetting.fromJson(reader); + } else if ("parentJobName".equals(fieldName)) { + deserializedJobBaseProperties.parentJobName = reader.getString(); + } else if ("services".equals(fieldName)) { + Map services = reader.readMap(reader1 -> JobService.fromJson(reader1)); + deserializedJobBaseProperties.services = services; + } else if ("status".equals(fieldName)) { + deserializedJobBaseProperties.status = JobStatus.fromString(reader.getString()); } else { reader.skipChildren(); } 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 17f54a03c1033..f506cfdd4b019 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 @@ -19,14 +19,14 @@ @Fluent public final class JobBaseResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type JobBase. + * The link to the next page of JobBase objects. If null, there are no additional pages. */ - private List value; + private String nextLink; /* - * The link to the next page of JobBase objects. If null, there are no additional pages. + * An array of objects of type JobBase. */ - private String nextLink; + private List value; /** * Creates an instance of JobBaseResourceArmPaginatedResult class. @@ -35,42 +35,42 @@ public JobBaseResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type JobBase. + * Get the nextLink property: The link to the next page of JobBase objects. If null, there are no additional pages. * - * @return the value value. + * @return the nextLink value. */ - public List value() { - return this.value; + public String nextLink() { + return this.nextLink; } /** - * Set the value property: An array of objects of type JobBase. + * Set the nextLink property: The link to the next page of JobBase objects. If null, there are no additional pages. * - * @param value the value value to set. + * @param nextLink the nextLink value to set. * @return the JobBaseResourceArmPaginatedResult object itself. */ - public JobBaseResourceArmPaginatedResult withValue(List value) { - this.value = value; + public JobBaseResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; return this; } /** - * Get the nextLink property: The link to the next page of JobBase objects. If null, there are no additional pages. + * Get the value property: An array of objects of type JobBase. * - * @return the nextLink value. + * @return the value value. */ - public String nextLink() { - return this.nextLink; + public List value() { + return this.value; } /** - * Set the nextLink property: The link to the next page of JobBase objects. If null, there are no additional pages. + * Set the value property: An array of objects of type JobBase. * - * @param nextLink the nextLink value to set. + * @param value the value value to set. * @return the JobBaseResourceArmPaginatedResult object itself. */ - public JobBaseResourceArmPaginatedResult withNextLink(String nextLink) { - this.nextLink = nextLink; + public JobBaseResourceArmPaginatedResult withValue(List value) { + this.value = value; return this; } @@ -91,8 +91,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -112,11 +112,11 @@ public static JobBaseResourceArmPaginatedResult fromJson(JsonReader jsonReader) String fieldName = reader.getFieldName(); reader.nextToken(); - if ("value".equals(fieldName)) { + if ("nextLink".equals(fieldName)) { + deserializedJobBaseResourceArmPaginatedResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> JobBaseInner.fromJson(reader1)); deserializedJobBaseResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedJobBaseResourceArmPaginatedResult.nextLink = reader.getString(); } else { reader.skipChildren(); } 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 3786fa96eb3b2..6406a9a138fcf 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 @@ -9,6 +9,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.util.List; import java.util.Map; /** @@ -16,46 +17,28 @@ */ @Fluent public final class JobResourceConfiguration extends ResourceConfiguration { - /* - * 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). - */ - private String shmSize; - /* * 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. */ private String dockerArgs; - /** - * Creates an instance of JobResourceConfiguration class. + /* + * Extra arguments to pass to the Docker run command, as a collection. 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. */ - public JobResourceConfiguration() { - } + private List dockerArgsList; - /** - * 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. + /* + * 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). */ - public String shmSize() { - return this.shmSize; - } + private 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. + * Creates an instance of JobResourceConfiguration class. */ - public JobResourceConfiguration withShmSize(String shmSize) { - this.shmSize = shmSize; - return this; + public JobResourceConfiguration() { } /** @@ -82,6 +65,54 @@ public JobResourceConfiguration withDockerArgs(String dockerArgs) { return this; } + /** + * Get the dockerArgsList property: Extra arguments to pass to the Docker run command, as a collection. 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 dockerArgsList value. + */ + public List dockerArgsList() { + return this.dockerArgsList; + } + + /** + * Set the dockerArgsList property: Extra arguments to pass to the Docker run command, as a collection. 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 dockerArgsList the dockerArgsList value to set. + * @return the JobResourceConfiguration object itself. + */ + public JobResourceConfiguration withDockerArgsList(List dockerArgsList) { + this.dockerArgsList = dockerArgsList; + return this; + } + + /** + * 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() { + return this.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. + */ + public JobResourceConfiguration withShmSize(String shmSize) { + this.shmSize = shmSize; + return this; + } + /** * {@inheritDoc} */ @@ -116,7 +147,6 @@ public JobResourceConfiguration withProperties(Map properties) { */ @Override public void validate() { - super.validate(); } /** @@ -128,8 +158,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeNumberField("instanceCount", instanceCount()); jsonWriter.writeStringField("instanceType", instanceType()); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeUntyped(element)); - jsonWriter.writeStringField("shmSize", this.shmSize); jsonWriter.writeStringField("dockerArgs", this.dockerArgs); + jsonWriter.writeArrayField("dockerArgsList", this.dockerArgsList, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("shmSize", this.shmSize); return jsonWriter.writeEndObject(); } @@ -155,10 +187,13 @@ public static JobResourceConfiguration fromJson(JsonReader jsonReader) throws IO } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.readUntyped()); deserializedJobResourceConfiguration.withProperties(properties); - } else if ("shmSize".equals(fieldName)) { - deserializedJobResourceConfiguration.shmSize = reader.getString(); } else if ("dockerArgs".equals(fieldName)) { deserializedJobResourceConfiguration.dockerArgs = reader.getString(); + } else if ("dockerArgsList".equals(fieldName)) { + List dockerArgsList = reader.readArray(reader1 -> reader1.getString()); + deserializedJobResourceConfiguration.dockerArgsList = dockerArgsList; + } else if ("shmSize".equals(fieldName)) { + deserializedJobResourceConfiguration.shmSize = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobResources.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobResources.java new file mode 100644 index 0000000000000..956f794d78762 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobResources.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The JobResources model. + */ +@Fluent +public final class JobResources implements JsonSerializable { + /* + * List of instance types to choose from. + */ + private List instanceTypes; + + /** + * Creates an instance of JobResources class. + */ + public JobResources() { + } + + /** + * Get the instanceTypes property: List of instance types to choose from. + * + * @return the instanceTypes value. + */ + public List instanceTypes() { + return this.instanceTypes; + } + + /** + * Set the instanceTypes property: List of instance types to choose from. + * + * @param instanceTypes the instanceTypes value to set. + * @return the JobResources object itself. + */ + public JobResources withInstanceTypes(List instanceTypes) { + this.instanceTypes = instanceTypes; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("instanceTypes", this.instanceTypes, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JobResources from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JobResources if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the JobResources. + */ + public static JobResources fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JobResources deserializedJobResources = new JobResources(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("instanceTypes".equals(fieldName)) { + List instanceTypes = reader.readArray(reader1 -> reader1.getString()); + deserializedJobResources.instanceTypes = instanceTypes; + } else { + reader.skipChildren(); + } + } + + return deserializedJobResources; + }); + } +} 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 9fb78f3743d19..45539b0c42edc 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 @@ -69,7 +69,6 @@ public JobScheduleAction withJobDefinition(JobBaseProperties jobDefinition) { */ @Override public void validate() { - super.validate(); if (jobDefinition() == null) { throw LOGGER.atError() .log( 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 e6374f1e1458f..1f1aee2570d86 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 @@ -18,29 +18,30 @@ @Fluent public final class JobService implements JsonSerializable { /* - * Endpoint type. + * Url for endpoint. */ - private String jobServiceType; + private String endpoint; /* - * Port for endpoint. + * Any error in the service. */ - private Integer port; + private String errorMessage; /* - * Url for endpoint. + * Endpoint type. */ - private String endpoint; + private String jobServiceType; /* - * Status of 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. */ - private String status; + private Nodes nodes; /* - * Any error in the service. + * Port for endpoint. */ - private String errorMessage; + private Integer port; /* * Additional properties to set on the endpoint. @@ -48,10 +49,9 @@ public final class JobService implements JsonSerializable { private Map properties; /* - * 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. + * Status of endpoint. */ - private Nodes nodes; + private String status; /** * Creates an instance of JobService class. @@ -60,81 +60,94 @@ public JobService() { } /** - * Get the jobServiceType property: Endpoint type. + * Get the endpoint property: Url for endpoint. * - * @return the jobServiceType value. + * @return the endpoint value. */ - public String jobServiceType() { - return this.jobServiceType; + public String endpoint() { + return this.endpoint; } /** - * Set the jobServiceType property: Endpoint type. + * Set the endpoint property: Url for endpoint. * - * @param jobServiceType the jobServiceType value to set. + * @param endpoint the endpoint value to set. * @return the JobService object itself. */ - public JobService withJobServiceType(String jobServiceType) { - this.jobServiceType = jobServiceType; + public JobService withEndpoint(String endpoint) { + this.endpoint = endpoint; return this; } /** - * Get the port property: Port for endpoint. + * Get the errorMessage property: Any error in the service. * - * @return the port value. + * @return the errorMessage value. */ - public Integer port() { - return this.port; + public String errorMessage() { + return this.errorMessage; } /** - * Set the port property: Port for endpoint. + * Get the jobServiceType property: Endpoint type. * - * @param port the port value to set. + * @return the jobServiceType value. + */ + public String jobServiceType() { + return this.jobServiceType; + } + + /** + * Set the jobServiceType property: Endpoint type. + * + * @param jobServiceType the jobServiceType value to set. * @return the JobService object itself. */ - public JobService withPort(Integer port) { - this.port = port; + public JobService withJobServiceType(String jobServiceType) { + this.jobServiceType = jobServiceType; return this; } /** - * Get the endpoint property: Url 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 endpoint value. + * @return the nodes value. */ - public String endpoint() { - return this.endpoint; + public Nodes nodes() { + return this.nodes; } /** - * Set the endpoint property: Url for endpoint. + * 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 endpoint the endpoint value to set. + * @param nodes the nodes value to set. * @return the JobService object itself. */ - public JobService withEndpoint(String endpoint) { - this.endpoint = endpoint; + public JobService withNodes(Nodes nodes) { + this.nodes = nodes; return this; } /** - * Get the status property: Status of endpoint. + * Get the port property: Port for endpoint. * - * @return the status value. + * @return the port value. */ - public String status() { - return this.status; + public Integer port() { + return this.port; } /** - * Get the errorMessage property: Any error in the service. + * Set the port property: Port for endpoint. * - * @return the errorMessage value. + * @param port the port value to set. + * @return the JobService object itself. */ - public String errorMessage() { - return this.errorMessage; + public JobService withPort(Integer port) { + this.port = port; + return this; } /** @@ -158,25 +171,12 @@ public JobService withProperties(Map properties) { } /** - * 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. + * Get the status property: Status of endpoint. * - * @param nodes the nodes value to set. - * @return the JobService object itself. + * @return the status value. */ - public JobService withNodes(Nodes nodes) { - this.nodes = nodes; - return this; + public String status() { + return this.status; } /** @@ -196,11 +196,11 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("endpoint", this.endpoint); jsonWriter.writeStringField("jobServiceType", this.jobServiceType); + jsonWriter.writeJsonField("nodes", this.nodes); jsonWriter.writeNumberField("port", this.port); - jsonWriter.writeStringField("endpoint", this.endpoint); jsonWriter.writeMapField("properties", this.properties, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("nodes", this.nodes); return jsonWriter.writeEndObject(); } @@ -219,21 +219,21 @@ public static JobService fromJson(JsonReader jsonReader) throws IOException { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("jobServiceType".equals(fieldName)) { - deserializedJobService.jobServiceType = reader.getString(); - } else if ("port".equals(fieldName)) { - deserializedJobService.port = reader.getNullable(JsonReader::getInt); - } else if ("endpoint".equals(fieldName)) { + if ("endpoint".equals(fieldName)) { deserializedJobService.endpoint = reader.getString(); - } else if ("status".equals(fieldName)) { - deserializedJobService.status = reader.getString(); } else if ("errorMessage".equals(fieldName)) { deserializedJobService.errorMessage = reader.getString(); + } else if ("jobServiceType".equals(fieldName)) { + deserializedJobService.jobServiceType = reader.getString(); + } else if ("nodes".equals(fieldName)) { + deserializedJobService.nodes = Nodes.fromJson(reader); + } else if ("port".equals(fieldName)) { + deserializedJobService.port = reader.getNullable(JsonReader::getInt); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedJobService.properties = properties; - } else if ("nodes".equals(fieldName)) { - deserializedJobService.nodes = Nodes.fromJson(reader); + } else if ("status".equals(fieldName)) { + deserializedJobService.status = reader.getString(); } else { reader.skipChildren(); } 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 9a7e0d5b6ae6c..db094bc9d706b 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 @@ -36,6 +36,11 @@ public final class JobType extends ExpandableStringEnum { */ 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. * 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..33e305561e7eb --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JupyterKernelConfig.java @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Jupyter kernel configuration. + */ +@Fluent +public final class JupyterKernelConfig implements JsonSerializable { + /* + * Argument to the the runtime + */ + private List argv; + + /* + * Display name of the kernel + */ + private String displayName; + + /* + * Language of the kernel [Example value: python] + */ + 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() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("argv", this.argv, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeStringField("language", this.language); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JupyterKernelConfig from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JupyterKernelConfig if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the JupyterKernelConfig. + */ + public static JupyterKernelConfig fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + JupyterKernelConfig deserializedJupyterKernelConfig = new JupyterKernelConfig(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("argv".equals(fieldName)) { + List argv = reader.readArray(reader1 -> reader1.getString()); + deserializedJupyterKernelConfig.argv = argv; + } else if ("displayName".equals(fieldName)) { + deserializedJupyterKernelConfig.displayName = reader.getString(); + } else if ("language".equals(fieldName)) { + deserializedJupyterKernelConfig.language = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedJupyterKernelConfig; + }); + } +} 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/KeyVaultProperties.java similarity index 55% rename from sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionKeyVaultProperties.java rename to sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KeyVaultProperties.java index f43541ede5671..b065a999a6912 100644 --- 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/KeyVaultProperties.java @@ -13,53 +13,56 @@ import java.io.IOException; /** - * The EncryptionKeyVaultProperties model. + * Customer Key vault properties. */ @Fluent -public final class EncryptionKeyVaultProperties implements JsonSerializable { +public final class KeyVaultProperties implements JsonSerializable { /* - * The ArmId of the keyVault where the customer owned encryption key is present. + * Currently, we support only SystemAssigned MSI. + * We need this when we support UserAssignedIdentities */ - private String keyVaultArmId; + private String identityClientId; /* - * Key vault uri to access the encryption key. + * KeyVault key identifier to encrypt the data */ private String keyIdentifier; /* - * For future use - The client id of the identity which will be used to access key vault. + * KeyVault Arm Id that contains the data encryption key */ - private String identityClientId; + private String keyVaultArmId; /** - * Creates an instance of EncryptionKeyVaultProperties class. + * Creates an instance of KeyVaultProperties class. */ - public EncryptionKeyVaultProperties() { + public KeyVaultProperties() { } /** - * Get the keyVaultArmId property: The ArmId of the keyVault where the customer owned encryption key is present. + * Get the identityClientId property: Currently, we support only SystemAssigned MSI. + * We need this when we support UserAssignedIdentities. * - * @return the keyVaultArmId value. + * @return the identityClientId value. */ - public String keyVaultArmId() { - return this.keyVaultArmId; + public String identityClientId() { + return this.identityClientId; } /** - * Set the keyVaultArmId property: The ArmId of the keyVault where the customer owned encryption key is present. + * Set the identityClientId property: Currently, we support only SystemAssigned MSI. + * We need this when we support UserAssignedIdentities. * - * @param keyVaultArmId the keyVaultArmId value to set. - * @return the EncryptionKeyVaultProperties object itself. + * @param identityClientId the identityClientId value to set. + * @return the KeyVaultProperties object itself. */ - public EncryptionKeyVaultProperties withKeyVaultArmId(String keyVaultArmId) { - this.keyVaultArmId = keyVaultArmId; + public KeyVaultProperties withIdentityClientId(String identityClientId) { + this.identityClientId = identityClientId; return this; } /** - * Get the keyIdentifier property: Key vault uri to access the encryption key. + * Get the keyIdentifier property: KeyVault key identifier to encrypt the data. * * @return the keyIdentifier value. */ @@ -68,35 +71,33 @@ public String keyIdentifier() { } /** - * Set the keyIdentifier property: Key vault uri to access the encryption key. + * Set the keyIdentifier property: KeyVault key identifier to encrypt the data. * * @param keyIdentifier the keyIdentifier value to set. - * @return the EncryptionKeyVaultProperties object itself. + * @return the KeyVaultProperties object itself. */ - public EncryptionKeyVaultProperties withKeyIdentifier(String keyIdentifier) { + public KeyVaultProperties 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. + * Get the keyVaultArmId property: KeyVault Arm Id that contains the data encryption key. * - * @return the identityClientId value. + * @return the keyVaultArmId value. */ - public String identityClientId() { - return this.identityClientId; + public String keyVaultArmId() { + return this.keyVaultArmId; } /** - * Set the identityClientId property: For future use - The client id of the identity which will be used to access - * key vault. + * Set the keyVaultArmId property: KeyVault Arm Id that contains the data encryption key. * - * @param identityClientId the identityClientId value to set. - * @return the EncryptionKeyVaultProperties object itself. + * @param keyVaultArmId the keyVaultArmId value to set. + * @return the KeyVaultProperties object itself. */ - public EncryptionKeyVaultProperties withIdentityClientId(String identityClientId) { - this.identityClientId = identityClientId; + public KeyVaultProperties withKeyVaultArmId(String keyVaultArmId) { + this.keyVaultArmId = keyVaultArmId; return this; } @@ -106,19 +107,19 @@ public EncryptionKeyVaultProperties withIdentityClientId(String identityClientId * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (keyVaultArmId() == null) { + if (keyIdentifier() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( - "Missing required property keyVaultArmId in model EncryptionKeyVaultProperties")); + "Missing required property keyIdentifier in model KeyVaultProperties")); } - if (keyIdentifier() == null) { + if (keyVaultArmId() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( - "Missing required property keyIdentifier in model EncryptionKeyVaultProperties")); + "Missing required property keyVaultArmId in model KeyVaultProperties")); } } - private static final ClientLogger LOGGER = new ClientLogger(EncryptionKeyVaultProperties.class); + private static final ClientLogger LOGGER = new ClientLogger(KeyVaultProperties.class); /** * {@inheritDoc} @@ -126,40 +127,40 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("keyVaultArmId", this.keyVaultArmId); jsonWriter.writeStringField("keyIdentifier", this.keyIdentifier); + jsonWriter.writeStringField("keyVaultArmId", this.keyVaultArmId); jsonWriter.writeStringField("identityClientId", this.identityClientId); return jsonWriter.writeEndObject(); } /** - * Reads an instance of EncryptionKeyVaultProperties from the JsonReader. + * Reads an instance of KeyVaultProperties from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of EncryptionKeyVaultProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. + * @return An instance of KeyVaultProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EncryptionKeyVaultProperties. + * @throws IOException If an error occurs while reading the KeyVaultProperties. */ - public static EncryptionKeyVaultProperties fromJson(JsonReader jsonReader) throws IOException { + public static KeyVaultProperties fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - EncryptionKeyVaultProperties deserializedEncryptionKeyVaultProperties = new EncryptionKeyVaultProperties(); + KeyVaultProperties deserializedKeyVaultProperties = new KeyVaultProperties(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("keyVaultArmId".equals(fieldName)) { - deserializedEncryptionKeyVaultProperties.keyVaultArmId = reader.getString(); - } else if ("keyIdentifier".equals(fieldName)) { - deserializedEncryptionKeyVaultProperties.keyIdentifier = reader.getString(); + if ("keyIdentifier".equals(fieldName)) { + deserializedKeyVaultProperties.keyIdentifier = reader.getString(); + } else if ("keyVaultArmId".equals(fieldName)) { + deserializedKeyVaultProperties.keyVaultArmId = reader.getString(); } else if ("identityClientId".equals(fieldName)) { - deserializedEncryptionKeyVaultProperties.identityClientId = reader.getString(); + deserializedKeyVaultProperties.identityClientId = reader.getString(); } else { reader.skipChildren(); } } - return deserializedEncryptionKeyVaultProperties; + return deserializedKeyVaultProperties; }); } } 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 d28ca97e56c61..815f5ce11a67e 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 @@ -11,7 +11,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.time.OffsetDateTime; import java.util.List; /** @@ -29,32 +28,6 @@ public final class Kubernetes extends Compute { */ private KubernetesProperties properties; - /* - * The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - */ - private ProvisioningState provisioningState; - - /* - * The time at which the compute was created. - */ - private OffsetDateTime createdOn; - - /* - * The time at which the compute was last modified. - */ - private OffsetDateTime modifiedOn; - - /* - * Errors during provisioning - */ - private List provisioningErrors; - - /* - * Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning - * service provisioned it if false. - */ - private Boolean isAttachedCompute; - /** * Creates an instance of Kubernetes class. */ @@ -91,58 +64,6 @@ public Kubernetes withProperties(KubernetesProperties properties) { return this; } - /** - * Get the provisioningState property: The provision state of the cluster. Valid values are Unknown, Updating, - * Provisioning, Succeeded, and Failed. - * - * @return the provisioningState value. - */ - @Override - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the createdOn property: The time at which the compute was created. - * - * @return the createdOn value. - */ - @Override - public OffsetDateTime createdOn() { - return this.createdOn; - } - - /** - * Get the modifiedOn property: The time at which the compute was last modified. - * - * @return the modifiedOn value. - */ - @Override - public OffsetDateTime modifiedOn() { - return this.modifiedOn; - } - - /** - * Get the provisioningErrors property: Errors during provisioning. - * - * @return the provisioningErrors value. - */ - @Override - public List provisioningErrors() { - return this.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. - */ - @Override - public Boolean isAttachedCompute() { - return this.isAttachedCompute; - } - /** * {@inheritDoc} */ @@ -186,7 +107,6 @@ public Kubernetes withDisableLocalAuth(Boolean disableLocalAuth) { */ @Override public void validate() { - super.validate(); if (properties() != null) { properties().validate(); } @@ -225,23 +145,23 @@ public static Kubernetes fromJson(JsonReader jsonReader) throws IOException { if ("computeLocation".equals(fieldName)) { deserializedKubernetes.withComputeLocation(reader.getString()); } else if ("provisioningState".equals(fieldName)) { - deserializedKubernetes.provisioningState = ProvisioningState.fromString(reader.getString()); + deserializedKubernetes.withProvisioningState(ProvisioningState.fromString(reader.getString())); } else if ("description".equals(fieldName)) { deserializedKubernetes.withDescription(reader.getString()); } else if ("createdOn".equals(fieldName)) { - deserializedKubernetes.createdOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedKubernetes.withCreatedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("modifiedOn".equals(fieldName)) { - deserializedKubernetes.modifiedOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedKubernetes.withModifiedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("resourceId".equals(fieldName)) { deserializedKubernetes.withResourceId(reader.getString()); } else if ("provisioningErrors".equals(fieldName)) { List provisioningErrors = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); - deserializedKubernetes.provisioningErrors = provisioningErrors; + deserializedKubernetes.withProvisioningErrors(provisioningErrors); } else if ("isAttachedCompute".equals(fieldName)) { - deserializedKubernetes.isAttachedCompute = reader.getNullable(JsonReader::getBoolean); + deserializedKubernetes.withIsAttachedCompute(reader.getNullable(JsonReader::getBoolean)); } else if ("disableLocalAuth".equals(fieldName)) { deserializedKubernetes.withDisableLocalAuth(reader.getNullable(JsonReader::getBoolean)); } else if ("computeType".equals(fieldName)) { 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 747afb926be8a..e804bcee2fe48 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 @@ -26,11 +26,6 @@ public final class KubernetesOnlineDeployment extends OnlineDeploymentProperties */ private ContainerResourceRequirements containerResourceRequirements; - /* - * Provisioning state for the endpoint deployment. - */ - private DeploymentProvisioningState provisioningState; - /** * Creates an instance of KubernetesOnlineDeployment class. */ @@ -68,22 +63,12 @@ public ContainerResourceRequirements containerResourceRequirements() { return this; } - /** - * Get the provisioningState property: Provisioning state for the endpoint deployment. - * - * @return the provisioningState value. - */ - @Override - public DeploymentProvisioningState provisioningState() { - return this.provisioningState; - } - /** * {@inheritDoc} */ @Override - public KubernetesOnlineDeployment withScaleSettings(OnlineScaleSettings scaleSettings) { - super.withScaleSettings(scaleSettings); + public KubernetesOnlineDeployment withAppInsightsEnabled(Boolean appInsightsEnabled) { + super.withAppInsightsEnabled(appInsightsEnabled); return this; } @@ -91,8 +76,8 @@ public KubernetesOnlineDeployment withScaleSettings(OnlineScaleSettings scaleSet * {@inheritDoc} */ @Override - public KubernetesOnlineDeployment withRequestSettings(OnlineRequestSettings requestSettings) { - super.withRequestSettings(requestSettings); + public KubernetesOnlineDeployment withDataCollector(DataCollector dataCollector) { + super.withDataCollector(dataCollector); return this; } @@ -100,8 +85,9 @@ public KubernetesOnlineDeployment withRequestSettings(OnlineRequestSettings requ * {@inheritDoc} */ @Override - public KubernetesOnlineDeployment withModelMountPath(String modelMountPath) { - super.withModelMountPath(modelMountPath); + public KubernetesOnlineDeployment + withEgressPublicNetworkAccess(EgressPublicNetworkAccessType egressPublicNetworkAccess) { + super.withEgressPublicNetworkAccess(egressPublicNetworkAccess); return this; } @@ -109,8 +95,8 @@ public KubernetesOnlineDeployment withModelMountPath(String modelMountPath) { * {@inheritDoc} */ @Override - public KubernetesOnlineDeployment withAppInsightsEnabled(Boolean appInsightsEnabled) { - super.withAppInsightsEnabled(appInsightsEnabled); + public KubernetesOnlineDeployment withInstanceType(String instanceType) { + super.withInstanceType(instanceType); return this; } @@ -127,8 +113,8 @@ public KubernetesOnlineDeployment withLivenessProbe(ProbeSettings livenessProbe) * {@inheritDoc} */ @Override - public KubernetesOnlineDeployment withReadinessProbe(ProbeSettings readinessProbe) { - super.withReadinessProbe(readinessProbe); + public KubernetesOnlineDeployment withModel(String model) { + super.withModel(model); return this; } @@ -136,8 +122,8 @@ public KubernetesOnlineDeployment withReadinessProbe(ProbeSettings readinessProb * {@inheritDoc} */ @Override - public KubernetesOnlineDeployment withInstanceType(String instanceType) { - super.withInstanceType(instanceType); + public KubernetesOnlineDeployment withModelMountPath(String modelMountPath) { + super.withModelMountPath(modelMountPath); return this; } @@ -145,8 +131,8 @@ public KubernetesOnlineDeployment withInstanceType(String instanceType) { * {@inheritDoc} */ @Override - public KubernetesOnlineDeployment withModel(String model) { - super.withModel(model); + public KubernetesOnlineDeployment withReadinessProbe(ProbeSettings readinessProbe) { + super.withReadinessProbe(readinessProbe); return this; } @@ -154,9 +140,8 @@ public KubernetesOnlineDeployment withModel(String model) { * {@inheritDoc} */ @Override - public KubernetesOnlineDeployment - withEgressPublicNetworkAccess(EgressPublicNetworkAccessType egressPublicNetworkAccess) { - super.withEgressPublicNetworkAccess(egressPublicNetworkAccess); + public KubernetesOnlineDeployment withRequestSettings(OnlineRequestSettings requestSettings) { + super.withRequestSettings(requestSettings); return this; } @@ -164,8 +149,8 @@ public KubernetesOnlineDeployment withModel(String model) { * {@inheritDoc} */ @Override - public KubernetesOnlineDeployment withDataCollector(DataCollector dataCollector) { - super.withDataCollector(dataCollector); + public KubernetesOnlineDeployment withScaleSettings(OnlineScaleSettings scaleSettings) { + super.withScaleSettings(scaleSettings); return this; } @@ -173,8 +158,8 @@ public KubernetesOnlineDeployment withDataCollector(DataCollector dataCollector) * {@inheritDoc} */ @Override - public KubernetesOnlineDeployment withDescription(String description) { - super.withDescription(description); + public KubernetesOnlineDeployment withCodeConfiguration(CodeConfiguration codeConfiguration) { + super.withCodeConfiguration(codeConfiguration); return this; } @@ -182,8 +167,8 @@ public KubernetesOnlineDeployment withDescription(String description) { * {@inheritDoc} */ @Override - public KubernetesOnlineDeployment withProperties(Map properties) { - super.withProperties(properties); + public KubernetesOnlineDeployment withDescription(String description) { + super.withDescription(description); return this; } @@ -191,8 +176,8 @@ public KubernetesOnlineDeployment withProperties(Map properties) * {@inheritDoc} */ @Override - public KubernetesOnlineDeployment withCodeConfiguration(CodeConfiguration codeConfiguration) { - super.withCodeConfiguration(codeConfiguration); + public KubernetesOnlineDeployment withEnvironmentId(String environmentId) { + super.withEnvironmentId(environmentId); return this; } @@ -200,8 +185,8 @@ public KubernetesOnlineDeployment withCodeConfiguration(CodeConfiguration codeCo * {@inheritDoc} */ @Override - public KubernetesOnlineDeployment withEnvironmentId(String environmentId) { - super.withEnvironmentId(environmentId); + public KubernetesOnlineDeployment withEnvironmentVariables(Map environmentVariables) { + super.withEnvironmentVariables(environmentVariables); return this; } @@ -209,8 +194,8 @@ public KubernetesOnlineDeployment withEnvironmentId(String environmentId) { * {@inheritDoc} */ @Override - public KubernetesOnlineDeployment withEnvironmentVariables(Map environmentVariables) { - super.withEnvironmentVariables(environmentVariables); + public KubernetesOnlineDeployment withProperties(Map properties) { + super.withProperties(properties); return this; } @@ -221,10 +206,27 @@ public KubernetesOnlineDeployment withEnvironmentVariables(Map e */ @Override public void validate() { - super.validate(); if (containerResourceRequirements() != null) { containerResourceRequirements().validate(); } + if (codeConfiguration() != null) { + codeConfiguration().validate(); + } + if (dataCollector() != null) { + dataCollector().validate(); + } + if (livenessProbe() != null) { + livenessProbe().validate(); + } + if (readinessProbe() != null) { + readinessProbe().validate(); + } + if (requestSettings() != null) { + requestSettings().validate(); + } + if (scaleSettings() != null) { + scaleSettings().validate(); + } } /** @@ -233,23 +235,23 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("codeConfiguration", codeConfiguration()); + jsonWriter.writeStringField("description", description()); jsonWriter.writeStringField("environmentId", environmentId()); jsonWriter.writeMapField("environmentVariables", environmentVariables(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("scaleSettings", scaleSettings()); - jsonWriter.writeJsonField("requestSettings", requestSettings()); - jsonWriter.writeStringField("modelMountPath", modelMountPath()); + jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("appInsightsEnabled", appInsightsEnabled()); - jsonWriter.writeJsonField("livenessProbe", livenessProbe()); - jsonWriter.writeJsonField("readinessProbe", readinessProbe()); - jsonWriter.writeStringField("instanceType", instanceType()); - jsonWriter.writeStringField("model", model()); + jsonWriter.writeJsonField("dataCollector", dataCollector()); jsonWriter.writeStringField("egressPublicNetworkAccess", egressPublicNetworkAccess() == null ? null : egressPublicNetworkAccess().toString()); - jsonWriter.writeJsonField("dataCollector", dataCollector()); + jsonWriter.writeStringField("instanceType", instanceType()); + jsonWriter.writeJsonField("livenessProbe", livenessProbe()); + jsonWriter.writeStringField("model", model()); + jsonWriter.writeStringField("modelMountPath", modelMountPath()); + jsonWriter.writeJsonField("readinessProbe", readinessProbe()); + jsonWriter.writeJsonField("requestSettings", requestSettings()); + jsonWriter.writeJsonField("scaleSettings", scaleSettings()); jsonWriter.writeStringField("endpointComputeType", this.endpointComputeType == null ? null : this.endpointComputeType.toString()); jsonWriter.writeJsonField("containerResourceRequirements", this.containerResourceRequirements); @@ -271,43 +273,43 @@ public static KubernetesOnlineDeployment fromJson(JsonReader jsonReader) throws String fieldName = reader.getFieldName(); reader.nextToken(); - if ("description".equals(fieldName)) { - deserializedKubernetesOnlineDeployment.withDescription(reader.getString()); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedKubernetesOnlineDeployment.withProperties(properties); - } else if ("codeConfiguration".equals(fieldName)) { + if ("codeConfiguration".equals(fieldName)) { deserializedKubernetesOnlineDeployment.withCodeConfiguration(CodeConfiguration.fromJson(reader)); + } else if ("description".equals(fieldName)) { + deserializedKubernetesOnlineDeployment.withDescription(reader.getString()); } else if ("environmentId".equals(fieldName)) { deserializedKubernetesOnlineDeployment.withEnvironmentId(reader.getString()); } else if ("environmentVariables".equals(fieldName)) { Map environmentVariables = reader.readMap(reader1 -> reader1.getString()); deserializedKubernetesOnlineDeployment.withEnvironmentVariables(environmentVariables); - } else if ("scaleSettings".equals(fieldName)) { - deserializedKubernetesOnlineDeployment.withScaleSettings(OnlineScaleSettings.fromJson(reader)); - } else if ("requestSettings".equals(fieldName)) { - deserializedKubernetesOnlineDeployment.withRequestSettings(OnlineRequestSettings.fromJson(reader)); - } else if ("modelMountPath".equals(fieldName)) { - deserializedKubernetesOnlineDeployment.withModelMountPath(reader.getString()); + } else if ("properties".equals(fieldName)) { + Map properties = reader.readMap(reader1 -> reader1.getString()); + deserializedKubernetesOnlineDeployment.withProperties(properties); } else if ("appInsightsEnabled".equals(fieldName)) { deserializedKubernetesOnlineDeployment .withAppInsightsEnabled(reader.getNullable(JsonReader::getBoolean)); - } else if ("livenessProbe".equals(fieldName)) { - deserializedKubernetesOnlineDeployment.withLivenessProbe(ProbeSettings.fromJson(reader)); - } else if ("readinessProbe".equals(fieldName)) { - deserializedKubernetesOnlineDeployment.withReadinessProbe(ProbeSettings.fromJson(reader)); - } else if ("provisioningState".equals(fieldName)) { - deserializedKubernetesOnlineDeployment.provisioningState - = DeploymentProvisioningState.fromString(reader.getString()); + } else if ("dataCollector".equals(fieldName)) { + deserializedKubernetesOnlineDeployment.withDataCollector(DataCollector.fromJson(reader)); + } else if ("egressPublicNetworkAccess".equals(fieldName)) { + deserializedKubernetesOnlineDeployment + .withEgressPublicNetworkAccess(EgressPublicNetworkAccessType.fromString(reader.getString())); } else if ("instanceType".equals(fieldName)) { deserializedKubernetesOnlineDeployment.withInstanceType(reader.getString()); + } else if ("livenessProbe".equals(fieldName)) { + deserializedKubernetesOnlineDeployment.withLivenessProbe(ProbeSettings.fromJson(reader)); } else if ("model".equals(fieldName)) { deserializedKubernetesOnlineDeployment.withModel(reader.getString()); - } else if ("egressPublicNetworkAccess".equals(fieldName)) { + } else if ("modelMountPath".equals(fieldName)) { + deserializedKubernetesOnlineDeployment.withModelMountPath(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { deserializedKubernetesOnlineDeployment - .withEgressPublicNetworkAccess(EgressPublicNetworkAccessType.fromString(reader.getString())); - } else if ("dataCollector".equals(fieldName)) { - deserializedKubernetesOnlineDeployment.withDataCollector(DataCollector.fromJson(reader)); + .withProvisioningState(DeploymentProvisioningState.fromString(reader.getString())); + } else if ("readinessProbe".equals(fieldName)) { + deserializedKubernetesOnlineDeployment.withReadinessProbe(ProbeSettings.fromJson(reader)); + } else if ("requestSettings".equals(fieldName)) { + deserializedKubernetesOnlineDeployment.withRequestSettings(OnlineRequestSettings.fromJson(reader)); + } else if ("scaleSettings".equals(fieldName)) { + deserializedKubernetesOnlineDeployment.withScaleSettings(OnlineScaleSettings.fromJson(reader)); } else if ("endpointComputeType".equals(fieldName)) { deserializedKubernetesOnlineDeployment.endpointComputeType = EndpointComputeType.fromString(reader.getString()); 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 index 3d32d196877cb..46a7a78a1b125 100644 --- 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 @@ -5,6 +5,7 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -52,9 +53,14 @@ public LakeHouseArtifact withArtifactName(String artifactName) { */ @Override public void validate() { - super.validate(); + if (artifactName() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property artifactName in model LakeHouseArtifact")); + } } + private static final ClientLogger LOGGER = new ClientLogger(LakeHouseArtifact.class); + /** * {@inheritDoc} */ 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 5c1b85f07b185..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 @@ -11,14 +11,14 @@ */ 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. */ 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 e730c56ef0d43..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 @@ -11,7 +11,7 @@ */ public interface ListStorageAccountKeysResult { /** - * Gets the userStorageKey property: The userStorageKey property. + * Gets the userStorageKey property: The access key of the storage. * * @return the userStorageKey value. */ 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 f66447f27bbfe..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 @@ -11,21 +11,7 @@ */ 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. */ @@ -45,6 +31,20 @@ public interface ListWorkspaceKeysResult { */ 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. * 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 f1deadd6f7c1a..73e26522cc2bb 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 @@ -78,7 +78,6 @@ public LiteralJobInput withDescription(String description) { */ @Override public void validate() { - super.validate(); if (value() == null) { throw LOGGER.atError() .log(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/MLFlowModelJobInput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowModelJobInput.java index cd49028d2ff7a..7ae7135ba2f29 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 @@ -22,14 +22,14 @@ public final class MLFlowModelJobInput extends JobInput { private JobInputType jobInputType = JobInputType.MLFLOW_MODEL; /* - * [Required] Input Asset URI. + * Input Asset Delivery Mode. */ - private String uri; + private InputDeliveryMode mode; /* - * Input Asset Delivery Mode. + * [Required] Input Asset URI. */ - private InputDeliveryMode mode; + private String uri; /** * Creates an instance of MLFlowModelJobInput class. @@ -48,42 +48,42 @@ public JobInputType jobInputType() { } /** - * Get the uri property: [Required] Input Asset URI. + * Get the mode property: Input Asset Delivery Mode. * - * @return the uri value. + * @return the mode value. */ - public String uri() { - return this.uri; + public InputDeliveryMode mode() { + return this.mode; } /** - * Set the uri property: [Required] Input Asset URI. + * Set the mode property: Input Asset Delivery Mode. * - * @param uri the uri value to set. + * @param mode the mode value to set. * @return the MLFlowModelJobInput object itself. */ - public MLFlowModelJobInput withUri(String uri) { - this.uri = uri; + public MLFlowModelJobInput withMode(InputDeliveryMode mode) { + this.mode = mode; return this; } /** - * Get the mode property: Input Asset Delivery Mode. + * Get the uri property: [Required] Input Asset URI. * - * @return the mode value. + * @return the uri value. */ - public InputDeliveryMode mode() { - return this.mode; + public String uri() { + return this.uri; } /** - * Set the mode property: Input Asset Delivery Mode. + * Set the uri property: [Required] Input Asset URI. * - * @param mode the mode value to set. + * @param uri the uri value to set. * @return the MLFlowModelJobInput object itself. */ - public MLFlowModelJobInput withMode(InputDeliveryMode mode) { - this.mode = mode; + public MLFlowModelJobInput withUri(String uri) { + this.uri = uri; return this; } @@ -103,7 +103,6 @@ public MLFlowModelJobInput withDescription(String description) { */ @Override public void validate() { - super.validate(); if (uri() == null) { throw LOGGER.atError() .log(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 3a50f29388189..9d1b59060fee5 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 @@ -21,15 +21,20 @@ public final class MLFlowModelJobOutput extends JobOutput { private JobOutputType jobOutputType = JobOutputType.MLFLOW_MODEL; /* - * Output Asset URI. + * Output Asset Name. */ - private String uri; + private String assetName; /* * Output Asset Delivery Mode. */ private OutputDeliveryMode mode; + /* + * Output Asset URI. + */ + private String uri; + /** * Creates an instance of MLFlowModelJobOutput class. */ @@ -47,22 +52,22 @@ public JobOutputType jobOutputType() { } /** - * Get the uri property: Output Asset URI. + * Get the assetName property: Output Asset Name. * - * @return the uri value. + * @return the assetName value. */ - public String uri() { - return this.uri; + public String assetName() { + return this.assetName; } /** - * Set the uri property: Output Asset URI. + * Set the assetName property: Output Asset Name. * - * @param uri the uri value to set. + * @param assetName the assetName value to set. * @return the MLFlowModelJobOutput object itself. */ - public MLFlowModelJobOutput withUri(String uri) { - this.uri = uri; + public MLFlowModelJobOutput withAssetName(String assetName) { + this.assetName = assetName; return this; } @@ -86,6 +91,26 @@ public MLFlowModelJobOutput withMode(OutputDeliveryMode mode) { return this; } + /** + * Get the uri property: Output Asset URI. + * + * @return the uri value. + */ + public String uri() { + return this.uri; + } + + /** + * Set the uri property: Output Asset URI. + * + * @param uri the uri value to set. + * @return the MLFlowModelJobOutput object itself. + */ + public MLFlowModelJobOutput withUri(String uri) { + this.uri = uri; + return this; + } + /** * {@inheritDoc} */ @@ -102,7 +127,6 @@ public MLFlowModelJobOutput withDescription(String description) { */ @Override public void validate() { - super.validate(); } /** @@ -113,8 +137,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); jsonWriter.writeStringField("jobOutputType", this.jobOutputType == null ? null : this.jobOutputType.toString()); - jsonWriter.writeStringField("uri", this.uri); + jsonWriter.writeStringField("assetName", this.assetName); jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + jsonWriter.writeStringField("uri", this.uri); return jsonWriter.writeEndObject(); } @@ -137,10 +162,12 @@ public static MLFlowModelJobOutput fromJson(JsonReader jsonReader) throws IOExce deserializedMLFlowModelJobOutput.withDescription(reader.getString()); } else if ("jobOutputType".equals(fieldName)) { deserializedMLFlowModelJobOutput.jobOutputType = JobOutputType.fromString(reader.getString()); - } else if ("uri".equals(fieldName)) { - deserializedMLFlowModelJobOutput.uri = reader.getString(); + } else if ("assetName".equals(fieldName)) { + deserializedMLFlowModelJobOutput.assetName = reader.getString(); } else if ("mode".equals(fieldName)) { deserializedMLFlowModelJobOutput.mode = OutputDeliveryMode.fromString(reader.getString()); + } else if ("uri".equals(fieldName)) { + deserializedMLFlowModelJobOutput.uri = reader.getString(); } else { reader.skipChildren(); } 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 3701ebc2a3dcd..a999136a9e658 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 @@ -5,6 +5,7 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -76,8 +77,8 @@ public MLTableData withDataUri(String dataUri) { * {@inheritDoc} */ @Override - public MLTableData withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); + public MLTableData withIsAnonymous(Boolean isAnonymous) { + super.withIsAnonymous(isAnonymous); return this; } @@ -85,8 +86,8 @@ public MLTableData withIsArchived(Boolean isArchived) { * {@inheritDoc} */ @Override - public MLTableData withIsAnonymous(Boolean isAnonymous) { - super.withIsAnonymous(isAnonymous); + public MLTableData withIsArchived(Boolean isArchived) { + super.withIsArchived(isArchived); return this; } @@ -103,8 +104,8 @@ public MLTableData withDescription(String description) { * {@inheritDoc} */ @Override - public MLTableData withTags(Map tags) { - super.withTags(tags); + public MLTableData withProperties(Map properties) { + super.withProperties(properties); return this; } @@ -112,8 +113,8 @@ public MLTableData withTags(Map tags) { * {@inheritDoc} */ @Override - public MLTableData withProperties(Map properties) { - super.withProperties(properties); + public MLTableData withTags(Map tags) { + super.withTags(tags); return this; } @@ -124,9 +125,14 @@ public MLTableData withProperties(Map properties) { */ @Override public void validate() { - super.validate(); + if (dataUri() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property dataUri in model MLTableData")); + } } + private static final ClientLogger LOGGER = new ClientLogger(MLTableData.class); + /** * {@inheritDoc} */ @@ -135,10 +141,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("dataUri", dataUri()); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", isArchived()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isAnonymous", isAnonymous()); + jsonWriter.writeBooleanField("isArchived", isArchived()); jsonWriter.writeStringField("dataType", this.dataType == null ? null : this.dataType.toString()); jsonWriter.writeArrayField("referencedUris", this.referencedUris, (writer, element) -> writer.writeString(element)); @@ -165,16 +171,16 @@ public static MLTableData fromJson(JsonReader jsonReader) throws IOException { deserializedMLTableData.withDataUri(reader.getString()); } else if ("description".equals(fieldName)) { deserializedMLTableData.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedMLTableData.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedMLTableData.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedMLTableData.withIsArchived(reader.getNullable(JsonReader::getBoolean)); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedMLTableData.withTags(tags); } else if ("isAnonymous".equals(fieldName)) { deserializedMLTableData.withIsAnonymous(reader.getNullable(JsonReader::getBoolean)); + } else if ("isArchived".equals(fieldName)) { + deserializedMLTableData.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("dataType".equals(fieldName)) { deserializedMLTableData.dataType = DataType.fromString(reader.getString()); } else if ("referencedUris".equals(fieldName)) { 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 404a4a1adb183..37e13beed4b04 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 @@ -22,14 +22,14 @@ public final class MLTableJobInput extends JobInput { private JobInputType jobInputType = JobInputType.MLTABLE; /* - * [Required] Input Asset URI. + * Input Asset Delivery Mode. */ - private String uri; + private InputDeliveryMode mode; /* - * Input Asset Delivery Mode. + * [Required] Input Asset URI. */ - private InputDeliveryMode mode; + private String uri; /** * Creates an instance of MLTableJobInput class. @@ -48,42 +48,42 @@ public JobInputType jobInputType() { } /** - * Get the uri property: [Required] Input Asset URI. + * Get the mode property: Input Asset Delivery Mode. * - * @return the uri value. + * @return the mode value. */ - public String uri() { - return this.uri; + public InputDeliveryMode mode() { + return this.mode; } /** - * Set the uri property: [Required] Input Asset URI. + * Set the mode property: Input Asset Delivery Mode. * - * @param uri the uri value to set. + * @param mode the mode value to set. * @return the MLTableJobInput object itself. */ - public MLTableJobInput withUri(String uri) { - this.uri = uri; + public MLTableJobInput withMode(InputDeliveryMode mode) { + this.mode = mode; return this; } /** - * Get the mode property: Input Asset Delivery Mode. + * Get the uri property: [Required] Input Asset URI. * - * @return the mode value. + * @return the uri value. */ - public InputDeliveryMode mode() { - return this.mode; + public String uri() { + return this.uri; } /** - * Set the mode property: Input Asset Delivery Mode. + * Set the uri property: [Required] Input Asset URI. * - * @param mode the mode value to set. + * @param uri the uri value to set. * @return the MLTableJobInput object itself. */ - public MLTableJobInput withMode(InputDeliveryMode mode) { - this.mode = mode; + public MLTableJobInput withUri(String uri) { + this.uri = uri; return this; } @@ -103,7 +103,6 @@ public MLTableJobInput withDescription(String description) { */ @Override public void validate() { - super.validate(); if (uri() == null) { throw LOGGER.atError() .log(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 3d3313ef481d5..87d5966d4f668 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 @@ -21,15 +21,20 @@ public final class MLTableJobOutput extends JobOutput { private JobOutputType jobOutputType = JobOutputType.MLTABLE; /* - * Output Asset URI. + * Output Asset Name. */ - private String uri; + private String assetName; /* * Output Asset Delivery Mode. */ private OutputDeliveryMode mode; + /* + * Output Asset URI. + */ + private String uri; + /** * Creates an instance of MLTableJobOutput class. */ @@ -47,22 +52,22 @@ public JobOutputType jobOutputType() { } /** - * Get the uri property: Output Asset URI. + * Get the assetName property: Output Asset Name. * - * @return the uri value. + * @return the assetName value. */ - public String uri() { - return this.uri; + public String assetName() { + return this.assetName; } /** - * Set the uri property: Output Asset URI. + * Set the assetName property: Output Asset Name. * - * @param uri the uri value to set. + * @param assetName the assetName value to set. * @return the MLTableJobOutput object itself. */ - public MLTableJobOutput withUri(String uri) { - this.uri = uri; + public MLTableJobOutput withAssetName(String assetName) { + this.assetName = assetName; return this; } @@ -86,6 +91,26 @@ public MLTableJobOutput withMode(OutputDeliveryMode mode) { return this; } + /** + * Get the uri property: Output Asset URI. + * + * @return the uri value. + */ + public String uri() { + return this.uri; + } + + /** + * Set the uri property: Output Asset URI. + * + * @param uri the uri value to set. + * @return the MLTableJobOutput object itself. + */ + public MLTableJobOutput withUri(String uri) { + this.uri = uri; + return this; + } + /** * {@inheritDoc} */ @@ -102,7 +127,6 @@ public MLTableJobOutput withDescription(String description) { */ @Override public void validate() { - super.validate(); } /** @@ -113,8 +137,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); jsonWriter.writeStringField("jobOutputType", this.jobOutputType == null ? null : this.jobOutputType.toString()); - jsonWriter.writeStringField("uri", this.uri); + jsonWriter.writeStringField("assetName", this.assetName); jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + jsonWriter.writeStringField("uri", this.uri); return jsonWriter.writeEndObject(); } @@ -137,10 +162,12 @@ public static MLTableJobOutput fromJson(JsonReader jsonReader) throws IOExceptio deserializedMLTableJobOutput.withDescription(reader.getString()); } else if ("jobOutputType".equals(fieldName)) { deserializedMLTableJobOutput.jobOutputType = JobOutputType.fromString(reader.getString()); - } else if ("uri".equals(fieldName)) { - deserializedMLTableJobOutput.uri = reader.getString(); + } else if ("assetName".equals(fieldName)) { + deserializedMLTableJobOutput.assetName = reader.getString(); } else if ("mode".equals(fieldName)) { deserializedMLTableJobOutput.mode = OutputDeliveryMode.fromString(reader.getString()); + } else if ("uri".equals(fieldName)) { + deserializedMLTableJobOutput.uri = reader.getString(); } else { reader.skipChildren(); } 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 index dc253a8faae2a..5c3f522005504 100644 --- 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 @@ -69,7 +69,6 @@ public ManagedComputeIdentity withIdentity(ManagedServiceIdentity identity) { */ @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 6bff81da57789..7002ab0aa0dcc 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 @@ -126,7 +126,6 @@ public ManagedIdentity withResourceId(String resourceId) { */ @Override public void validate() { - super.validate(); } /** 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 5023b0d28125e..8f10584ff63f6 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 @@ -30,16 +30,6 @@ public final class ManagedIdentityAuthTypeWorkspaceConnectionProperties extends */ private WorkspaceConnectionManagedIdentity credentials; - /* - * The createdByWorkspaceArmId property. - */ - private String createdByWorkspaceArmId; - - /* - * Group based on connection category - */ - private ConnectionGroup group; - /** * Creates an instance of ManagedIdentityAuthTypeWorkspaceConnectionProperties class. */ @@ -78,31 +68,29 @@ public WorkspaceConnectionManagedIdentity credentials() { } /** - * Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. - * - * @return the createdByWorkspaceArmId value. + * {@inheritDoc} */ @Override - public String createdByWorkspaceArmId() { - return this.createdByWorkspaceArmId; + public ManagedIdentityAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { + super.withCategory(category); + return this; } /** - * Get the group property: Group based on connection category. - * - * @return the group value. + * {@inheritDoc} */ @Override - public ConnectionGroup group() { - return this.group; + public ManagedIdentityAuthTypeWorkspaceConnectionProperties withError(String error) { + super.withError(error); + return this; } /** * {@inheritDoc} */ @Override - public ManagedIdentityAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); + public ManagedIdentityAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { + super.withExpiryTime(expiryTime); return this; } @@ -110,8 +98,8 @@ public ManagedIdentityAuthTypeWorkspaceConnectionProperties withCategory(Connect * {@inheritDoc} */ @Override - public ManagedIdentityAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { - super.withExpiryTime(expiryTime); + public ManagedIdentityAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { + super.withIsSharedToAll(isSharedToAll); return this; } @@ -119,8 +107,8 @@ public ManagedIdentityAuthTypeWorkspaceConnectionProperties withExpiryTime(Offse * {@inheritDoc} */ @Override - public ManagedIdentityAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { - super.withIsSharedToAll(isSharedToAll); + public ManagedIdentityAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { + super.withMetadata(metadata); return this; } @@ -128,8 +116,8 @@ public ManagedIdentityAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Bo * {@inheritDoc} */ @Override - public ManagedIdentityAuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); + public ManagedIdentityAuthTypeWorkspaceConnectionProperties withPeRequirement(ManagedPERequirement peRequirement) { + super.withPeRequirement(peRequirement); return this; } @@ -137,8 +125,8 @@ public ManagedIdentityAuthTypeWorkspaceConnectionProperties withTarget(String ta * {@inheritDoc} */ @Override - public ManagedIdentityAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { - super.withMetadata(metadata); + public ManagedIdentityAuthTypeWorkspaceConnectionProperties withPeStatus(ManagedPEStatus peStatus) { + super.withPeStatus(peStatus); return this; } @@ -155,8 +143,8 @@ public ManagedIdentityAuthTypeWorkspaceConnectionProperties withSharedUserList(L * {@inheritDoc} */ @Override - public ManagedIdentityAuthTypeWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); + public ManagedIdentityAuthTypeWorkspaceConnectionProperties withTarget(String target) { + super.withTarget(target); return this; } @@ -164,8 +152,9 @@ public ManagedIdentityAuthTypeWorkspaceConnectionProperties withValue(String val * {@inheritDoc} */ @Override - public ManagedIdentityAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); + public ManagedIdentityAuthTypeWorkspaceConnectionProperties + withUseWorkspaceManagedIdentity(Boolean useWorkspaceManagedIdentity) { + super.withUseWorkspaceManagedIdentity(useWorkspaceManagedIdentity); return this; } @@ -176,7 +165,6 @@ public ManagedIdentityAuthTypeWorkspaceConnectionProperties withValueFormat(Valu */ @Override public void validate() { - super.validate(); if (credentials() != null) { credentials().validate(); } @@ -189,15 +177,17 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("category", category() == null ? null : category().toString()); + jsonWriter.writeStringField("error", error()); jsonWriter.writeStringField("expiryTime", expiryTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(expiryTime())); jsonWriter.writeBooleanField("isSharedToAll", isSharedToAll()); - jsonWriter.writeStringField("target", target()); jsonWriter.writeMapField("metadata", metadata(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("peRequirement", peRequirement() == null ? null : peRequirement().toString()); + jsonWriter.writeStringField("peStatus", peStatus() == null ? null : peStatus().toString()); jsonWriter.writeArrayField("sharedUserList", sharedUserList(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", value()); - jsonWriter.writeStringField("valueFormat", valueFormat() == null ? null : valueFormat().toString()); + jsonWriter.writeStringField("target", target()); + jsonWriter.writeBooleanField("useWorkspaceManagedIdentity", useWorkspaceManagedIdentity()); jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); jsonWriter.writeJsonField("credentials", this.credentials); return jsonWriter.writeEndObject(); @@ -224,30 +214,36 @@ public static ManagedIdentityAuthTypeWorkspaceConnectionProperties fromJson(Json deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties .withCategory(ConnectionCategory.fromString(reader.getString())); } else if ("createdByWorkspaceArmId".equals(fieldName)) { - deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties.createdByWorkspaceArmId - = reader.getString(); + deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties + .withCreatedByWorkspaceArmId(reader.getString()); + } else if ("error".equals(fieldName)) { + deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties.withError(reader.getString()); } else if ("expiryTime".equals(fieldName)) { deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties.withExpiryTime(reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("group".equals(fieldName)) { - deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties.group - = ConnectionGroup.fromString(reader.getString()); + deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties + .withGroup(ConnectionGroup.fromString(reader.getString())); } else if ("isSharedToAll".equals(fieldName)) { deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties .withIsSharedToAll(reader.getNullable(JsonReader::getBoolean)); - } else if ("target".equals(fieldName)) { - deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); } else if ("metadata".equals(fieldName)) { Map metadata = reader.readMap(reader1 -> reader1.getString()); deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties.withMetadata(metadata); + } else if ("peRequirement".equals(fieldName)) { + deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties + .withPeRequirement(ManagedPERequirement.fromString(reader.getString())); + } else if ("peStatus".equals(fieldName)) { + deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties + .withPeStatus(ManagedPEStatus.fromString(reader.getString())); } else if ("sharedUserList".equals(fieldName)) { List sharedUserList = reader.readArray(reader1 -> reader1.getString()); deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties.withSharedUserList(sharedUserList); - } else if ("value".equals(fieldName)) { - deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties.withValue(reader.getString()); - } else if ("valueFormat".equals(fieldName)) { + } else if ("target".equals(fieldName)) { + deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); + } else if ("useWorkspaceManagedIdentity".equals(fieldName)) { deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties - .withValueFormat(ValueFormat.fromString(reader.getString())); + .withUseWorkspaceManagedIdentity(reader.getNullable(JsonReader::getBoolean)); } else if ("authType".equals(fieldName)) { deserializedManagedIdentityAuthTypeWorkspaceConnectionProperties.authType = ConnectionAuthType.fromString(reader.getString()); 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 index 0727fbe15adef..3a3173985619b 100644 --- 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 @@ -25,11 +25,6 @@ public final class ManagedIdentityCredential extends DataReferenceCredential { */ private String managedIdentityType; - /* - * Full arm scope for the Id. For ManagedIdentityType = SystemManaged, this field is null. - */ - private String userManagedIdentityResourceId; - /* * ClientId for the UAMI. For ManagedIdentityType = SystemManaged, this field is null. */ @@ -40,6 +35,11 @@ public final class ManagedIdentityCredential extends DataReferenceCredential { */ private String userManagedIdentityPrincipalId; + /* + * Full arm scope for the Id. For ManagedIdentityType = SystemManaged, this field is null. + */ + private String userManagedIdentityResourceId; + /* * TenantId for the UAMI. For ManagedIdentityType = SystemManaged, this field is null. */ @@ -81,28 +81,6 @@ public ManagedIdentityCredential withManagedIdentityType(String managedIdentityT 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 userManagedIdentityClientId property: ClientId for the UAMI. For ManagedIdentityType = SystemManaged, * this field is null. @@ -147,6 +125,28 @@ public ManagedIdentityCredential withUserManagedIdentityPrincipalId(String userM 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. @@ -176,7 +176,6 @@ public ManagedIdentityCredential withUserManagedIdentityTenantId(String userMana */ @Override public void validate() { - super.validate(); } /** @@ -188,9 +187,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("credentialType", this.credentialType == null ? null : this.credentialType.toString()); jsonWriter.writeStringField("managedIdentityType", this.managedIdentityType); - jsonWriter.writeStringField("userManagedIdentityResourceId", this.userManagedIdentityResourceId); jsonWriter.writeStringField("userManagedIdentityClientId", this.userManagedIdentityClientId); jsonWriter.writeStringField("userManagedIdentityPrincipalId", this.userManagedIdentityPrincipalId); + jsonWriter.writeStringField("userManagedIdentityResourceId", this.userManagedIdentityResourceId); jsonWriter.writeStringField("userManagedIdentityTenantId", this.userManagedIdentityTenantId); return jsonWriter.writeEndObject(); } @@ -215,12 +214,12 @@ public static ManagedIdentityCredential fromJson(JsonReader jsonReader) throws I = DataReferenceCredentialType.fromString(reader.getString()); } else if ("managedIdentityType".equals(fieldName)) { deserializedManagedIdentityCredential.managedIdentityType = reader.getString(); - } else if ("userManagedIdentityResourceId".equals(fieldName)) { - deserializedManagedIdentityCredential.userManagedIdentityResourceId = reader.getString(); } else if ("userManagedIdentityClientId".equals(fieldName)) { deserializedManagedIdentityCredential.userManagedIdentityClientId = reader.getString(); } else if ("userManagedIdentityPrincipalId".equals(fieldName)) { deserializedManagedIdentityCredential.userManagedIdentityPrincipalId = reader.getString(); + } else if ("userManagedIdentityResourceId".equals(fieldName)) { + deserializedManagedIdentityCredential.userManagedIdentityResourceId = reader.getString(); } else if ("userManagedIdentityTenantId".equals(fieldName)) { deserializedManagedIdentityCredential.userManagedIdentityTenantId = reader.getString(); } else { 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 index ec0e9d8318581..1189d89702786 100644 --- 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 @@ -14,7 +14,7 @@ public interface ManagedNetworkProvisions { * Provisions the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @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. @@ -26,7 +26,7 @@ public interface ManagedNetworkProvisions { * Provisions the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @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. 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 index 52447f06592b6..f9b0962c709a4 100644 --- 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 @@ -5,12 +5,20 @@ 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 firewallSku property: Firewall Sku used for FQDN Rules. + * + * @return the firewallSku value. + */ + FirewallSku firewallSku(); + /** * Gets the isolationMode property: Isolation mode for the managed network of a machine learning workspace. * @@ -39,6 +47,13 @@ public interface ManagedNetworkSettings { */ 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. * 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 index 56d61089d4ca5..a92e4ca002121 100644 --- 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 @@ -16,7 +16,7 @@ public interface ManagedNetworkSettingsRules { * Lists the managed network outbound rules for a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @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. @@ -29,7 +29,7 @@ public interface ManagedNetworkSettingsRules { * Lists the managed network outbound rules for a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @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. @@ -43,7 +43,7 @@ public interface ManagedNetworkSettingsRules { * Deletes an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -55,7 +55,7 @@ public interface ManagedNetworkSettingsRules { * Deletes an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -68,7 +68,7 @@ public interface ManagedNetworkSettingsRules { * Gets an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. @@ -83,7 +83,7 @@ Response getWithResponse(String resourceGroupName, St * Gets an outbound rule from the managed network of a machine learning workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. + * @param 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. 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 12e1a1d0e4a7a..f73205f3c3635 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 @@ -21,11 +21,6 @@ public final class ManagedOnlineDeployment extends OnlineDeploymentProperties { */ private EndpointComputeType endpointComputeType = EndpointComputeType.MANAGED; - /* - * Provisioning state for the endpoint deployment. - */ - private DeploymentProvisioningState provisioningState; - /** * Creates an instance of ManagedOnlineDeployment class. */ @@ -42,22 +37,12 @@ public EndpointComputeType endpointComputeType() { return this.endpointComputeType; } - /** - * Get the provisioningState property: Provisioning state for the endpoint deployment. - * - * @return the provisioningState value. - */ - @Override - public DeploymentProvisioningState provisioningState() { - return this.provisioningState; - } - /** * {@inheritDoc} */ @Override - public ManagedOnlineDeployment withScaleSettings(OnlineScaleSettings scaleSettings) { - super.withScaleSettings(scaleSettings); + public ManagedOnlineDeployment withAppInsightsEnabled(Boolean appInsightsEnabled) { + super.withAppInsightsEnabled(appInsightsEnabled); return this; } @@ -65,8 +50,8 @@ public ManagedOnlineDeployment withScaleSettings(OnlineScaleSettings scaleSettin * {@inheritDoc} */ @Override - public ManagedOnlineDeployment withRequestSettings(OnlineRequestSettings requestSettings) { - super.withRequestSettings(requestSettings); + public ManagedOnlineDeployment withDataCollector(DataCollector dataCollector) { + super.withDataCollector(dataCollector); return this; } @@ -74,8 +59,9 @@ public ManagedOnlineDeployment withRequestSettings(OnlineRequestSettings request * {@inheritDoc} */ @Override - public ManagedOnlineDeployment withModelMountPath(String modelMountPath) { - super.withModelMountPath(modelMountPath); + public ManagedOnlineDeployment + withEgressPublicNetworkAccess(EgressPublicNetworkAccessType egressPublicNetworkAccess) { + super.withEgressPublicNetworkAccess(egressPublicNetworkAccess); return this; } @@ -83,8 +69,8 @@ public ManagedOnlineDeployment withModelMountPath(String modelMountPath) { * {@inheritDoc} */ @Override - public ManagedOnlineDeployment withAppInsightsEnabled(Boolean appInsightsEnabled) { - super.withAppInsightsEnabled(appInsightsEnabled); + public ManagedOnlineDeployment withInstanceType(String instanceType) { + super.withInstanceType(instanceType); return this; } @@ -101,8 +87,8 @@ public ManagedOnlineDeployment withLivenessProbe(ProbeSettings livenessProbe) { * {@inheritDoc} */ @Override - public ManagedOnlineDeployment withReadinessProbe(ProbeSettings readinessProbe) { - super.withReadinessProbe(readinessProbe); + public ManagedOnlineDeployment withModel(String model) { + super.withModel(model); return this; } @@ -110,8 +96,8 @@ public ManagedOnlineDeployment withReadinessProbe(ProbeSettings readinessProbe) * {@inheritDoc} */ @Override - public ManagedOnlineDeployment withInstanceType(String instanceType) { - super.withInstanceType(instanceType); + public ManagedOnlineDeployment withModelMountPath(String modelMountPath) { + super.withModelMountPath(modelMountPath); return this; } @@ -119,8 +105,8 @@ public ManagedOnlineDeployment withInstanceType(String instanceType) { * {@inheritDoc} */ @Override - public ManagedOnlineDeployment withModel(String model) { - super.withModel(model); + public ManagedOnlineDeployment withReadinessProbe(ProbeSettings readinessProbe) { + super.withReadinessProbe(readinessProbe); return this; } @@ -128,9 +114,8 @@ public ManagedOnlineDeployment withModel(String model) { * {@inheritDoc} */ @Override - public ManagedOnlineDeployment - withEgressPublicNetworkAccess(EgressPublicNetworkAccessType egressPublicNetworkAccess) { - super.withEgressPublicNetworkAccess(egressPublicNetworkAccess); + public ManagedOnlineDeployment withRequestSettings(OnlineRequestSettings requestSettings) { + super.withRequestSettings(requestSettings); return this; } @@ -138,8 +123,8 @@ public ManagedOnlineDeployment withModel(String model) { * {@inheritDoc} */ @Override - public ManagedOnlineDeployment withDataCollector(DataCollector dataCollector) { - super.withDataCollector(dataCollector); + public ManagedOnlineDeployment withScaleSettings(OnlineScaleSettings scaleSettings) { + super.withScaleSettings(scaleSettings); return this; } @@ -147,8 +132,8 @@ public ManagedOnlineDeployment withDataCollector(DataCollector dataCollector) { * {@inheritDoc} */ @Override - public ManagedOnlineDeployment withDescription(String description) { - super.withDescription(description); + public ManagedOnlineDeployment withCodeConfiguration(CodeConfiguration codeConfiguration) { + super.withCodeConfiguration(codeConfiguration); return this; } @@ -156,8 +141,8 @@ public ManagedOnlineDeployment withDescription(String description) { * {@inheritDoc} */ @Override - public ManagedOnlineDeployment withProperties(Map properties) { - super.withProperties(properties); + public ManagedOnlineDeployment withDescription(String description) { + super.withDescription(description); return this; } @@ -165,8 +150,8 @@ public ManagedOnlineDeployment withProperties(Map properties) { * {@inheritDoc} */ @Override - public ManagedOnlineDeployment withCodeConfiguration(CodeConfiguration codeConfiguration) { - super.withCodeConfiguration(codeConfiguration); + public ManagedOnlineDeployment withEnvironmentId(String environmentId) { + super.withEnvironmentId(environmentId); return this; } @@ -174,8 +159,8 @@ public ManagedOnlineDeployment withCodeConfiguration(CodeConfiguration codeConfi * {@inheritDoc} */ @Override - public ManagedOnlineDeployment withEnvironmentId(String environmentId) { - super.withEnvironmentId(environmentId); + public ManagedOnlineDeployment withEnvironmentVariables(Map environmentVariables) { + super.withEnvironmentVariables(environmentVariables); return this; } @@ -183,8 +168,8 @@ public ManagedOnlineDeployment withEnvironmentId(String environmentId) { * {@inheritDoc} */ @Override - public ManagedOnlineDeployment withEnvironmentVariables(Map environmentVariables) { - super.withEnvironmentVariables(environmentVariables); + public ManagedOnlineDeployment withProperties(Map properties) { + super.withProperties(properties); return this; } @@ -195,7 +180,24 @@ public ManagedOnlineDeployment withEnvironmentVariables(Map envi */ @Override public void validate() { - super.validate(); + if (codeConfiguration() != null) { + codeConfiguration().validate(); + } + if (dataCollector() != null) { + dataCollector().validate(); + } + if (livenessProbe() != null) { + livenessProbe().validate(); + } + if (readinessProbe() != null) { + readinessProbe().validate(); + } + if (requestSettings() != null) { + requestSettings().validate(); + } + if (scaleSettings() != null) { + scaleSettings().validate(); + } } /** @@ -204,23 +206,23 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("codeConfiguration", codeConfiguration()); + jsonWriter.writeStringField("description", description()); jsonWriter.writeStringField("environmentId", environmentId()); jsonWriter.writeMapField("environmentVariables", environmentVariables(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("scaleSettings", scaleSettings()); - jsonWriter.writeJsonField("requestSettings", requestSettings()); - jsonWriter.writeStringField("modelMountPath", modelMountPath()); + jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("appInsightsEnabled", appInsightsEnabled()); - jsonWriter.writeJsonField("livenessProbe", livenessProbe()); - jsonWriter.writeJsonField("readinessProbe", readinessProbe()); - jsonWriter.writeStringField("instanceType", instanceType()); - jsonWriter.writeStringField("model", model()); + jsonWriter.writeJsonField("dataCollector", dataCollector()); jsonWriter.writeStringField("egressPublicNetworkAccess", egressPublicNetworkAccess() == null ? null : egressPublicNetworkAccess().toString()); - jsonWriter.writeJsonField("dataCollector", dataCollector()); + jsonWriter.writeStringField("instanceType", instanceType()); + jsonWriter.writeJsonField("livenessProbe", livenessProbe()); + jsonWriter.writeStringField("model", model()); + jsonWriter.writeStringField("modelMountPath", modelMountPath()); + jsonWriter.writeJsonField("readinessProbe", readinessProbe()); + jsonWriter.writeJsonField("requestSettings", requestSettings()); + jsonWriter.writeJsonField("scaleSettings", scaleSettings()); jsonWriter.writeStringField("endpointComputeType", this.endpointComputeType == null ? null : this.endpointComputeType.toString()); return jsonWriter.writeEndObject(); @@ -241,43 +243,43 @@ public static ManagedOnlineDeployment fromJson(JsonReader jsonReader) throws IOE String fieldName = reader.getFieldName(); reader.nextToken(); - if ("description".equals(fieldName)) { - deserializedManagedOnlineDeployment.withDescription(reader.getString()); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedManagedOnlineDeployment.withProperties(properties); - } else if ("codeConfiguration".equals(fieldName)) { + if ("codeConfiguration".equals(fieldName)) { deserializedManagedOnlineDeployment.withCodeConfiguration(CodeConfiguration.fromJson(reader)); + } else if ("description".equals(fieldName)) { + deserializedManagedOnlineDeployment.withDescription(reader.getString()); } else if ("environmentId".equals(fieldName)) { deserializedManagedOnlineDeployment.withEnvironmentId(reader.getString()); } else if ("environmentVariables".equals(fieldName)) { Map environmentVariables = reader.readMap(reader1 -> reader1.getString()); deserializedManagedOnlineDeployment.withEnvironmentVariables(environmentVariables); - } else if ("scaleSettings".equals(fieldName)) { - deserializedManagedOnlineDeployment.withScaleSettings(OnlineScaleSettings.fromJson(reader)); - } else if ("requestSettings".equals(fieldName)) { - deserializedManagedOnlineDeployment.withRequestSettings(OnlineRequestSettings.fromJson(reader)); - } else if ("modelMountPath".equals(fieldName)) { - deserializedManagedOnlineDeployment.withModelMountPath(reader.getString()); + } else if ("properties".equals(fieldName)) { + Map properties = reader.readMap(reader1 -> reader1.getString()); + deserializedManagedOnlineDeployment.withProperties(properties); } else if ("appInsightsEnabled".equals(fieldName)) { deserializedManagedOnlineDeployment .withAppInsightsEnabled(reader.getNullable(JsonReader::getBoolean)); - } else if ("livenessProbe".equals(fieldName)) { - deserializedManagedOnlineDeployment.withLivenessProbe(ProbeSettings.fromJson(reader)); - } else if ("readinessProbe".equals(fieldName)) { - deserializedManagedOnlineDeployment.withReadinessProbe(ProbeSettings.fromJson(reader)); - } else if ("provisioningState".equals(fieldName)) { - deserializedManagedOnlineDeployment.provisioningState - = DeploymentProvisioningState.fromString(reader.getString()); + } else if ("dataCollector".equals(fieldName)) { + deserializedManagedOnlineDeployment.withDataCollector(DataCollector.fromJson(reader)); + } else if ("egressPublicNetworkAccess".equals(fieldName)) { + deserializedManagedOnlineDeployment + .withEgressPublicNetworkAccess(EgressPublicNetworkAccessType.fromString(reader.getString())); } else if ("instanceType".equals(fieldName)) { deserializedManagedOnlineDeployment.withInstanceType(reader.getString()); + } else if ("livenessProbe".equals(fieldName)) { + deserializedManagedOnlineDeployment.withLivenessProbe(ProbeSettings.fromJson(reader)); } else if ("model".equals(fieldName)) { deserializedManagedOnlineDeployment.withModel(reader.getString()); - } else if ("egressPublicNetworkAccess".equals(fieldName)) { + } else if ("modelMountPath".equals(fieldName)) { + deserializedManagedOnlineDeployment.withModelMountPath(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { deserializedManagedOnlineDeployment - .withEgressPublicNetworkAccess(EgressPublicNetworkAccessType.fromString(reader.getString())); - } else if ("dataCollector".equals(fieldName)) { - deserializedManagedOnlineDeployment.withDataCollector(DataCollector.fromJson(reader)); + .withProvisioningState(DeploymentProvisioningState.fromString(reader.getString())); + } else if ("readinessProbe".equals(fieldName)) { + deserializedManagedOnlineDeployment.withReadinessProbe(ProbeSettings.fromJson(reader)); + } else if ("requestSettings".equals(fieldName)) { + deserializedManagedOnlineDeployment.withRequestSettings(OnlineRequestSettings.fromJson(reader)); + } else if ("scaleSettings".equals(fieldName)) { + deserializedManagedOnlineDeployment.withScaleSettings(OnlineScaleSettings.fromJson(reader)); } else if ("endpointComputeType".equals(fieldName)) { deserializedManagedOnlineDeployment.endpointComputeType = EndpointComputeType.fromString(reader.getString()); 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..a09b2b194004e --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedOnlineEndpointDeploymentResourceProperties.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.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The ManagedOnlineEndpointDeploymentResourceProperties model. + */ +@Fluent +public final class ManagedOnlineEndpointDeploymentResourceProperties extends EndpointDeploymentResourceProperties { + /* + * Kind of the deployment. + */ + private String type = "managedOnlineEndpoint"; + + /* + * Enum to determine endpoint compute type. + */ + private EndpointComputeType endpointComputeType; + + /* + * The model property. + */ + private String model; + + /** + * Creates an instance of ManagedOnlineEndpointDeploymentResourceProperties class. + */ + public ManagedOnlineEndpointDeploymentResourceProperties() { + } + + /** + * Get the type property: Kind of the deployment. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the endpointComputeType property: Enum to determine endpoint compute type. + * + * @return the endpointComputeType value. + */ + public EndpointComputeType endpointComputeType() { + return this.endpointComputeType; + } + + /** + * Set the endpointComputeType property: Enum to determine endpoint compute type. + * + * @param endpointComputeType the endpointComputeType value to set. + * @return the ManagedOnlineEndpointDeploymentResourceProperties object itself. + */ + public ManagedOnlineEndpointDeploymentResourceProperties + withEndpointComputeType(EndpointComputeType endpointComputeType) { + this.endpointComputeType = endpointComputeType; + return this; + } + + /** + * Get the model property: The model property. + * + * @return the model value. + */ + public String model() { + return this.model; + } + + /** + * Set the model property: The model property. + * + * @param model the model value to set. + * @return the ManagedOnlineEndpointDeploymentResourceProperties object itself. + */ + public ManagedOnlineEndpointDeploymentResourceProperties withModel(String model) { + this.model = model; + return this; + } + + /** + * {@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() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("failureReason", failureReason()); + jsonWriter.writeStringField("type", this.type); + jsonWriter.writeStringField("endpointComputeType", + this.endpointComputeType == null ? null : this.endpointComputeType.toString()); + jsonWriter.writeStringField("model", this.model); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedOnlineEndpointDeploymentResourceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedOnlineEndpointDeploymentResourceProperties if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedOnlineEndpointDeploymentResourceProperties. + */ + public static ManagedOnlineEndpointDeploymentResourceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedOnlineEndpointDeploymentResourceProperties deserializedManagedOnlineEndpointDeploymentResourceProperties + = new ManagedOnlineEndpointDeploymentResourceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("failureReason".equals(fieldName)) { + deserializedManagedOnlineEndpointDeploymentResourceProperties.withFailureReason(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedManagedOnlineEndpointDeploymentResourceProperties + .withProvisioningState(DefaultResourceProvisioningState.fromString(reader.getString())); + } else if ("type".equals(fieldName)) { + deserializedManagedOnlineEndpointDeploymentResourceProperties.type = reader.getString(); + } else if ("endpointComputeType".equals(fieldName)) { + deserializedManagedOnlineEndpointDeploymentResourceProperties.endpointComputeType + = EndpointComputeType.fromString(reader.getString()); + } else if ("model".equals(fieldName)) { + deserializedManagedOnlineEndpointDeploymentResourceProperties.model = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedOnlineEndpointDeploymentResourceProperties; + }); + } +} 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..2612cfc9940a1 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedOnlineEndpointResourceProperties.java @@ -0,0 +1,354 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the 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.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * The ManagedOnlineEndpointResourceProperties model. + */ +@Fluent +public final class ManagedOnlineEndpointResourceProperties extends EndpointResourceProperties { + /* + * Type of the endpoint. + */ + private EndpointType endpointType = EndpointType.MANAGED_ONLINE_ENDPOINT; + + /* + * Enum to determine endpoint authentication mode. + */ + private EndpointAuthMode authMode; + + /* + * The compute property. + */ + private String compute; + + /* + * The description property. + */ + private String description; + + /* + * Dictionary of + */ + private Map mirrorTraffic; + + /* + * The scoringUri property. + */ + private String scoringUri; + + /* + * Dictionary of + */ + private Map traffic; + + /** + * Creates an instance of ManagedOnlineEndpointResourceProperties class. + */ + public ManagedOnlineEndpointResourceProperties() { + } + + /** + * Get the endpointType property: Type of the endpoint. + * + * @return the endpointType value. + */ + @Override + public EndpointType endpointType() { + return this.endpointType; + } + + /** + * Get the authMode property: Enum to determine endpoint authentication mode. + * + * @return the authMode value. + */ + public EndpointAuthMode authMode() { + return this.authMode; + } + + /** + * Set the authMode property: Enum to determine endpoint authentication mode. + * + * @param authMode the authMode value to set. + * @return the ManagedOnlineEndpointResourceProperties object itself. + */ + public ManagedOnlineEndpointResourceProperties withAuthMode(EndpointAuthMode authMode) { + this.authMode = authMode; + return this; + } + + /** + * Get the compute property: The compute property. + * + * @return the compute value. + */ + public String compute() { + return this.compute; + } + + /** + * Set the compute property: The compute property. + * + * @param compute the compute value to set. + * @return the ManagedOnlineEndpointResourceProperties object itself. + */ + public ManagedOnlineEndpointResourceProperties withCompute(String compute) { + this.compute = compute; + return this; + } + + /** + * Get the description property: The description property. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description property. + * + * @param description the description value to set. + * @return the ManagedOnlineEndpointResourceProperties object itself. + */ + public ManagedOnlineEndpointResourceProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the mirrorTraffic property: Dictionary of <integer>. + * + * @return the mirrorTraffic value. + */ + public Map mirrorTraffic() { + return this.mirrorTraffic; + } + + /** + * Set the mirrorTraffic property: Dictionary of <integer>. + * + * @param mirrorTraffic the mirrorTraffic value to set. + * @return the ManagedOnlineEndpointResourceProperties object itself. + */ + public ManagedOnlineEndpointResourceProperties withMirrorTraffic(Map mirrorTraffic) { + this.mirrorTraffic = mirrorTraffic; + return this; + } + + /** + * Get the scoringUri property: The scoringUri property. + * + * @return the scoringUri value. + */ + public String scoringUri() { + return this.scoringUri; + } + + /** + * Set the scoringUri property: The scoringUri property. + * + * @param scoringUri the scoringUri value to set. + * @return the ManagedOnlineEndpointResourceProperties object itself. + */ + public ManagedOnlineEndpointResourceProperties withScoringUri(String scoringUri) { + this.scoringUri = scoringUri; + return this; + } + + /** + * Get the traffic property: Dictionary of <integer>. + * + * @return the traffic value. + */ + public Map traffic() { + return this.traffic; + } + + /** + * Set the traffic property: Dictionary of <integer>. + * + * @param traffic the traffic value to set. + * @return the ManagedOnlineEndpointResourceProperties object itself. + */ + public ManagedOnlineEndpointResourceProperties withTraffic(Map traffic) { + this.traffic = traffic; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedOnlineEndpointResourceProperties withAssociatedResourceId(String associatedResourceId) { + super.withAssociatedResourceId(associatedResourceId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedOnlineEndpointResourceProperties + withDeployments(List deployments) { + super.withDeployments(deployments); + 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 withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedOnlineEndpointResourceProperties withName(String name) { + super.withName(name); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ManagedOnlineEndpointResourceProperties + withShouldCreateAiServicesEndpoint(Boolean shouldCreateAiServicesEndpoint) { + super.withShouldCreateAiServicesEndpoint(shouldCreateAiServicesEndpoint); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (deployments() != null) { + deployments().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("associatedResourceId", associatedResourceId()); + jsonWriter.writeArrayField("deployments", deployments(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("endpointUri", endpointUri()); + jsonWriter.writeStringField("failureReason", failureReason()); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeStringField("name", name()); + jsonWriter.writeBooleanField("shouldCreateAiServicesEndpoint", shouldCreateAiServicesEndpoint()); + jsonWriter.writeStringField("endpointType", this.endpointType == null ? null : this.endpointType.toString()); + jsonWriter.writeStringField("authMode", this.authMode == null ? null : this.authMode.toString()); + jsonWriter.writeStringField("compute", this.compute); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeMapField("mirrorTraffic", this.mirrorTraffic, (writer, element) -> writer.writeInt(element)); + jsonWriter.writeStringField("scoringUri", this.scoringUri); + jsonWriter.writeMapField("traffic", this.traffic, (writer, element) -> writer.writeInt(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedOnlineEndpointResourceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedOnlineEndpointResourceProperties if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedOnlineEndpointResourceProperties. + */ + public static ManagedOnlineEndpointResourceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedOnlineEndpointResourceProperties deserializedManagedOnlineEndpointResourceProperties + = new ManagedOnlineEndpointResourceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("associatedResourceId".equals(fieldName)) { + deserializedManagedOnlineEndpointResourceProperties.withAssociatedResourceId(reader.getString()); + } else if ("deployments".equals(fieldName)) { + List deployments = reader + .readArray(reader1 -> EndpointDeploymentResourcePropertiesBasicResourceInner.fromJson(reader1)); + deserializedManagedOnlineEndpointResourceProperties.withDeployments(deployments); + } else if ("endpointUri".equals(fieldName)) { + deserializedManagedOnlineEndpointResourceProperties.withEndpointUri(reader.getString()); + } else if ("failureReason".equals(fieldName)) { + deserializedManagedOnlineEndpointResourceProperties.withFailureReason(reader.getString()); + } else if ("location".equals(fieldName)) { + deserializedManagedOnlineEndpointResourceProperties.withLocation(reader.getString()); + } else if ("name".equals(fieldName)) { + deserializedManagedOnlineEndpointResourceProperties.withName(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedManagedOnlineEndpointResourceProperties + .withProvisioningState(DefaultResourceProvisioningState.fromString(reader.getString())); + } else if ("shouldCreateAiServicesEndpoint".equals(fieldName)) { + deserializedManagedOnlineEndpointResourceProperties + .withShouldCreateAiServicesEndpoint(reader.getNullable(JsonReader::getBoolean)); + } else if ("endpointType".equals(fieldName)) { + deserializedManagedOnlineEndpointResourceProperties.endpointType + = EndpointType.fromString(reader.getString()); + } else if ("authMode".equals(fieldName)) { + deserializedManagedOnlineEndpointResourceProperties.authMode + = EndpointAuthMode.fromString(reader.getString()); + } else if ("compute".equals(fieldName)) { + deserializedManagedOnlineEndpointResourceProperties.compute = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedManagedOnlineEndpointResourceProperties.description = reader.getString(); + } else if ("mirrorTraffic".equals(fieldName)) { + Map mirrorTraffic = reader.readMap(reader1 -> reader1.getInt()); + deserializedManagedOnlineEndpointResourceProperties.mirrorTraffic = mirrorTraffic; + } else if ("scoringUri".equals(fieldName)) { + deserializedManagedOnlineEndpointResourceProperties.scoringUri = reader.getString(); + } else if ("traffic".equals(fieldName)) { + Map traffic = reader.readMap(reader1 -> reader1.getInt()); + deserializedManagedOnlineEndpointResourceProperties.traffic = traffic; + } else { + reader.skipChildren(); + } + } + + return deserializedManagedOnlineEndpointResourceProperties; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedPERequirement.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedPERequirement.java new file mode 100644 index 0000000000000..962eaef2c0062 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedPERequirement.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for ManagedPERequirement. + */ +public final class ManagedPERequirement extends ExpandableStringEnum { + /** + * Static value Required for ManagedPERequirement. + */ + public static final ManagedPERequirement REQUIRED = fromString("Required"); + + /** + * Static value NotRequired for ManagedPERequirement. + */ + public static final ManagedPERequirement NOT_REQUIRED = fromString("NotRequired"); + + /** + * Static value NotApplicable for ManagedPERequirement. + */ + public static final ManagedPERequirement NOT_APPLICABLE = fromString("NotApplicable"); + + /** + * Creates a new instance of ManagedPERequirement value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedPERequirement() { + } + + /** + * Creates or finds a ManagedPERequirement from its string representation. + * + * @param name a name to look for. + * @return the corresponding ManagedPERequirement. + */ + public static ManagedPERequirement fromString(String name) { + return fromString(name, ManagedPERequirement.class); + } + + /** + * Gets known ManagedPERequirement values. + * + * @return known ManagedPERequirement values. + */ + public static Collection values() { + return values(ManagedPERequirement.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedPEStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedPEStatus.java new file mode 100644 index 0000000000000..3e68eef62bfd0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedPEStatus.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for ManagedPEStatus. + */ +public final class ManagedPEStatus extends ExpandableStringEnum { + /** + * Static value Inactive for ManagedPEStatus. + */ + public static final ManagedPEStatus INACTIVE = fromString("Inactive"); + + /** + * Static value Active for ManagedPEStatus. + */ + public static final ManagedPEStatus ACTIVE = fromString("Active"); + + /** + * Static value NotApplicable for ManagedPEStatus. + */ + public static final ManagedPEStatus NOT_APPLICABLE = fromString("NotApplicable"); + + /** + * Creates a new instance of ManagedPEStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ManagedPEStatus() { + } + + /** + * Creates or finds a ManagedPEStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ManagedPEStatus. + */ + public static ManagedPEStatus fromString(String name) { + return fromString(name, ManagedPEStatus.class); + } + + /** + * Gets known ManagedPEStatus values. + * + * @return known ManagedPEStatus values. + */ + public static Collection values() { + return values(ManagedPEStatus.class); + } +} 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..9ed5b52f2644a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedResourceGroupAssignedIdentities.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.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.UUID; + +/** + * Details for managed resource group assigned identities. + */ +@Immutable +public final class ManagedResourceGroupAssignedIdentities + implements JsonSerializable { + /* + * Identity principal Id + */ + private UUID principalId; + + /** + * Creates an instance of ManagedResourceGroupAssignedIdentities class. + */ + public ManagedResourceGroupAssignedIdentities() { + } + + /** + * Get the principalId property: Identity principal Id. + * + * @return the principalId value. + */ + public UUID principalId() { + return this.principalId; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedResourceGroupAssignedIdentities from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedResourceGroupAssignedIdentities if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedResourceGroupAssignedIdentities. + */ + public static ManagedResourceGroupAssignedIdentities fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedResourceGroupAssignedIdentities deserializedManagedResourceGroupAssignedIdentities + = new ManagedResourceGroupAssignedIdentities(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("principalId".equals(fieldName)) { + deserializedManagedResourceGroupAssignedIdentities.principalId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedManagedResourceGroupAssignedIdentities; + }); + } +} 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..68d5b3eb6bdc0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedResourceGroupSettings.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the 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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Managed resource group settings. + */ +@Fluent +public final class ManagedResourceGroupSettings implements JsonSerializable { + /* + * List of assigned identities for the managed resource group + */ + 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()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("assignedIdentities", this.assignedIdentities, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ManagedResourceGroupSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ManagedResourceGroupSettings if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ManagedResourceGroupSettings. + */ + public static ManagedResourceGroupSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ManagedResourceGroupSettings deserializedManagedResourceGroupSettings = new ManagedResourceGroupSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("assignedIdentities".equals(fieldName)) { + List assignedIdentities + = reader.readArray(reader1 -> ManagedResourceGroupAssignedIdentities.fromJson(reader1)); + deserializedManagedResourceGroupSettings.assignedIdentities = assignedIdentities; + } else { + reader.skipChildren(); + } + } + + return deserializedManagedResourceGroupSettings; + }); + } +} 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 index 2b53cae773b4f..b9865ce75eda0 100644 --- 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 @@ -16,11 +16,6 @@ */ @Immutable public final class MarketplacePlan implements JsonSerializable { - /* - * The identifying name of the Publisher of the Marketplace Plan. - */ - private String publisherId; - /* * The identifying name of the Offer of the Marketplace Plan. */ @@ -31,19 +26,15 @@ public final class MarketplacePlan implements JsonSerializable */ private String planId; - /** - * Creates an instance of MarketplacePlan class. + /* + * The identifying name of the Publisher of the Marketplace Plan. */ - public MarketplacePlan() { - } + private String publisherId; /** - * Get the publisherId property: The identifying name of the Publisher of the Marketplace Plan. - * - * @return the publisherId value. + * Creates an instance of MarketplacePlan class. */ - public String publisherId() { - return this.publisherId; + public MarketplacePlan() { } /** @@ -64,6 +55,15 @@ public String planId() { return this.planId; } + /** + * Get the publisherId property: The identifying name of the Publisher of the Marketplace Plan. + * + * @return the publisherId value. + */ + public String publisherId() { + return this.publisherId; + } + /** * Validates the instance. * @@ -96,12 +96,12 @@ public static MarketplacePlan fromJson(JsonReader jsonReader) throws IOException String fieldName = reader.getFieldName(); reader.nextToken(); - if ("publisherId".equals(fieldName)) { - deserializedMarketplacePlan.publisherId = reader.getString(); - } else if ("offerId".equals(fieldName)) { + if ("offerId".equals(fieldName)) { deserializedMarketplacePlan.offerId = reader.getString(); } else if ("planId".equals(fieldName)) { deserializedMarketplacePlan.planId = reader.getString(); + } else if ("publisherId".equals(fieldName)) { + deserializedMarketplacePlan.publisherId = reader.getString(); } else { reader.skipChildren(); } 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 index 99bc5ab04a034..cd2c526afc59b 100644 --- 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 @@ -17,11 +17,6 @@ */ @Fluent public final class MarketplaceSubscriptionProperties implements JsonSerializable { - /* - * [Required] Target Marketplace Model ID to create a Marketplace Subscription for. - */ - private String modelId; - /* * Marketplace Plan associated with the Marketplace Subscription. */ @@ -32,6 +27,11 @@ public final class MarketplaceSubscriptionProperties implements JsonSerializable */ private MarketplaceSubscriptionStatus marketplaceSubscriptionStatus; + /* + * [Required] Target Marketplace Model ID to create a Marketplace Subscription for. + */ + private String modelId; + /* * Provisioning State of the Marketplace Subscription. */ @@ -44,41 +44,41 @@ public MarketplaceSubscriptionProperties() { } /** - * Get the modelId property: [Required] Target Marketplace Model ID to create a Marketplace Subscription for. + * Get the marketplacePlan property: Marketplace Plan associated with the Marketplace Subscription. * - * @return the modelId value. + * @return the marketplacePlan value. */ - public String modelId() { - return this.modelId; + public MarketplacePlan marketplacePlan() { + return this.marketplacePlan; } /** - * Set the modelId property: [Required] Target Marketplace Model ID to create a Marketplace Subscription for. + * Get the marketplaceSubscriptionStatus property: Current status of the Marketplace Subscription. * - * @param modelId the modelId value to set. - * @return the MarketplaceSubscriptionProperties object itself. + * @return the marketplaceSubscriptionStatus value. */ - public MarketplaceSubscriptionProperties withModelId(String modelId) { - this.modelId = modelId; - return this; + public MarketplaceSubscriptionStatus marketplaceSubscriptionStatus() { + return this.marketplaceSubscriptionStatus; } /** - * Get the marketplacePlan property: Marketplace Plan associated with the Marketplace Subscription. + * Get the modelId property: [Required] Target Marketplace Model ID to create a Marketplace Subscription for. * - * @return the marketplacePlan value. + * @return the modelId value. */ - public MarketplacePlan marketplacePlan() { - return this.marketplacePlan; + public String modelId() { + return this.modelId; } /** - * Get the marketplaceSubscriptionStatus property: Current status of the Marketplace Subscription. + * Set the modelId property: [Required] Target Marketplace Model ID to create a Marketplace Subscription for. * - * @return the marketplaceSubscriptionStatus value. + * @param modelId the modelId value to set. + * @return the MarketplaceSubscriptionProperties object itself. */ - public MarketplaceSubscriptionStatus marketplaceSubscriptionStatus() { - return this.marketplaceSubscriptionStatus; + public MarketplaceSubscriptionProperties withModelId(String modelId) { + this.modelId = modelId; + return this; } /** @@ -96,14 +96,14 @@ public MarketplaceSubscriptionProvisioningState provisioningState() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (marketplacePlan() != null) { + marketplacePlan().validate(); + } if (modelId() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( "Missing required property modelId in model MarketplaceSubscriptionProperties")); } - if (marketplacePlan() != null) { - marketplacePlan().validate(); - } } 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/MarketplaceSubscriptionResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MarketplaceSubscriptionResourceArmPaginatedResult.java index 2c9a7bb73b66c..1b3903fb7e228 100644 --- 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 @@ -20,14 +20,14 @@ public final class MarketplaceSubscriptionResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type MarketplaceSubscription. + * The link to the next page of MarketplaceSubscription objects. If null, there are no additional pages. */ - private List value; + private String nextLink; /* - * The link to the next page of MarketplaceSubscription objects. If null, there are no additional pages. + * An array of objects of type MarketplaceSubscription. */ - private String nextLink; + private List value; /** * Creates an instance of MarketplaceSubscriptionResourceArmPaginatedResult class. @@ -36,44 +36,44 @@ public MarketplaceSubscriptionResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type MarketplaceSubscription. + * Get the nextLink property: The link to the next page of MarketplaceSubscription objects. If null, there are no + * additional pages. * - * @return the value value. + * @return the nextLink value. */ - public List value() { - return this.value; + public String nextLink() { + return this.nextLink; } /** - * Set the value property: An array of objects of type MarketplaceSubscription. + * Set the nextLink property: The link to the next page of MarketplaceSubscription objects. If null, there are no + * additional pages. * - * @param value the value value to set. + * @param nextLink the nextLink value to set. * @return the MarketplaceSubscriptionResourceArmPaginatedResult object itself. */ - public MarketplaceSubscriptionResourceArmPaginatedResult withValue(List value) { - this.value = value; + public MarketplaceSubscriptionResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; return this; } /** - * Get the nextLink property: The link to the next page of MarketplaceSubscription objects. If null, there are no - * additional pages. + * Get the value property: An array of objects of type MarketplaceSubscription. * - * @return the nextLink value. + * @return the value value. */ - public String nextLink() { - return this.nextLink; + public List value() { + return this.value; } /** - * Set the nextLink property: The link to the next page of MarketplaceSubscription objects. If null, there are no - * additional pages. + * Set the value property: An array of objects of type MarketplaceSubscription. * - * @param nextLink the nextLink value to set. + * @param value the value value to set. * @return the MarketplaceSubscriptionResourceArmPaginatedResult object itself. */ - public MarketplaceSubscriptionResourceArmPaginatedResult withNextLink(String nextLink) { - this.nextLink = nextLink; + public MarketplaceSubscriptionResourceArmPaginatedResult withValue(List value) { + this.value = value; return this; } @@ -94,8 +94,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -115,12 +115,12 @@ public static MarketplaceSubscriptionResourceArmPaginatedResult fromJson(JsonRea String fieldName = reader.getFieldName(); reader.nextToken(); - if ("value".equals(fieldName)) { + if ("nextLink".equals(fieldName)) { + deserializedMarketplaceSubscriptionResourceArmPaginatedResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> MarketplaceSubscriptionInner.fromJson(reader1)); deserializedMarketplaceSubscriptionResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedMarketplaceSubscriptionResourceArmPaginatedResult.nextLink = reader.getString(); } else { reader.skipChildren(); } 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 index bf2062a00f756..3d1cc749a054e 100644 --- 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 @@ -17,16 +17,6 @@ */ @Fluent public final class MaterializationSettings implements JsonSerializable { - /* - * Specifies the stores to which materialization should happen - */ - private MaterializationStoreType storeType; - - /* - * Specifies the schedule details - */ - private RecurrenceTrigger schedule; - /* * Specifies the notification details */ @@ -38,54 +28,24 @@ public final class MaterializationSettings implements JsonSerializable sparkConfiguration; - - /** - * Creates an instance of MaterializationSettings class. - */ - public MaterializationSettings() { - } - - /** - * Get the storeType property: Specifies the stores to which materialization should happen. - * - * @return the storeType value. + * Specifies the schedule details */ - public MaterializationStoreType storeType() { - return this.storeType; - } + private RecurrenceTrigger schedule; - /** - * Set the storeType property: Specifies the stores to which materialization should happen. - * - * @param storeType the storeType value to set. - * @return the MaterializationSettings object itself. + /* + * Specifies the spark compute settings */ - public MaterializationSettings withStoreType(MaterializationStoreType storeType) { - this.storeType = storeType; - return this; - } + private Map sparkConfiguration; - /** - * Get the schedule property: Specifies the schedule details. - * - * @return the schedule value. + /* + * Specifies the stores to which materialization should happen */ - public RecurrenceTrigger schedule() { - return this.schedule; - } + private MaterializationStoreType storeType; /** - * Set the schedule property: Specifies the schedule details. - * - * @param schedule the schedule value to set. - * @return the MaterializationSettings object itself. + * Creates an instance of MaterializationSettings class. */ - public MaterializationSettings withSchedule(RecurrenceTrigger schedule) { - this.schedule = schedule; - return this; + public MaterializationSettings() { } /** @@ -128,6 +88,26 @@ public MaterializationSettings withResource(MaterializationComputeResource resou 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. * @@ -148,21 +128,41 @@ public MaterializationSettings withSparkConfiguration(Map sparkC 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 (schedule() != null) { - schedule().validate(); - } if (notification() != null) { notification().validate(); } if (resource() != null) { resource().validate(); } + if (schedule() != null) { + schedule().validate(); + } } /** @@ -171,12 +171,12 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("storeType", this.storeType == null ? null : this.storeType.toString()); - jsonWriter.writeJsonField("schedule", this.schedule); jsonWriter.writeJsonField("notification", this.notification); jsonWriter.writeJsonField("resource", this.resource); + jsonWriter.writeJsonField("schedule", this.schedule); jsonWriter.writeMapField("sparkConfiguration", this.sparkConfiguration, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("storeType", this.storeType == null ? null : this.storeType.toString()); return jsonWriter.writeEndObject(); } @@ -195,18 +195,18 @@ public static MaterializationSettings fromJson(JsonReader jsonReader) throws IOE String fieldName = reader.getFieldName(); reader.nextToken(); - if ("storeType".equals(fieldName)) { - deserializedMaterializationSettings.storeType - = MaterializationStoreType.fromString(reader.getString()); - } else if ("schedule".equals(fieldName)) { - deserializedMaterializationSettings.schedule = RecurrenceTrigger.fromJson(reader); - } else if ("notification".equals(fieldName)) { + if ("notification".equals(fieldName)) { deserializedMaterializationSettings.notification = NotificationSetting.fromJson(reader); } else if ("resource".equals(fieldName)) { deserializedMaterializationSettings.resource = MaterializationComputeResource.fromJson(reader); + } else if ("schedule".equals(fieldName)) { + deserializedMaterializationSettings.schedule = RecurrenceTrigger.fromJson(reader); } else if ("sparkConfiguration".equals(fieldName)) { Map sparkConfiguration = reader.readMap(reader1 -> reader1.getString()); deserializedMaterializationSettings.sparkConfiguration = sparkConfiguration; + } else if ("storeType".equals(fieldName)) { + deserializedMaterializationSettings.storeType + = MaterializationStoreType.fromString(reader.getString()); } else { reader.skipChildren(); } 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 dc27f903d2f3f..002509503d586 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 @@ -40,8 +40,8 @@ public EarlyTerminationPolicyType policyType() { * {@inheritDoc} */ @Override - public MedianStoppingPolicy withEvaluationInterval(Integer evaluationInterval) { - super.withEvaluationInterval(evaluationInterval); + public MedianStoppingPolicy withDelayEvaluation(Integer delayEvaluation) { + super.withDelayEvaluation(delayEvaluation); return this; } @@ -49,8 +49,8 @@ public MedianStoppingPolicy withEvaluationInterval(Integer evaluationInterval) { * {@inheritDoc} */ @Override - public MedianStoppingPolicy withDelayEvaluation(Integer delayEvaluation) { - super.withDelayEvaluation(delayEvaluation); + public MedianStoppingPolicy withEvaluationInterval(Integer evaluationInterval) { + super.withEvaluationInterval(evaluationInterval); return this; } @@ -61,7 +61,6 @@ public MedianStoppingPolicy withDelayEvaluation(Integer delayEvaluation) { */ @Override public void validate() { - super.validate(); } /** @@ -70,8 +69,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("evaluationInterval", evaluationInterval()); jsonWriter.writeNumberField("delayEvaluation", delayEvaluation()); + jsonWriter.writeNumberField("evaluationInterval", evaluationInterval()); jsonWriter.writeStringField("policyType", this.policyType == null ? null : this.policyType.toString()); return jsonWriter.writeEndObject(); } @@ -91,10 +90,10 @@ public static MedianStoppingPolicy fromJson(JsonReader jsonReader) throws IOExce String fieldName = reader.getFieldName(); reader.nextToken(); - if ("evaluationInterval".equals(fieldName)) { - deserializedMedianStoppingPolicy.withEvaluationInterval(reader.getNullable(JsonReader::getInt)); - } else if ("delayEvaluation".equals(fieldName)) { + if ("delayEvaluation".equals(fieldName)) { deserializedMedianStoppingPolicy.withDelayEvaluation(reader.getNullable(JsonReader::getInt)); + } else if ("evaluationInterval".equals(fieldName)) { + deserializedMedianStoppingPolicy.withEvaluationInterval(reader.getNullable(JsonReader::getInt)); } else if ("policyType".equals(fieldName)) { deserializedMedianStoppingPolicy.policyType = EarlyTerminationPolicyType.fromString(reader.getString()); 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..9affd91ca6cdb --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MlflowAutologger.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import 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. + */ + 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/ModelContainerProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerProperties.java index bdaf4f96244c6..630254e0cbb5b 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 @@ -22,14 +22,14 @@ public final class ModelContainerProperties extends AssetContainer { private AssetProvisioningState provisioningState; /* - * The latest version inside this container. + * The next auto incremental version */ - private String latestVersion; + private String nextVersion; /* - * The next auto incremental version + * The latest version inside this container. */ - private String nextVersion; + private String latestVersion; /** * Creates an instance of ModelContainerProperties class. @@ -47,23 +47,23 @@ public AssetProvisioningState provisioningState() { } /** - * Get the latestVersion property: The latest version inside this container. + * Get the nextVersion property: The next auto incremental version. * - * @return the latestVersion value. + * @return the nextVersion value. */ @Override - public String latestVersion() { - return this.latestVersion; + public String nextVersion() { + return this.nextVersion; } /** - * Get the nextVersion property: The next auto incremental version. + * Get the latestVersion property: The latest version inside this container. * - * @return the nextVersion value. + * @return the latestVersion value. */ @Override - public String nextVersion() { - return this.nextVersion; + public String latestVersion() { + return this.latestVersion; } /** @@ -88,8 +88,8 @@ public ModelContainerProperties withDescription(String description) { * {@inheritDoc} */ @Override - public ModelContainerProperties withTags(Map tags) { - super.withTags(tags); + public ModelContainerProperties withProperties(Map properties) { + super.withProperties(properties); return this; } @@ -97,8 +97,8 @@ public ModelContainerProperties withTags(Map tags) { * {@inheritDoc} */ @Override - public ModelContainerProperties withProperties(Map properties) { - super.withProperties(properties); + public ModelContainerProperties withTags(Map tags) { + super.withTags(tags); return this; } @@ -109,7 +109,6 @@ public ModelContainerProperties withProperties(Map properties) { */ @Override public void validate() { - super.validate(); } /** @@ -119,8 +118,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isArchived", isArchived()); return jsonWriter.writeEndObject(); } @@ -142,12 +141,12 @@ public static ModelContainerProperties fromJson(JsonReader jsonReader) throws IO if ("description".equals(fieldName)) { deserializedModelContainerProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedModelContainerProperties.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedModelContainerProperties.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedModelContainerProperties.withTags(tags); } else if ("isArchived".equals(fieldName)) { deserializedModelContainerProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("latestVersion".equals(fieldName)) { 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 bb34f6608d076..c35292b3cec13 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 @@ -20,14 +20,14 @@ public final class ModelContainerResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type ModelContainer. + * The link to the next page of ModelContainer objects. If null, there are no additional pages. */ - private List value; + private String nextLink; /* - * The link to the next page of ModelContainer objects. If null, there are no additional pages. + * An array of objects of type ModelContainer. */ - private String nextLink; + private List value; /** * Creates an instance of ModelContainerResourceArmPaginatedResult class. @@ -36,44 +36,44 @@ public ModelContainerResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type ModelContainer. + * Get the nextLink property: The link to the next page of ModelContainer objects. If null, there are no additional + * pages. * - * @return the value value. + * @return the nextLink value. */ - public List value() { - return this.value; + public String nextLink() { + return this.nextLink; } /** - * Set the value property: An array of objects of type ModelContainer. + * Set the nextLink property: The link to the next page of ModelContainer objects. If null, there are no additional + * pages. * - * @param value the value value to set. + * @param nextLink the nextLink value to set. * @return the ModelContainerResourceArmPaginatedResult object itself. */ - public ModelContainerResourceArmPaginatedResult withValue(List value) { - this.value = value; + public ModelContainerResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; return this; } /** - * Get the nextLink property: The link to the next page of ModelContainer objects. If null, there are no additional - * pages. + * Get the value property: An array of objects of type ModelContainer. * - * @return the nextLink value. + * @return the value value. */ - public String nextLink() { - return this.nextLink; + public List value() { + return this.value; } /** - * Set the nextLink property: The link to the next page of ModelContainer objects. If null, there are no additional - * pages. + * Set the value property: An array of objects of type ModelContainer. * - * @param nextLink the nextLink value to set. + * @param value the value value to set. * @return the ModelContainerResourceArmPaginatedResult object itself. */ - public ModelContainerResourceArmPaginatedResult withNextLink(String nextLink) { - this.nextLink = nextLink; + public ModelContainerResourceArmPaginatedResult withValue(List value) { + this.value = value; return this; } @@ -94,8 +94,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -115,12 +115,12 @@ public static ModelContainerResourceArmPaginatedResult fromJson(JsonReader jsonR String fieldName = reader.getFieldName(); reader.nextToken(); - if ("value".equals(fieldName)) { + if ("nextLink".equals(fieldName)) { + deserializedModelContainerResourceArmPaginatedResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> ModelContainerInner.fromJson(reader1)); deserializedModelContainerResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedModelContainerResourceArmPaginatedResult.nextLink = reader.getString(); } else { reader.skipChildren(); } 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..36cd7a335e7de --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelLifecycleStatus.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import 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. + */ + 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/ModelProvider.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelProvider.java new file mode 100644 index 0000000000000..afde2dc830908 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelProvider.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import 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. + */ + 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/ModelVersionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionProperties.java index 2c7b589101913..358ece74b61b7 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 @@ -21,6 +21,11 @@ public final class ModelVersionProperties extends AssetBase { */ private Map flavors; + /* + * Name of the training job which produced this model + */ + private String jobName; + /* * The storage format for this entity. Used for NCD. */ @@ -31,11 +36,6 @@ public final class ModelVersionProperties extends AssetBase { */ private String modelUri; - /* - * Name of the training job which produced this model - */ - private String jobName; - /* * Provisioning state for the model version. */ @@ -72,6 +72,26 @@ public ModelVersionProperties withFlavors(Map flavors) { return this; } + /** + * Get the jobName property: Name of the training job which produced this model. + * + * @return the jobName value. + */ + public String jobName() { + return this.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. + */ + public ModelVersionProperties withJobName(String jobName) { + this.jobName = jobName; + return this; + } + /** * Get the modelType property: The storage format for this entity. Used for NCD. * @@ -112,26 +132,6 @@ public ModelVersionProperties withModelUri(String modelUri) { return this; } - /** - * Get the jobName property: Name of the training job which produced this model. - * - * @return the jobName value. - */ - public String jobName() { - return this.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. - */ - public ModelVersionProperties withJobName(String jobName) { - this.jobName = jobName; - return this; - } - /** * Get the provisioningState property: Provisioning state for the model version. * @@ -165,8 +165,8 @@ public ModelVersionProperties withStage(String stage) { * {@inheritDoc} */ @Override - public ModelVersionProperties withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); + public ModelVersionProperties withIsAnonymous(Boolean isAnonymous) { + super.withIsAnonymous(isAnonymous); return this; } @@ -174,8 +174,8 @@ public ModelVersionProperties withIsArchived(Boolean isArchived) { * {@inheritDoc} */ @Override - public ModelVersionProperties withIsAnonymous(Boolean isAnonymous) { - super.withIsAnonymous(isAnonymous); + public ModelVersionProperties withIsArchived(Boolean isArchived) { + super.withIsArchived(isArchived); return this; } @@ -192,8 +192,8 @@ public ModelVersionProperties withDescription(String description) { * {@inheritDoc} */ @Override - public ModelVersionProperties withTags(Map tags) { - super.withTags(tags); + public ModelVersionProperties withProperties(Map properties) { + super.withProperties(properties); return this; } @@ -201,8 +201,8 @@ public ModelVersionProperties withTags(Map tags) { * {@inheritDoc} */ @Override - public ModelVersionProperties withProperties(Map properties) { - super.withProperties(properties); + public ModelVersionProperties withTags(Map tags) { + super.withTags(tags); return this; } @@ -213,7 +213,6 @@ public ModelVersionProperties withProperties(Map properties) { */ @Override public void validate() { - super.validate(); if (flavors() != null) { flavors().values().forEach(e -> { if (e != null) { @@ -230,14 +229,14 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", isArchived()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isAnonymous", isAnonymous()); + jsonWriter.writeBooleanField("isArchived", isArchived()); jsonWriter.writeMapField("flavors", this.flavors, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("jobName", this.jobName); jsonWriter.writeStringField("modelType", this.modelType); jsonWriter.writeStringField("modelUri", this.modelUri); - jsonWriter.writeStringField("jobName", this.jobName); jsonWriter.writeStringField("stage", this.stage); return jsonWriter.writeEndObject(); } @@ -259,25 +258,25 @@ public static ModelVersionProperties fromJson(JsonReader jsonReader) throws IOEx if ("description".equals(fieldName)) { deserializedModelVersionProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedModelVersionProperties.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedModelVersionProperties.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedModelVersionProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedModelVersionProperties.withTags(tags); } else if ("isAnonymous".equals(fieldName)) { deserializedModelVersionProperties.withIsAnonymous(reader.getNullable(JsonReader::getBoolean)); + } else if ("isArchived".equals(fieldName)) { + deserializedModelVersionProperties.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("flavors".equals(fieldName)) { Map flavors = reader.readMap(reader1 -> FlavorData.fromJson(reader1)); deserializedModelVersionProperties.flavors = flavors; + } else if ("jobName".equals(fieldName)) { + deserializedModelVersionProperties.jobName = reader.getString(); } else if ("modelType".equals(fieldName)) { deserializedModelVersionProperties.modelType = reader.getString(); } else if ("modelUri".equals(fieldName)) { deserializedModelVersionProperties.modelUri = reader.getString(); - } else if ("jobName".equals(fieldName)) { - deserializedModelVersionProperties.jobName = reader.getString(); } else if ("provisioningState".equals(fieldName)) { deserializedModelVersionProperties.provisioningState = AssetProvisioningState.fromString(reader.getString()); 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 e25ce546e2237..39d36440989ad 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 @@ -20,14 +20,14 @@ public final class ModelVersionResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type ModelVersion. + * The link to the next page of ModelVersion objects. If null, there are no additional pages. */ - private List value; + private String nextLink; /* - * The link to the next page of ModelVersion objects. If null, there are no additional pages. + * An array of objects of type ModelVersion. */ - private String nextLink; + private List value; /** * Creates an instance of ModelVersionResourceArmPaginatedResult class. @@ -36,44 +36,44 @@ public ModelVersionResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type ModelVersion. + * Get the nextLink property: The link to the next page of ModelVersion objects. If null, there are no additional + * pages. * - * @return the value value. + * @return the nextLink value. */ - public List value() { - return this.value; + public String nextLink() { + return this.nextLink; } /** - * Set the value property: An array of objects of type ModelVersion. + * Set the nextLink property: The link to the next page of ModelVersion objects. If null, there are no additional + * pages. * - * @param value the value value to set. + * @param nextLink the nextLink value to set. * @return the ModelVersionResourceArmPaginatedResult object itself. */ - public ModelVersionResourceArmPaginatedResult withValue(List value) { - this.value = value; + public ModelVersionResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; return this; } /** - * Get the nextLink property: The link to the next page of ModelVersion objects. If null, there are no additional - * pages. + * Get the value property: An array of objects of type ModelVersion. * - * @return the nextLink value. + * @return the value value. */ - public String nextLink() { - return this.nextLink; + public List value() { + return this.value; } /** - * Set the nextLink property: The link to the next page of ModelVersion objects. If null, there are no additional - * pages. + * Set the value property: An array of objects of type ModelVersion. * - * @param nextLink the nextLink value to set. + * @param value the value value to set. * @return the ModelVersionResourceArmPaginatedResult object itself. */ - public ModelVersionResourceArmPaginatedResult withNextLink(String nextLink) { - this.nextLink = nextLink; + public ModelVersionResourceArmPaginatedResult withValue(List value) { + this.value = value; return this; } @@ -94,8 +94,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -115,11 +115,11 @@ public static ModelVersionResourceArmPaginatedResult fromJson(JsonReader jsonRea String fieldName = reader.getFieldName(); reader.nextToken(); - if ("value".equals(fieldName)) { + if ("nextLink".equals(fieldName)) { + deserializedModelVersionResourceArmPaginatedResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> ModelVersionInner.fromJson(reader1)); deserializedModelVersionResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedModelVersionResourceArmPaginatedResult.nextLink = reader.getString(); } else { reader.skipChildren(); } 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 index cf097a552e4bf..b1d30e4170433 100644 --- 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 @@ -19,24 +19,24 @@ @Fluent public final class MonitorDefinition implements JsonSerializable { /* - * The entities targeted by the monitor. + * The monitor's notification settings. */ - private MonitoringTarget monitoringTarget; + private MonitorNotificationSettings alertNotificationSettings; /* - * [Required] The signals to monitor. + * [Required] The ARM resource ID of the compute resource to run the monitoring job on. */ - private Map signals; + private MonitorComputeConfigurationBase computeConfiguration; /* - * [Required] The ARM resource ID of the compute resource to run the monitoring job on. + * The entities targeted by the monitor. */ - private MonitorComputeConfigurationBase computeConfiguration; + private MonitoringTarget monitoringTarget; /* - * The monitor's notification settings. + * [Required] The signals to monitor. */ - private MonitorNotificationSettings alertNotificationSettings; + private Map signals; /** * Creates an instance of MonitorDefinition class. @@ -45,84 +45,84 @@ public MonitorDefinition() { } /** - * Get the monitoringTarget property: The entities targeted by the monitor. + * Get the alertNotificationSettings property: The monitor's notification settings. * - * @return the monitoringTarget value. + * @return the alertNotificationSettings value. */ - public MonitoringTarget monitoringTarget() { - return this.monitoringTarget; + public MonitorNotificationSettings alertNotificationSettings() { + return this.alertNotificationSettings; } /** - * Set the monitoringTarget property: The entities targeted by the monitor. + * Set the alertNotificationSettings property: The monitor's notification settings. * - * @param monitoringTarget the monitoringTarget value to set. + * @param alertNotificationSettings the alertNotificationSettings value to set. * @return the MonitorDefinition object itself. */ - public MonitorDefinition withMonitoringTarget(MonitoringTarget monitoringTarget) { - this.monitoringTarget = monitoringTarget; + public MonitorDefinition withAlertNotificationSettings(MonitorNotificationSettings alertNotificationSettings) { + this.alertNotificationSettings = alertNotificationSettings; return this; } /** - * Get the signals property: [Required] The signals to monitor. + * Get the computeConfiguration property: [Required] The ARM resource ID of the compute resource to run the + * monitoring job on. * - * @return the signals value. + * @return the computeConfiguration value. */ - public Map signals() { - return this.signals; + public MonitorComputeConfigurationBase computeConfiguration() { + return this.computeConfiguration; } /** - * Set the signals property: [Required] The signals to monitor. + * Set the computeConfiguration property: [Required] The ARM resource ID of the compute resource to run the + * monitoring job on. * - * @param signals the signals value to set. + * @param computeConfiguration the computeConfiguration value to set. * @return the MonitorDefinition object itself. */ - public MonitorDefinition withSignals(Map signals) { - this.signals = signals; + public MonitorDefinition withComputeConfiguration(MonitorComputeConfigurationBase computeConfiguration) { + this.computeConfiguration = computeConfiguration; return this; } /** - * Get the computeConfiguration property: [Required] The ARM resource ID of the compute resource to run the - * monitoring job on. + * Get the monitoringTarget property: The entities targeted by the monitor. * - * @return the computeConfiguration value. + * @return the monitoringTarget value. */ - public MonitorComputeConfigurationBase computeConfiguration() { - return this.computeConfiguration; + public MonitoringTarget monitoringTarget() { + return this.monitoringTarget; } /** - * Set the computeConfiguration property: [Required] The ARM resource ID of the compute resource to run the - * monitoring job on. + * Set the monitoringTarget property: The entities targeted by the monitor. * - * @param computeConfiguration the computeConfiguration value to set. + * @param monitoringTarget the monitoringTarget value to set. * @return the MonitorDefinition object itself. */ - public MonitorDefinition withComputeConfiguration(MonitorComputeConfigurationBase computeConfiguration) { - this.computeConfiguration = computeConfiguration; + public MonitorDefinition withMonitoringTarget(MonitoringTarget monitoringTarget) { + this.monitoringTarget = monitoringTarget; return this; } /** - * Get the alertNotificationSettings property: The monitor's notification settings. + * Get the signals property: [Required] The signals to monitor. * - * @return the alertNotificationSettings value. + * @return the signals value. */ - public MonitorNotificationSettings alertNotificationSettings() { - return this.alertNotificationSettings; + public Map signals() { + return this.signals; } /** - * Set the alertNotificationSettings property: The monitor's notification settings. + * Set the signals property: [Required] The signals to monitor. * - * @param alertNotificationSettings the alertNotificationSettings value to set. + * @param signals the signals value to set. * @return the MonitorDefinition object itself. */ - public MonitorDefinition withAlertNotificationSettings(MonitorNotificationSettings alertNotificationSettings) { - this.alertNotificationSettings = alertNotificationSettings; + public MonitorDefinition withSignals(Map signals) { + this.signals = signals; return this; } @@ -132,6 +132,16 @@ public MonitorDefinition withAlertNotificationSettings(MonitorNotificationSettin * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (alertNotificationSettings() != null) { + alertNotificationSettings().validate(); + } + if (computeConfiguration() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property computeConfiguration in model MonitorDefinition")); + } else { + computeConfiguration().validate(); + } if (monitoringTarget() != null) { monitoringTarget().validate(); } @@ -145,16 +155,6 @@ public void validate() { } }); } - if (computeConfiguration() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property computeConfiguration in model MonitorDefinition")); - } else { - computeConfiguration().validate(); - } - if (alertNotificationSettings() != null) { - alertNotificationSettings().validate(); - } } private static final ClientLogger LOGGER = new ClientLogger(MonitorDefinition.class); @@ -165,10 +165,10 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeMapField("signals", this.signals, (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("computeConfiguration", this.computeConfiguration); - jsonWriter.writeJsonField("monitoringTarget", this.monitoringTarget); + jsonWriter.writeMapField("signals", this.signals, (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("alertNotificationSettings", this.alertNotificationSettings); + jsonWriter.writeJsonField("monitoringTarget", this.monitoringTarget); return jsonWriter.writeEndObject(); } @@ -188,18 +188,18 @@ public static MonitorDefinition fromJson(JsonReader jsonReader) throws IOExcepti String fieldName = reader.getFieldName(); reader.nextToken(); - if ("signals".equals(fieldName)) { + if ("computeConfiguration".equals(fieldName)) { + deserializedMonitorDefinition.computeConfiguration + = MonitorComputeConfigurationBase.fromJson(reader); + } else if ("signals".equals(fieldName)) { Map signals = reader.readMap(reader1 -> MonitoringSignalBase.fromJson(reader1)); deserializedMonitorDefinition.signals = signals; - } else if ("computeConfiguration".equals(fieldName)) { - deserializedMonitorDefinition.computeConfiguration - = MonitorComputeConfigurationBase.fromJson(reader); - } else if ("monitoringTarget".equals(fieldName)) { - deserializedMonitorDefinition.monitoringTarget = MonitoringTarget.fromJson(reader); } else if ("alertNotificationSettings".equals(fieldName)) { deserializedMonitorDefinition.alertNotificationSettings = MonitorNotificationSettings.fromJson(reader); + } else if ("monitoringTarget".equals(fieldName)) { + deserializedMonitorDefinition.monitoringTarget = MonitoringTarget.fromJson(reader); } else { reader.skipChildren(); } 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 index 84973c6525064..11b971637544b 100644 --- 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 @@ -121,7 +121,6 @@ public MonitorServerlessSparkCompute withRuntimeVersion(String runtimeVersion) { */ @Override public void validate() { - super.validate(); if (computeIdentity() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( 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 index 7a432a4c085c6..89a21ca045f4a 100644 --- 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 @@ -23,6 +23,11 @@ public class MonitoringInputDataBase implements JsonSerializable columns; + /* * The context metadata of the data source. */ @@ -38,11 +43,6 @@ public class MonitoringInputDataBase implements JsonSerializable columns; - /** * Creates an instance of MonitoringInputDataBase class. */ @@ -58,6 +58,26 @@ public MonitoringInputDataType inputDataType() { return this.inputDataType; } + /** + * 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. * @@ -118,26 +138,6 @@ public MonitoringInputDataBase withUri(String uri) { return this; } - /** - * 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; - } - /** * Validates the instance. * @@ -166,8 +166,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("jobInputType", this.jobInputType == null ? null : this.jobInputType.toString()); jsonWriter.writeStringField("uri", this.uri); jsonWriter.writeStringField("inputDataType", this.inputDataType == null ? null : this.inputDataType.toString()); - jsonWriter.writeStringField("dataContext", this.dataContext); jsonWriter.writeMapField("columns", this.columns, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("dataContext", this.dataContext); return jsonWriter.writeEndObject(); } @@ -223,11 +223,11 @@ static MonitoringInputDataBase fromJsonKnownDiscriminator(JsonReader jsonReader) } else if ("inputDataType".equals(fieldName)) { deserializedMonitoringInputDataBase.inputDataType = MonitoringInputDataType.fromString(reader.getString()); - } else if ("dataContext".equals(fieldName)) { - deserializedMonitoringInputDataBase.dataContext = reader.getString(); } else if ("columns".equals(fieldName)) { Map columns = reader.readMap(reader1 -> reader1.getString()); deserializedMonitoringInputDataBase.columns = columns; + } else if ("dataContext".equals(fieldName)) { + deserializedMonitoringInputDataBase.dataContext = reader.getString(); } else { reader.skipChildren(); } 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 index e3b8d2c058cfb..1b05c6637f170 100644 --- 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 @@ -18,14 +18,14 @@ @Fluent public final class MonitoringTarget implements JsonSerializable { /* - * Reference to the model asset targeted by this monitor. + * Reference to the deployment asset targeted by this monitor. */ - private String modelId; + private String deploymentId; /* - * Reference to the deployment asset targeted by this monitor. + * Reference to the model asset targeted by this monitor. */ - private String deploymentId; + private String modelId; /* * [Required] The machine learning task type of the monitored model. @@ -39,42 +39,42 @@ public MonitoringTarget() { } /** - * Get the modelId property: Reference to the model asset targeted by this monitor. + * Get the deploymentId property: Reference to the deployment asset targeted by this monitor. * - * @return the modelId value. + * @return the deploymentId value. */ - public String modelId() { - return this.modelId; + public String deploymentId() { + return this.deploymentId; } /** - * Set the modelId property: Reference to the model asset targeted by this monitor. + * Set the deploymentId property: Reference to the deployment asset targeted by this monitor. * - * @param modelId the modelId value to set. + * @param deploymentId the deploymentId value to set. * @return the MonitoringTarget object itself. */ - public MonitoringTarget withModelId(String modelId) { - this.modelId = modelId; + public MonitoringTarget withDeploymentId(String deploymentId) { + this.deploymentId = deploymentId; return this; } /** - * Get the deploymentId property: Reference to the deployment asset targeted by this monitor. + * Get the modelId property: Reference to the model asset targeted by this monitor. * - * @return the deploymentId value. + * @return the modelId value. */ - public String deploymentId() { - return this.deploymentId; + public String modelId() { + return this.modelId; } /** - * Set the deploymentId property: Reference to the deployment asset targeted by this monitor. + * Set the modelId property: Reference to the model asset targeted by this monitor. * - * @param deploymentId the deploymentId value to set. + * @param modelId the modelId value to set. * @return the MonitoringTarget object itself. */ - public MonitoringTarget withDeploymentId(String deploymentId) { - this.deploymentId = deploymentId; + public MonitoringTarget withModelId(String modelId) { + this.modelId = modelId; return this; } @@ -119,8 +119,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("taskType", this.taskType == null ? null : this.taskType.toString()); - jsonWriter.writeStringField("modelId", this.modelId); jsonWriter.writeStringField("deploymentId", this.deploymentId); + jsonWriter.writeStringField("modelId", this.modelId); return jsonWriter.writeEndObject(); } @@ -142,10 +142,10 @@ public static MonitoringTarget fromJson(JsonReader jsonReader) throws IOExceptio if ("taskType".equals(fieldName)) { deserializedMonitoringTarget.taskType = ModelTaskType.fromString(reader.getString()); - } else if ("modelId".equals(fieldName)) { - deserializedMonitoringTarget.modelId = reader.getString(); } else if ("deploymentId".equals(fieldName)) { deserializedMonitoringTarget.deploymentId = reader.getString(); + } else if ("modelId".equals(fieldName)) { + deserializedMonitoringTarget.modelId = reader.getString(); } else { reader.skipChildren(); } 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..694c3ab8e1c39 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountMode.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import 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. + */ + 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/Mpi.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Mpi.java index 4819ae9be889a..24d19a53f9cef 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 @@ -68,7 +68,6 @@ public Mpi withProcessCountPerInstance(Integer processCountPerInstance) { */ @Override public void validate() { - super.validate(); } /** diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NetworkAcls.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NetworkAcls.java new file mode 100644 index 0000000000000..50d6265ea2eed --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NetworkAcls.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.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The NetworkAcls model. + */ +@Fluent +public final class NetworkAcls implements JsonSerializable { + /* + * The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after the + * bypass property has been evaluated. + */ + private DefaultActionType defaultAction; + + /* + * Rules governing the accessibility of a resource from a specific ip address or ip range. + */ + private List ipRules; + + /** + * Creates an instance of NetworkAcls class. + */ + public NetworkAcls() { + } + + /** + * Get the defaultAction property: The default action when no rule from ipRules and from virtualNetworkRules match. + * This is only used after the bypass property has been evaluated. + * + * @return the defaultAction value. + */ + public DefaultActionType defaultAction() { + return this.defaultAction; + } + + /** + * Set the defaultAction property: The default action when no rule from ipRules and from virtualNetworkRules match. + * This is only used after the bypass property has been evaluated. + * + * @param defaultAction the defaultAction value to set. + * @return the NetworkAcls object itself. + */ + public NetworkAcls withDefaultAction(DefaultActionType defaultAction) { + this.defaultAction = defaultAction; + return this; + } + + /** + * Get the ipRules property: Rules governing the accessibility of a resource from a specific ip address or ip range. + * + * @return the ipRules value. + */ + public List ipRules() { + return this.ipRules; + } + + /** + * Set the ipRules property: Rules governing the accessibility of a resource from a specific ip address or ip range. + * + * @param ipRules the ipRules value to set. + * @return the NetworkAcls object itself. + */ + public NetworkAcls withIpRules(List ipRules) { + this.ipRules = ipRules; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (ipRules() != null) { + ipRules().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("defaultAction", this.defaultAction == null ? null : this.defaultAction.toString()); + jsonWriter.writeArrayField("ipRules", this.ipRules, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkAcls from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkAcls if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkAcls. + */ + public static NetworkAcls fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkAcls deserializedNetworkAcls = new NetworkAcls(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("defaultAction".equals(fieldName)) { + deserializedNetworkAcls.defaultAction = DefaultActionType.fromString(reader.getString()); + } else if ("ipRules".equals(fieldName)) { + List ipRules = reader.readArray(reader1 -> IpRule.fromJson(reader1)); + deserializedNetworkAcls.ipRules = ipRules; + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkAcls; + }); + } +} 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 1f17d8081c850..5d4df2b0343bc 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 @@ -18,14 +18,14 @@ @Fluent public class NlpVertical implements JsonSerializable { /* - * Execution constraints for AutoMLJob. + * Featurization inputs needed for AutoML job. */ - private NlpVerticalLimitSettings limitSettings; + private NlpVerticalFeaturizationSettings featurizationSettings; /* - * Featurization inputs needed for AutoML job. + * Execution constraints for AutoMLJob. */ - private NlpVerticalFeaturizationSettings featurizationSettings; + private NlpVerticalLimitSettings limitSettings; /* * Validation data inputs. @@ -39,42 +39,42 @@ public NlpVertical() { } /** - * Get the limitSettings property: Execution constraints for AutoMLJob. + * Get the featurizationSettings property: Featurization inputs needed for AutoML job. * - * @return the limitSettings value. + * @return the featurizationSettings value. */ - public NlpVerticalLimitSettings limitSettings() { - return this.limitSettings; + public NlpVerticalFeaturizationSettings featurizationSettings() { + return this.featurizationSettings; } /** - * Set the limitSettings property: Execution constraints for AutoMLJob. + * Set the featurizationSettings property: Featurization inputs needed for AutoML job. * - * @param limitSettings the limitSettings value to set. + * @param featurizationSettings the featurizationSettings value to set. * @return the NlpVertical object itself. */ - public NlpVertical withLimitSettings(NlpVerticalLimitSettings limitSettings) { - this.limitSettings = limitSettings; + public NlpVertical withFeaturizationSettings(NlpVerticalFeaturizationSettings featurizationSettings) { + this.featurizationSettings = featurizationSettings; return this; } /** - * Get the featurizationSettings property: Featurization inputs needed for AutoML job. + * Get the limitSettings property: Execution constraints for AutoMLJob. * - * @return the featurizationSettings value. + * @return the limitSettings value. */ - public NlpVerticalFeaturizationSettings featurizationSettings() { - return this.featurizationSettings; + public NlpVerticalLimitSettings limitSettings() { + return this.limitSettings; } /** - * Set the featurizationSettings property: Featurization inputs needed for AutoML job. + * Set the limitSettings property: Execution constraints for AutoMLJob. * - * @param featurizationSettings the featurizationSettings value to set. + * @param limitSettings the limitSettings value to set. * @return the NlpVertical object itself. */ - public NlpVertical withFeaturizationSettings(NlpVerticalFeaturizationSettings featurizationSettings) { - this.featurizationSettings = featurizationSettings; + public NlpVertical withLimitSettings(NlpVerticalLimitSettings limitSettings) { + this.limitSettings = limitSettings; return this; } @@ -104,12 +104,12 @@ public NlpVertical withValidationData(MLTableJobInput validationData) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (limitSettings() != null) { - limitSettings().validate(); - } if (featurizationSettings() != null) { featurizationSettings().validate(); } + if (limitSettings() != null) { + limitSettings().validate(); + } if (validationData() != null) { validationData().validate(); } @@ -121,8 +121,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("limitSettings", this.limitSettings); jsonWriter.writeJsonField("featurizationSettings", this.featurizationSettings); + jsonWriter.writeJsonField("limitSettings", this.limitSettings); jsonWriter.writeJsonField("validationData", this.validationData); return jsonWriter.writeEndObject(); } @@ -142,10 +142,10 @@ public static NlpVertical fromJson(JsonReader jsonReader) throws IOException { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("limitSettings".equals(fieldName)) { - deserializedNlpVertical.limitSettings = NlpVerticalLimitSettings.fromJson(reader); - } else if ("featurizationSettings".equals(fieldName)) { + if ("featurizationSettings".equals(fieldName)) { deserializedNlpVertical.featurizationSettings = NlpVerticalFeaturizationSettings.fromJson(reader); + } else if ("limitSettings".equals(fieldName)) { + deserializedNlpVertical.limitSettings = NlpVerticalLimitSettings.fromJson(reader); } else if ("validationData".equals(fieldName)) { deserializedNlpVertical.validationData = MLTableJobInput.fromJson(reader); } else { 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 ac035c0e317f9..562287b1400a5 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 @@ -37,7 +37,6 @@ public NlpVerticalFeaturizationSettings withDatasetLanguage(String datasetLangua */ @Override public void validate() { - super.validate(); } /** 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 fc3bb6072cb7f..813e357f44a58 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 @@ -19,9 +19,9 @@ @Fluent public final class NlpVerticalLimitSettings implements JsonSerializable { /* - * AutoML job timeout. + * Maximum Concurrent AutoML iterations. */ - private Duration timeout; + private Integer maxConcurrentTrials; /* * Number of AutoML iterations. @@ -29,9 +29,9 @@ public final class NlpVerticalLimitSettings implements JsonSerializable Duration.parse(nonNullReader.getString())); + if ("maxConcurrentTrials".equals(fieldName)) { + deserializedNlpVerticalLimitSettings.maxConcurrentTrials = reader.getNullable(JsonReader::getInt); } else if ("maxTrials".equals(fieldName)) { deserializedNlpVerticalLimitSettings.maxTrials = reader.getNullable(JsonReader::getInt); - } else if ("maxConcurrentTrials".equals(fieldName)) { - deserializedNlpVerticalLimitSettings.maxConcurrentTrials = reader.getNullable(JsonReader::getInt); + } else if ("timeout".equals(fieldName)) { + deserializedNlpVerticalLimitSettings.timeout + = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); } else { reader.skipChildren(); } 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 1fbdf1bc301ab..d23a67ed29913 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 @@ -25,16 +25,6 @@ public final class NoneAuthTypeWorkspaceConnectionProperties extends WorkspaceCo */ private ConnectionAuthType authType = ConnectionAuthType.NONE; - /* - * The createdByWorkspaceArmId property. - */ - private String createdByWorkspaceArmId; - - /* - * Group based on connection category - */ - private ConnectionGroup group; - /** * Creates an instance of NoneAuthTypeWorkspaceConnectionProperties class. */ @@ -52,31 +42,29 @@ public ConnectionAuthType authType() { } /** - * Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. - * - * @return the createdByWorkspaceArmId value. + * {@inheritDoc} */ @Override - public String createdByWorkspaceArmId() { - return this.createdByWorkspaceArmId; + public NoneAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { + super.withCategory(category); + return this; } /** - * Get the group property: Group based on connection category. - * - * @return the group value. + * {@inheritDoc} */ @Override - public ConnectionGroup group() { - return this.group; + public NoneAuthTypeWorkspaceConnectionProperties withError(String error) { + super.withError(error); + return this; } /** * {@inheritDoc} */ @Override - public NoneAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); + public NoneAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { + super.withExpiryTime(expiryTime); return this; } @@ -84,8 +72,8 @@ public NoneAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory * {@inheritDoc} */ @Override - public NoneAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { - super.withExpiryTime(expiryTime); + public NoneAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { + super.withIsSharedToAll(isSharedToAll); return this; } @@ -93,8 +81,8 @@ public NoneAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime e * {@inheritDoc} */ @Override - public NoneAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { - super.withIsSharedToAll(isSharedToAll); + public NoneAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { + super.withMetadata(metadata); return this; } @@ -102,8 +90,8 @@ public NoneAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSha * {@inheritDoc} */ @Override - public NoneAuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); + public NoneAuthTypeWorkspaceConnectionProperties withPeRequirement(ManagedPERequirement peRequirement) { + super.withPeRequirement(peRequirement); return this; } @@ -111,8 +99,8 @@ public NoneAuthTypeWorkspaceConnectionProperties withTarget(String target) { * {@inheritDoc} */ @Override - public NoneAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { - super.withMetadata(metadata); + public NoneAuthTypeWorkspaceConnectionProperties withPeStatus(ManagedPEStatus peStatus) { + super.withPeStatus(peStatus); return this; } @@ -129,8 +117,8 @@ public NoneAuthTypeWorkspaceConnectionProperties withSharedUserList(List * {@inheritDoc} */ @Override - public NoneAuthTypeWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); + public NoneAuthTypeWorkspaceConnectionProperties withTarget(String target) { + super.withTarget(target); return this; } @@ -138,8 +126,9 @@ public NoneAuthTypeWorkspaceConnectionProperties withValue(String value) { * {@inheritDoc} */ @Override - public NoneAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); + public NoneAuthTypeWorkspaceConnectionProperties + withUseWorkspaceManagedIdentity(Boolean useWorkspaceManagedIdentity) { + super.withUseWorkspaceManagedIdentity(useWorkspaceManagedIdentity); return this; } @@ -150,7 +139,6 @@ public NoneAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat val */ @Override public void validate() { - super.validate(); } /** @@ -160,15 +148,17 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("category", category() == null ? null : category().toString()); + jsonWriter.writeStringField("error", error()); jsonWriter.writeStringField("expiryTime", expiryTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(expiryTime())); jsonWriter.writeBooleanField("isSharedToAll", isSharedToAll()); - jsonWriter.writeStringField("target", target()); jsonWriter.writeMapField("metadata", metadata(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("peRequirement", peRequirement() == null ? null : peRequirement().toString()); + jsonWriter.writeStringField("peStatus", peStatus() == null ? null : peStatus().toString()); jsonWriter.writeArrayField("sharedUserList", sharedUserList(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", value()); - jsonWriter.writeStringField("valueFormat", valueFormat() == null ? null : valueFormat().toString()); + jsonWriter.writeStringField("target", target()); + jsonWriter.writeBooleanField("useWorkspaceManagedIdentity", useWorkspaceManagedIdentity()); jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); return jsonWriter.writeEndObject(); } @@ -193,29 +183,36 @@ public static NoneAuthTypeWorkspaceConnectionProperties fromJson(JsonReader json deserializedNoneAuthTypeWorkspaceConnectionProperties .withCategory(ConnectionCategory.fromString(reader.getString())); } else if ("createdByWorkspaceArmId".equals(fieldName)) { - deserializedNoneAuthTypeWorkspaceConnectionProperties.createdByWorkspaceArmId = reader.getString(); + deserializedNoneAuthTypeWorkspaceConnectionProperties + .withCreatedByWorkspaceArmId(reader.getString()); + } else if ("error".equals(fieldName)) { + deserializedNoneAuthTypeWorkspaceConnectionProperties.withError(reader.getString()); } else if ("expiryTime".equals(fieldName)) { deserializedNoneAuthTypeWorkspaceConnectionProperties.withExpiryTime(reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("group".equals(fieldName)) { - deserializedNoneAuthTypeWorkspaceConnectionProperties.group - = ConnectionGroup.fromString(reader.getString()); + deserializedNoneAuthTypeWorkspaceConnectionProperties + .withGroup(ConnectionGroup.fromString(reader.getString())); } else if ("isSharedToAll".equals(fieldName)) { deserializedNoneAuthTypeWorkspaceConnectionProperties .withIsSharedToAll(reader.getNullable(JsonReader::getBoolean)); - } else if ("target".equals(fieldName)) { - deserializedNoneAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); } else if ("metadata".equals(fieldName)) { Map metadata = reader.readMap(reader1 -> reader1.getString()); deserializedNoneAuthTypeWorkspaceConnectionProperties.withMetadata(metadata); + } else if ("peRequirement".equals(fieldName)) { + deserializedNoneAuthTypeWorkspaceConnectionProperties + .withPeRequirement(ManagedPERequirement.fromString(reader.getString())); + } else if ("peStatus".equals(fieldName)) { + deserializedNoneAuthTypeWorkspaceConnectionProperties + .withPeStatus(ManagedPEStatus.fromString(reader.getString())); } else if ("sharedUserList".equals(fieldName)) { List sharedUserList = reader.readArray(reader1 -> reader1.getString()); deserializedNoneAuthTypeWorkspaceConnectionProperties.withSharedUserList(sharedUserList); - } else if ("value".equals(fieldName)) { - deserializedNoneAuthTypeWorkspaceConnectionProperties.withValue(reader.getString()); - } else if ("valueFormat".equals(fieldName)) { + } else if ("target".equals(fieldName)) { + deserializedNoneAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); + } else if ("useWorkspaceManagedIdentity".equals(fieldName)) { deserializedNoneAuthTypeWorkspaceConnectionProperties - .withValueFormat(ValueFormat.fromString(reader.getString())); + .withUseWorkspaceManagedIdentity(reader.getNullable(JsonReader::getBoolean)); } else if ("authType".equals(fieldName)) { deserializedNoneAuthTypeWorkspaceConnectionProperties.authType = ConnectionAuthType.fromString(reader.getString()); 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 1181f71399432..6003545b58cce 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 @@ -43,7 +43,6 @@ public CredentialsType credentialsType() { */ @Override public void validate() { - super.validate(); } /** 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 16f860733f315..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 @@ -11,46 +11,39 @@ */ public interface NotebookAccessTokenResult { /** - * Gets the notebookResourceId property: The notebookResourceId property. - * - * @return the notebookResourceId value. - */ - String notebookResourceId(); - - /** - * Gets the hostname property: The hostName property. + * Gets the accessToken property: The accessToken property. * - * @return the hostname value. + * @return the accessToken value. */ - String hostname(); + String accessToken(); /** - * Gets the publicDns property: The publicDns property. + * Gets the expiresIn property: The expiresIn property. * - * @return the publicDns value. + * @return the expiresIn value. */ - String publicDns(); + Integer expiresIn(); /** - * Gets the accessToken property: The accessToken property. + * Gets the hostname property: The hostName property. * - * @return the accessToken value. + * @return the hostname value. */ - String accessToken(); + String hostname(); /** - * Gets the tokenType property: The tokenType property. + * Gets the notebookResourceId property: The notebookResourceId property. * - * @return the tokenType value. + * @return the notebookResourceId value. */ - String tokenType(); + String notebookResourceId(); /** - * Gets the expiresIn property: The expiresIn property. + * Gets the publicDns property: The publicDns property. * - * @return the expiresIn value. + * @return the publicDns value. */ - Integer expiresIn(); + String publicDns(); /** * Gets the refreshToken property: The refreshToken property. @@ -66,6 +59,13 @@ public interface NotebookAccessTokenResult { */ 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. * 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 fc2e207583091..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 @@ -18,11 +18,11 @@ public interface NotebookResourceInfo { String fqdn(); /** - * Gets the resourceId property: the data plane resourceId that used to initialize notebook component. + * Gets the isPrivateLinkEnabled property: The isPrivateLinkEnabled property. * - * @return the resourceId value. + * @return the isPrivateLinkEnabled value. */ - String resourceId(); + Boolean isPrivateLinkEnabled(); /** * Gets the notebookPreparationError property: The error that occurs when preparing notebook. @@ -31,6 +31,13 @@ public interface NotebookResourceInfo { */ 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. * 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 index 3cea94fb5b863..27202868b14a1 100644 --- 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 @@ -19,14 +19,14 @@ @Fluent public final class NotificationSetting implements JsonSerializable { /* - * This is the email recipient list which has a limitation of 499 characters in total concat with comma separator + * Send email notification to user on specified notification type */ - private List emails; + private List emailOn; /* - * Send email notification to user on specified notification type + * This is the email recipient list which has a limitation of 499 characters in total concat with comma separator */ - private List emailOn; + private List emails; /* * Send webhook callback to a service. Key is a user-provided name for the webhook. @@ -40,44 +40,44 @@ public NotificationSetting() { } /** - * Get the emails property: This is the email recipient list which has a limitation of 499 characters in total - * concat with comma separator. + * Get the emailOn property: Send email notification to user on specified notification type. * - * @return the emails value. + * @return the emailOn value. */ - public List emails() { - return this.emails; + public List emailOn() { + return this.emailOn; } /** - * Set the emails property: This is the email recipient list which has a limitation of 499 characters in total - * concat with comma separator. + * Set the emailOn property: Send email notification to user on specified notification type. * - * @param emails the emails value to set. + * @param emailOn the emailOn value to set. * @return the NotificationSetting object itself. */ - public NotificationSetting withEmails(List emails) { - this.emails = emails; + public NotificationSetting withEmailOn(List emailOn) { + this.emailOn = emailOn; return this; } /** - * Get the emailOn property: Send email notification to user on specified notification type. + * 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 emailOn value. + * @return the emails value. */ - public List emailOn() { - return this.emailOn; + public List emails() { + return this.emails; } /** - * Set the emailOn property: Send email notification to user on specified notification type. + * Set the emails property: This is the email recipient list which has a limitation of 499 characters in total + * concat with comma separator. * - * @param emailOn the emailOn value to set. + * @param emails the emails value to set. * @return the NotificationSetting object itself. */ - public NotificationSetting withEmailOn(List emailOn) { - this.emailOn = emailOn; + public NotificationSetting withEmails(List emails) { + this.emails = emails; return this; } @@ -122,9 +122,9 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("emails", this.emails, (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("emailOn", this.emailOn, (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeArrayField("emails", this.emails, (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("webhooks", this.webhooks, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -144,13 +144,13 @@ public static NotificationSetting fromJson(JsonReader jsonReader) throws IOExcep String fieldName = reader.getFieldName(); reader.nextToken(); - if ("emails".equals(fieldName)) { - List emails = reader.readArray(reader1 -> reader1.getString()); - deserializedNotificationSetting.emails = emails; - } else if ("emailOn".equals(fieldName)) { + if ("emailOn".equals(fieldName)) { List emailOn = reader.readArray(reader1 -> EmailNotificationEnableType.fromString(reader1.getString())); deserializedNotificationSetting.emailOn = emailOn; + } else if ("emails".equals(fieldName)) { + List emails = reader.readArray(reader1 -> reader1.getString()); + deserializedNotificationSetting.emails = emails; } else if ("webhooks".equals(fieldName)) { Map webhooks = reader.readMap(reader1 -> Webhook.fromJson(reader1)); deserializedNotificationSetting.webhooks = webhooks; 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 index 8d04f58ba940a..3ff6f3e9a55a6 100644 --- 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 @@ -78,12 +78,14 @@ public NumericalDataDriftMetricThreshold withThreshold(MonitoringThreshold thres */ @Override public void validate() { - super.validate(); if (metric() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( "Missing required property metric in model NumericalDataDriftMetricThreshold")); } + if (threshold() != null) { + threshold().validate(); + } } 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/NumericalDataQualityMetricThreshold.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalDataQualityMetricThreshold.java index 52d7eb95ec72d..02c349ff3cda3 100644 --- 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 @@ -78,12 +78,14 @@ public NumericalDataQualityMetricThreshold withThreshold(MonitoringThreshold thr */ @Override public void validate() { - super.validate(); if (metric() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( "Missing required property metric in model NumericalDataQualityMetricThreshold")); } + if (threshold() != null) { + threshold().validate(); + } } 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/NumericalPredictionDriftMetricThreshold.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NumericalPredictionDriftMetricThreshold.java index e56d7ca78a4e7..e9dafa603a90b 100644 --- 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 @@ -78,12 +78,14 @@ public NumericalPredictionDriftMetricThreshold withThreshold(MonitoringThreshold */ @Override public void validate() { - super.validate(); if (metric() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( "Missing required property metric in model NumericalPredictionDriftMetricThreshold")); } + if (threshold() != null) { + threshold().validate(); + } } 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 index 3cf0c81e54c45..005bc95624473 100644 --- 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 @@ -31,16 +31,6 @@ public final class OAuth2AuthTypeWorkspaceConnectionProperties extends Workspace */ private WorkspaceConnectionOAuth2 credentials; - /* - * The createdByWorkspaceArmId property. - */ - private String createdByWorkspaceArmId; - - /* - * Group based on connection category - */ - private ConnectionGroup group; - /** * Creates an instance of OAuth2AuthTypeWorkspaceConnectionProperties class. */ @@ -80,31 +70,29 @@ public OAuth2AuthTypeWorkspaceConnectionProperties withCredentials(WorkspaceConn } /** - * Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. - * - * @return the createdByWorkspaceArmId value. + * {@inheritDoc} */ @Override - public String createdByWorkspaceArmId() { - return this.createdByWorkspaceArmId; + public OAuth2AuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { + super.withCategory(category); + return this; } /** - * Get the group property: Group based on connection category. - * - * @return the group value. + * {@inheritDoc} */ @Override - public ConnectionGroup group() { - return this.group; + public OAuth2AuthTypeWorkspaceConnectionProperties withError(String error) { + super.withError(error); + return this; } /** * {@inheritDoc} */ @Override - public OAuth2AuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); + public OAuth2AuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { + super.withExpiryTime(expiryTime); return this; } @@ -112,8 +100,8 @@ public OAuth2AuthTypeWorkspaceConnectionProperties withCategory(ConnectionCatego * {@inheritDoc} */ @Override - public OAuth2AuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { - super.withExpiryTime(expiryTime); + public OAuth2AuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { + super.withIsSharedToAll(isSharedToAll); return this; } @@ -121,8 +109,8 @@ public OAuth2AuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime * {@inheritDoc} */ @Override - public OAuth2AuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { - super.withIsSharedToAll(isSharedToAll); + public OAuth2AuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { + super.withMetadata(metadata); return this; } @@ -130,8 +118,8 @@ public OAuth2AuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isS * {@inheritDoc} */ @Override - public OAuth2AuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); + public OAuth2AuthTypeWorkspaceConnectionProperties withPeRequirement(ManagedPERequirement peRequirement) { + super.withPeRequirement(peRequirement); return this; } @@ -139,8 +127,8 @@ public OAuth2AuthTypeWorkspaceConnectionProperties withTarget(String target) { * {@inheritDoc} */ @Override - public OAuth2AuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { - super.withMetadata(metadata); + public OAuth2AuthTypeWorkspaceConnectionProperties withPeStatus(ManagedPEStatus peStatus) { + super.withPeStatus(peStatus); return this; } @@ -157,8 +145,8 @@ public OAuth2AuthTypeWorkspaceConnectionProperties withSharedUserList(List writer.writeString(element)); + jsonWriter.writeStringField("peRequirement", peRequirement() == null ? null : peRequirement().toString()); + jsonWriter.writeStringField("peStatus", peStatus() == null ? null : peStatus().toString()); jsonWriter.writeArrayField("sharedUserList", sharedUserList(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", value()); - jsonWriter.writeStringField("valueFormat", valueFormat() == null ? null : valueFormat().toString()); + jsonWriter.writeStringField("target", target()); + jsonWriter.writeBooleanField("useWorkspaceManagedIdentity", useWorkspaceManagedIdentity()); jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); jsonWriter.writeJsonField("credentials", this.credentials); return jsonWriter.writeEndObject(); @@ -225,30 +215,36 @@ public static OAuth2AuthTypeWorkspaceConnectionProperties fromJson(JsonReader js deserializedOAuth2AuthTypeWorkspaceConnectionProperties .withCategory(ConnectionCategory.fromString(reader.getString())); } else if ("createdByWorkspaceArmId".equals(fieldName)) { - deserializedOAuth2AuthTypeWorkspaceConnectionProperties.createdByWorkspaceArmId - = reader.getString(); + deserializedOAuth2AuthTypeWorkspaceConnectionProperties + .withCreatedByWorkspaceArmId(reader.getString()); + } else if ("error".equals(fieldName)) { + deserializedOAuth2AuthTypeWorkspaceConnectionProperties.withError(reader.getString()); } else if ("expiryTime".equals(fieldName)) { deserializedOAuth2AuthTypeWorkspaceConnectionProperties.withExpiryTime(reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("group".equals(fieldName)) { - deserializedOAuth2AuthTypeWorkspaceConnectionProperties.group - = ConnectionGroup.fromString(reader.getString()); + deserializedOAuth2AuthTypeWorkspaceConnectionProperties + .withGroup(ConnectionGroup.fromString(reader.getString())); } else if ("isSharedToAll".equals(fieldName)) { deserializedOAuth2AuthTypeWorkspaceConnectionProperties .withIsSharedToAll(reader.getNullable(JsonReader::getBoolean)); - } else if ("target".equals(fieldName)) { - deserializedOAuth2AuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); } else if ("metadata".equals(fieldName)) { Map metadata = reader.readMap(reader1 -> reader1.getString()); deserializedOAuth2AuthTypeWorkspaceConnectionProperties.withMetadata(metadata); + } else if ("peRequirement".equals(fieldName)) { + deserializedOAuth2AuthTypeWorkspaceConnectionProperties + .withPeRequirement(ManagedPERequirement.fromString(reader.getString())); + } else if ("peStatus".equals(fieldName)) { + deserializedOAuth2AuthTypeWorkspaceConnectionProperties + .withPeStatus(ManagedPEStatus.fromString(reader.getString())); } else if ("sharedUserList".equals(fieldName)) { List sharedUserList = reader.readArray(reader1 -> reader1.getString()); deserializedOAuth2AuthTypeWorkspaceConnectionProperties.withSharedUserList(sharedUserList); - } else if ("value".equals(fieldName)) { - deserializedOAuth2AuthTypeWorkspaceConnectionProperties.withValue(reader.getString()); - } else if ("valueFormat".equals(fieldName)) { + } else if ("target".equals(fieldName)) { + deserializedOAuth2AuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); + } else if ("useWorkspaceManagedIdentity".equals(fieldName)) { deserializedOAuth2AuthTypeWorkspaceConnectionProperties - .withValueFormat(ValueFormat.fromString(reader.getString())); + .withUseWorkspaceManagedIdentity(reader.getNullable(JsonReader::getBoolean)); } else if ("authType".equals(fieldName)) { deserializedOAuth2AuthTypeWorkspaceConnectionProperties.authType = ConnectionAuthType.fromString(reader.getString()); 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 37c64b9ec66e6..23883f1c833d7 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 @@ -18,14 +18,14 @@ @Fluent public final class Objective implements JsonSerializable { /* - * [Required] Name of the metric to optimize. + * [Required] Defines supported metric goals for hyperparameter tuning */ - private String primaryMetric; + private Goal goal; /* - * [Required] Defines supported metric goals for hyperparameter tuning + * [Required] Name of the metric to optimize. */ - private Goal goal; + private String primaryMetric; /** * Creates an instance of Objective class. @@ -34,42 +34,42 @@ public Objective() { } /** - * Get the primaryMetric property: [Required] Name of the metric to optimize. + * Get the goal property: [Required] Defines supported metric goals for hyperparameter tuning. * - * @return the primaryMetric value. + * @return the goal value. */ - public String primaryMetric() { - return this.primaryMetric; + public Goal goal() { + return this.goal; } /** - * Set the primaryMetric property: [Required] Name of the metric to optimize. + * Set the goal property: [Required] Defines supported metric goals for hyperparameter tuning. * - * @param primaryMetric the primaryMetric value to set. + * @param goal the goal value to set. * @return the Objective object itself. */ - public Objective withPrimaryMetric(String primaryMetric) { - this.primaryMetric = primaryMetric; + public Objective withGoal(Goal goal) { + this.goal = goal; return this; } /** - * Get the goal property: [Required] Defines supported metric goals for hyperparameter tuning. + * Get the primaryMetric property: [Required] Name of the metric to optimize. * - * @return the goal value. + * @return the primaryMetric value. */ - public Goal goal() { - return this.goal; + public String primaryMetric() { + return this.primaryMetric; } /** - * Set the goal property: [Required] Defines supported metric goals for hyperparameter tuning. + * Set the primaryMetric property: [Required] Name of the metric to optimize. * - * @param goal the goal value to set. + * @param primaryMetric the primaryMetric value to set. * @return the Objective object itself. */ - public Objective withGoal(Goal goal) { - this.goal = goal; + public Objective withPrimaryMetric(String primaryMetric) { + this.primaryMetric = primaryMetric; return this; } @@ -79,14 +79,14 @@ public Objective withGoal(Goal goal) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (primaryMetric() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property primaryMetric in model Objective")); - } if (goal() == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property goal in model Objective")); } + if (primaryMetric() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property primaryMetric in model Objective")); + } } private static final ClientLogger LOGGER = new ClientLogger(Objective.class); @@ -97,8 +97,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("primaryMetric", this.primaryMetric); jsonWriter.writeStringField("goal", this.goal == null ? null : this.goal.toString()); + jsonWriter.writeStringField("primaryMetric", this.primaryMetric); return jsonWriter.writeEndObject(); } @@ -118,10 +118,10 @@ public static Objective fromJson(JsonReader jsonReader) throws IOException { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("primaryMetric".equals(fieldName)) { - deserializedObjective.primaryMetric = reader.getString(); - } else if ("goal".equals(fieldName)) { + if ("goal".equals(fieldName)) { deserializedObjective.goal = Goal.fromString(reader.getString()); + } else if ("primaryMetric".equals(fieldName)) { + deserializedObjective.primaryMetric = reader.getString(); } else { reader.skipChildren(); } 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 index 2a03ab3c93fa5..53c2ea8366a35 100644 --- 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 @@ -27,25 +27,20 @@ public final class OneLakeDatastore extends DatastoreProperties { */ private OneLakeArtifact artifact; - /* - * [Required] OneLake workspace name. - */ - private String oneLakeWorkspaceName; - /* * OneLake endpoint to use for the datastore. */ private String endpoint; /* - * Indicates which identity to use to authenticate service data access to customer's storage. + * [Required] OneLake workspace name. */ - private ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity; + private String oneLakeWorkspaceName; /* - * Readonly property to indicate if datastore is the workspace default datastore + * Indicates which identity to use to authenticate service data access to customer's storage. */ - private Boolean isDefault; + private ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity; /** * Creates an instance of OneLakeDatastore class. @@ -84,42 +79,42 @@ public OneLakeDatastore withArtifact(OneLakeArtifact artifact) { } /** - * Get the oneLakeWorkspaceName property: [Required] OneLake workspace name. + * Get the endpoint property: OneLake endpoint to use for the datastore. * - * @return the oneLakeWorkspaceName value. + * @return the endpoint value. */ - public String oneLakeWorkspaceName() { - return this.oneLakeWorkspaceName; + public String endpoint() { + return this.endpoint; } /** - * Set the oneLakeWorkspaceName property: [Required] OneLake workspace name. + * Set the endpoint property: OneLake endpoint to use for the datastore. * - * @param oneLakeWorkspaceName the oneLakeWorkspaceName value to set. + * @param endpoint the endpoint value to set. * @return the OneLakeDatastore object itself. */ - public OneLakeDatastore withOneLakeWorkspaceName(String oneLakeWorkspaceName) { - this.oneLakeWorkspaceName = oneLakeWorkspaceName; + public OneLakeDatastore withEndpoint(String endpoint) { + this.endpoint = endpoint; return this; } /** - * Get the endpoint property: OneLake endpoint to use for the datastore. + * Get the oneLakeWorkspaceName property: [Required] OneLake workspace name. * - * @return the endpoint value. + * @return the oneLakeWorkspaceName value. */ - public String endpoint() { - return this.endpoint; + public String oneLakeWorkspaceName() { + return this.oneLakeWorkspaceName; } /** - * Set the endpoint property: OneLake endpoint to use for the datastore. + * Set the oneLakeWorkspaceName property: [Required] OneLake workspace name. * - * @param endpoint the endpoint value to set. + * @param oneLakeWorkspaceName the oneLakeWorkspaceName value to set. * @return the OneLakeDatastore object itself. */ - public OneLakeDatastore withEndpoint(String endpoint) { - this.endpoint = endpoint; + public OneLakeDatastore withOneLakeWorkspaceName(String oneLakeWorkspaceName) { + this.oneLakeWorkspaceName = oneLakeWorkspaceName; return this; } @@ -146,16 +141,6 @@ public ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity() { return this; } - /** - * Get the isDefault property: Readonly property to indicate if datastore is the workspace default datastore. - * - * @return the isDefault value. - */ - @Override - public Boolean isDefault() { - return this.isDefault; - } - /** * {@inheritDoc} */ @@ -178,8 +163,8 @@ public OneLakeDatastore withDescription(String description) { * {@inheritDoc} */ @Override - public OneLakeDatastore withTags(Map tags) { - super.withTags(tags); + public OneLakeDatastore withProperties(Map properties) { + super.withProperties(properties); return this; } @@ -187,8 +172,8 @@ public OneLakeDatastore withTags(Map tags) { * {@inheritDoc} */ @Override - public OneLakeDatastore withProperties(Map properties) { - super.withProperties(properties); + public OneLakeDatastore withTags(Map tags) { + super.withTags(tags); return this; } @@ -199,7 +184,6 @@ public OneLakeDatastore withProperties(Map properties) { */ @Override public void validate() { - super.validate(); if (artifact() == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property artifact in model OneLakeDatastore")); @@ -211,6 +195,12 @@ public void validate() { .log(new IllegalArgumentException( "Missing required property oneLakeWorkspaceName in model OneLakeDatastore")); } + if (credentials() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property credentials in model OneLakeDatastore")); + } else { + credentials().validate(); + } } private static final ClientLogger LOGGER = new ClientLogger(OneLakeDatastore.class); @@ -223,8 +213,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("credentials", credentials()); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("artifact", this.artifact); jsonWriter.writeStringField("oneLakeWorkspaceName", this.oneLakeWorkspaceName); jsonWriter.writeStringField("datastoreType", this.datastoreType == null ? null : this.datastoreType.toString()); @@ -254,14 +244,14 @@ public static OneLakeDatastore fromJson(JsonReader jsonReader) throws IOExceptio deserializedOneLakeDatastore.withCredentials(DatastoreCredentials.fromJson(reader)); } else if ("description".equals(fieldName)) { deserializedOneLakeDatastore.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedOneLakeDatastore.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedOneLakeDatastore.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedOneLakeDatastore.withTags(tags); } else if ("isDefault".equals(fieldName)) { - deserializedOneLakeDatastore.isDefault = reader.getNullable(JsonReader::getBoolean); + deserializedOneLakeDatastore.withIsDefault(reader.getNullable(JsonReader::getBoolean)); } else if ("artifact".equals(fieldName)) { deserializedOneLakeDatastore.artifact = OneLakeArtifact.fromJson(reader); } else if ("oneLakeWorkspaceName".equals(fieldName)) { 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 b4f98e3703868..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 @@ -51,11 +51,11 @@ public interface OnlineDeployment { Map tags(); /** - * Gets the properties property: [Required] Additional attributes of the entity. + * Gets the identity property: Managed service identity (system assigned and/or user assigned identities). * - * @return the properties value. + * @return the identity value. */ - OnlineDeploymentProperties properties(); + ManagedServiceIdentity identity(); /** * Gets the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of @@ -66,11 +66,11 @@ public interface OnlineDeployment { String kind(); /** - * Gets the identity property: Managed service identity (system assigned and/or user assigned identities). + * Gets the properties property: [Required] Additional attributes of the entity. * - * @return the identity value. + * @return the properties value. */ - ManagedServiceIdentity identity(); + OnlineDeploymentProperties properties(); /** * Gets the sku property: Sku details required for ARM contract for Autoscaling. @@ -185,8 +185,8 @@ interface WithProperties { * 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.WithKind, - DefinitionStages.WithIdentity, DefinitionStages.WithSku { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, + DefinitionStages.WithKind, DefinitionStages.WithSku { /** * Executes the create request. * @@ -217,32 +217,32 @@ interface WithTags { } /** - * The stage of the OnlineDeployment definition allowing to specify kind. + * The stage of the OnlineDeployment definition allowing to specify identity. */ - interface WithKind { + interface WithIdentity { /** - * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for - * resources of the same type.. + * Specifies the identity property: Managed service identity (system assigned and/or user assigned + * identities). * - * @param kind Metadata used by portal/tooling/etc to render different UX experiences for resources of the - * same type. + * @param identity Managed service identity (system assigned and/or user assigned identities). * @return the next definition stage. */ - WithCreate withKind(String kind); + WithCreate withIdentity(ManagedServiceIdentity identity); } /** - * The stage of the OnlineDeployment definition allowing to specify identity. + * The stage of the OnlineDeployment definition allowing to specify kind. */ - interface WithIdentity { + interface WithKind { /** - * Specifies the identity property: Managed service identity (system assigned and/or user assigned - * identities). + * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for + * resources of the same type.. * - * @param identity Managed service identity (system assigned and/or user assigned identities). + * @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 withIdentity(ManagedServiceIdentity identity); + WithCreate withKind(String kind); } /** 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 e7618bb4711ed..bc3ac99b7e223 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 @@ -22,27 +22,24 @@ public class OnlineDeploymentProperties extends EndpointDeploymentPropertiesBase private EndpointComputeType endpointComputeType = EndpointComputeType.fromString("OnlineDeploymentProperties"); /* - * Scale settings for the deployment. - * If it is null or not provided, - * it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment - * and to DefaultScaleSettings for ManagedOnlineDeployment. + * If true, enables Application Insights logging. */ - private OnlineScaleSettings scaleSettings; + private Boolean appInsightsEnabled; /* - * Request settings for the deployment. + * The mdc configuration, we disable mdc when it's null. */ - private OnlineRequestSettings requestSettings; + private DataCollector dataCollector; /* - * The path to mount the model in custom container. + * If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. */ - private String modelMountPath; + private EgressPublicNetworkAccessType egressPublicNetworkAccess; /* - * If true, enables Application Insights logging. + * Compute instance type. Default: Standard_F4s_v2. */ - private Boolean appInsightsEnabled; + private String instanceType; /* * Liveness probe monitors the health of the container regularly. @@ -50,35 +47,38 @@ public class OnlineDeploymentProperties extends EndpointDeploymentPropertiesBase private ProbeSettings livenessProbe; /* - * Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as - * liveness probe. + * The URI path to the model. */ - private ProbeSettings readinessProbe; + private String model; /* - * Provisioning state for the endpoint deployment. + * The path to mount the model in custom container. */ - private DeploymentProvisioningState provisioningState; + private String modelMountPath; /* - * Compute instance type. + * Provisioning state for the endpoint deployment. */ - private String instanceType; + private DeploymentProvisioningState provisioningState; /* - * The URI path to the model. + * Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as + * liveness probe. */ - private String model; + private ProbeSettings readinessProbe; /* - * If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. + * Request settings for the deployment. */ - private EgressPublicNetworkAccessType egressPublicNetworkAccess; + private OnlineRequestSettings requestSettings; /* - * The mdc configuration, we disable mdc when it's null. + * Scale settings for the deployment. + * If it is null or not provided, + * it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment + * and to DefaultScaleSettings for ManagedOnlineDeployment. */ - private DataCollector dataCollector; + private OnlineScaleSettings scaleSettings; /** * Creates an instance of OnlineDeploymentProperties class. @@ -96,88 +96,85 @@ public EndpointComputeType endpointComputeType() { } /** - * 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 appInsightsEnabled property: If true, enables Application Insights logging. * - * @return the scaleSettings value. + * @return the appInsightsEnabled value. */ - public OnlineScaleSettings scaleSettings() { - return this.scaleSettings; + public Boolean appInsightsEnabled() { + return this.appInsightsEnabled; } /** - * 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 appInsightsEnabled property: If true, enables Application Insights logging. * - * @param scaleSettings the scaleSettings value to set. + * @param appInsightsEnabled the appInsightsEnabled value to set. * @return the OnlineDeploymentProperties object itself. */ - public OnlineDeploymentProperties withScaleSettings(OnlineScaleSettings scaleSettings) { - this.scaleSettings = scaleSettings; + public OnlineDeploymentProperties withAppInsightsEnabled(Boolean appInsightsEnabled) { + this.appInsightsEnabled = appInsightsEnabled; return this; } /** - * Get the requestSettings property: Request settings for the deployment. + * Get the dataCollector property: The mdc configuration, we disable mdc when it's null. * - * @return the requestSettings value. + * @return the dataCollector value. */ - public OnlineRequestSettings requestSettings() { - return this.requestSettings; + public DataCollector dataCollector() { + return this.dataCollector; } /** - * Set the requestSettings property: Request settings for the deployment. + * Set the dataCollector property: The mdc configuration, we disable mdc when it's null. * - * @param requestSettings the requestSettings value to set. + * @param dataCollector the dataCollector value to set. * @return the OnlineDeploymentProperties object itself. */ - public OnlineDeploymentProperties withRequestSettings(OnlineRequestSettings requestSettings) { - this.requestSettings = requestSettings; + public OnlineDeploymentProperties withDataCollector(DataCollector dataCollector) { + this.dataCollector = dataCollector; return this; } /** - * Get the modelMountPath property: The path to mount the model in custom container. + * Get the egressPublicNetworkAccess property: If Enabled, allow egress public network access. If Disabled, this + * will create secure egress. Default: Enabled. * - * @return the modelMountPath value. + * @return the egressPublicNetworkAccess value. */ - public String modelMountPath() { - return this.modelMountPath; + public EgressPublicNetworkAccessType egressPublicNetworkAccess() { + return this.egressPublicNetworkAccess; } /** - * Set the modelMountPath property: The path to mount the model in custom container. + * Set the egressPublicNetworkAccess property: If Enabled, allow egress public network access. If Disabled, this + * will create secure egress. Default: Enabled. * - * @param modelMountPath the modelMountPath value to set. + * @param egressPublicNetworkAccess the egressPublicNetworkAccess value to set. * @return the OnlineDeploymentProperties object itself. */ - public OnlineDeploymentProperties withModelMountPath(String modelMountPath) { - this.modelMountPath = modelMountPath; + public OnlineDeploymentProperties + withEgressPublicNetworkAccess(EgressPublicNetworkAccessType egressPublicNetworkAccess) { + this.egressPublicNetworkAccess = egressPublicNetworkAccess; return this; } /** - * Get the appInsightsEnabled property: If true, enables Application Insights logging. + * Get the instanceType property: Compute instance type. Default: Standard_F4s_v2. * - * @return the appInsightsEnabled value. + * @return the instanceType value. */ - public Boolean appInsightsEnabled() { - return this.appInsightsEnabled; + public String instanceType() { + return this.instanceType; } /** - * Set the appInsightsEnabled property: If true, enables Application Insights logging. + * Set the instanceType property: Compute instance type. Default: Standard_F4s_v2. * - * @param appInsightsEnabled the appInsightsEnabled value to set. + * @param instanceType the instanceType value to set. * @return the OnlineDeploymentProperties object itself. */ - public OnlineDeploymentProperties withAppInsightsEnabled(Boolean appInsightsEnabled) { - this.appInsightsEnabled = appInsightsEnabled; + public OnlineDeploymentProperties withInstanceType(String instanceType) { + this.instanceType = instanceType; return this; } @@ -202,127 +199,130 @@ public OnlineDeploymentProperties withLivenessProbe(ProbeSettings livenessProbe) } /** - * 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. + * Get the model property: The URI path to the model. * - * @return the readinessProbe value. + * @return the model value. */ - public ProbeSettings readinessProbe() { - return this.readinessProbe; + public String model() { + return this.model; } /** - * 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. + * Set the model property: The URI path to the model. * - * @param readinessProbe the readinessProbe value to set. + * @param model the model value to set. * @return the OnlineDeploymentProperties object itself. */ - public OnlineDeploymentProperties withReadinessProbe(ProbeSettings readinessProbe) { - this.readinessProbe = readinessProbe; + public OnlineDeploymentProperties withModel(String model) { + this.model = model; return this; } /** - * Get the provisioningState property: Provisioning state for the endpoint deployment. + * Get the modelMountPath property: The path to mount the model in custom container. * - * @return the provisioningState value. + * @return the modelMountPath value. */ - public DeploymentProvisioningState provisioningState() { - return this.provisioningState; + public String modelMountPath() { + return this.modelMountPath; } /** - * Set the provisioningState property: Provisioning state for the endpoint deployment. + * Set the modelMountPath property: The path to mount the model in custom container. * - * @param provisioningState the provisioningState value to set. + * @param modelMountPath the modelMountPath value to set. * @return the OnlineDeploymentProperties object itself. */ - OnlineDeploymentProperties withProvisioningState(DeploymentProvisioningState provisioningState) { - this.provisioningState = provisioningState; + public OnlineDeploymentProperties withModelMountPath(String modelMountPath) { + this.modelMountPath = modelMountPath; return this; } /** - * Get the instanceType property: Compute instance type. + * Get the provisioningState property: Provisioning state for the endpoint deployment. * - * @return the instanceType value. + * @return the provisioningState value. */ - public String instanceType() { - return this.instanceType; + public DeploymentProvisioningState provisioningState() { + return this.provisioningState; } /** - * Set the instanceType property: Compute instance type. + * Set the provisioningState property: Provisioning state for the endpoint deployment. * - * @param instanceType the instanceType value to set. + * @param provisioningState the provisioningState value to set. * @return the OnlineDeploymentProperties object itself. */ - public OnlineDeploymentProperties withInstanceType(String instanceType) { - this.instanceType = instanceType; + OnlineDeploymentProperties withProvisioningState(DeploymentProvisioningState provisioningState) { + this.provisioningState = provisioningState; return this; } /** - * Get the model property: The URI path to the model. + * 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 model value. + * @return the readinessProbe value. */ - public String model() { - return this.model; + public ProbeSettings readinessProbe() { + return this.readinessProbe; } /** - * Set the model property: The URI path to the model. + * 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 model the model value to set. + * @param readinessProbe the readinessProbe value to set. * @return the OnlineDeploymentProperties object itself. */ - public OnlineDeploymentProperties withModel(String model) { - this.model = model; + public OnlineDeploymentProperties withReadinessProbe(ProbeSettings readinessProbe) { + this.readinessProbe = readinessProbe; return this; } /** - * Get the egressPublicNetworkAccess property: If Enabled, allow egress public network access. If Disabled, this - * will create secure egress. Default: Enabled. + * Get the requestSettings property: Request settings for the deployment. * - * @return the egressPublicNetworkAccess value. + * @return the requestSettings value. */ - public EgressPublicNetworkAccessType egressPublicNetworkAccess() { - return this.egressPublicNetworkAccess; + public OnlineRequestSettings requestSettings() { + return this.requestSettings; } /** - * Set the egressPublicNetworkAccess property: If Enabled, allow egress public network access. If Disabled, this - * will create secure egress. Default: Enabled. + * Set the requestSettings property: Request settings for the deployment. * - * @param egressPublicNetworkAccess the egressPublicNetworkAccess value to set. + * @param requestSettings the requestSettings value to set. * @return the OnlineDeploymentProperties object itself. */ - public OnlineDeploymentProperties - withEgressPublicNetworkAccess(EgressPublicNetworkAccessType egressPublicNetworkAccess) { - this.egressPublicNetworkAccess = egressPublicNetworkAccess; + public OnlineDeploymentProperties withRequestSettings(OnlineRequestSettings requestSettings) { + this.requestSettings = requestSettings; return this; } /** - * Get the dataCollector property: The mdc configuration, we disable mdc when it's null. + * 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 dataCollector value. + * @return the scaleSettings value. */ - public DataCollector dataCollector() { - return this.dataCollector; + public OnlineScaleSettings scaleSettings() { + return this.scaleSettings; } /** - * Set the dataCollector property: The mdc configuration, we disable mdc when it's null. + * 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 dataCollector the dataCollector value to set. + * @param scaleSettings the scaleSettings value to set. * @return the OnlineDeploymentProperties object itself. */ - public OnlineDeploymentProperties withDataCollector(DataCollector dataCollector) { - this.dataCollector = dataCollector; + public OnlineDeploymentProperties withScaleSettings(OnlineScaleSettings scaleSettings) { + this.scaleSettings = scaleSettings; return this; } @@ -330,8 +330,8 @@ public OnlineDeploymentProperties withDataCollector(DataCollector dataCollector) * {@inheritDoc} */ @Override - public OnlineDeploymentProperties withDescription(String description) { - super.withDescription(description); + public OnlineDeploymentProperties withCodeConfiguration(CodeConfiguration codeConfiguration) { + super.withCodeConfiguration(codeConfiguration); return this; } @@ -339,8 +339,8 @@ public OnlineDeploymentProperties withDescription(String description) { * {@inheritDoc} */ @Override - public OnlineDeploymentProperties withProperties(Map properties) { - super.withProperties(properties); + public OnlineDeploymentProperties withDescription(String description) { + super.withDescription(description); return this; } @@ -348,8 +348,8 @@ public OnlineDeploymentProperties withProperties(Map properties) * {@inheritDoc} */ @Override - public OnlineDeploymentProperties withCodeConfiguration(CodeConfiguration codeConfiguration) { - super.withCodeConfiguration(codeConfiguration); + public OnlineDeploymentProperties withEnvironmentId(String environmentId) { + super.withEnvironmentId(environmentId); return this; } @@ -357,8 +357,8 @@ public OnlineDeploymentProperties withCodeConfiguration(CodeConfiguration codeCo * {@inheritDoc} */ @Override - public OnlineDeploymentProperties withEnvironmentId(String environmentId) { - super.withEnvironmentId(environmentId); + public OnlineDeploymentProperties withEnvironmentVariables(Map environmentVariables) { + super.withEnvironmentVariables(environmentVariables); return this; } @@ -366,8 +366,8 @@ public OnlineDeploymentProperties withEnvironmentId(String environmentId) { * {@inheritDoc} */ @Override - public OnlineDeploymentProperties withEnvironmentVariables(Map environmentVariables) { - super.withEnvironmentVariables(environmentVariables); + public OnlineDeploymentProperties withProperties(Map properties) { + super.withProperties(properties); return this; } @@ -378,12 +378,8 @@ public OnlineDeploymentProperties withEnvironmentVariables(Map e */ @Override public void validate() { - super.validate(); - if (scaleSettings() != null) { - scaleSettings().validate(); - } - if (requestSettings() != null) { - requestSettings().validate(); + if (dataCollector() != null) { + dataCollector().validate(); } if (livenessProbe() != null) { livenessProbe().validate(); @@ -391,8 +387,14 @@ public void validate() { if (readinessProbe() != null) { readinessProbe().validate(); } - if (dataCollector() != null) { - dataCollector().validate(); + if (requestSettings() != null) { + requestSettings().validate(); + } + if (scaleSettings() != null) { + scaleSettings().validate(); + } + if (codeConfiguration() != null) { + codeConfiguration().validate(); } } @@ -402,25 +404,25 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("codeConfiguration", codeConfiguration()); + jsonWriter.writeStringField("description", description()); jsonWriter.writeStringField("environmentId", environmentId()); jsonWriter.writeMapField("environmentVariables", environmentVariables(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("endpointComputeType", this.endpointComputeType == null ? null : this.endpointComputeType.toString()); - jsonWriter.writeJsonField("scaleSettings", this.scaleSettings); - jsonWriter.writeJsonField("requestSettings", this.requestSettings); - jsonWriter.writeStringField("modelMountPath", this.modelMountPath); jsonWriter.writeBooleanField("appInsightsEnabled", this.appInsightsEnabled); - jsonWriter.writeJsonField("livenessProbe", this.livenessProbe); - jsonWriter.writeJsonField("readinessProbe", this.readinessProbe); - jsonWriter.writeStringField("instanceType", this.instanceType); - jsonWriter.writeStringField("model", this.model); + jsonWriter.writeJsonField("dataCollector", this.dataCollector); jsonWriter.writeStringField("egressPublicNetworkAccess", this.egressPublicNetworkAccess == null ? null : this.egressPublicNetworkAccess.toString()); - jsonWriter.writeJsonField("dataCollector", this.dataCollector); + jsonWriter.writeStringField("instanceType", this.instanceType); + jsonWriter.writeJsonField("livenessProbe", this.livenessProbe); + jsonWriter.writeStringField("model", this.model); + jsonWriter.writeStringField("modelMountPath", this.modelMountPath); + jsonWriter.writeJsonField("readinessProbe", this.readinessProbe); + jsonWriter.writeJsonField("requestSettings", this.requestSettings); + jsonWriter.writeJsonField("scaleSettings", this.scaleSettings); return jsonWriter.writeEndObject(); } @@ -466,46 +468,46 @@ static OnlineDeploymentProperties fromJsonKnownDiscriminator(JsonReader jsonRead String fieldName = reader.getFieldName(); reader.nextToken(); - if ("description".equals(fieldName)) { - deserializedOnlineDeploymentProperties.withDescription(reader.getString()); - } else if ("properties".equals(fieldName)) { - Map properties = reader.readMap(reader1 -> reader1.getString()); - deserializedOnlineDeploymentProperties.withProperties(properties); - } else if ("codeConfiguration".equals(fieldName)) { + if ("codeConfiguration".equals(fieldName)) { deserializedOnlineDeploymentProperties.withCodeConfiguration(CodeConfiguration.fromJson(reader)); + } else if ("description".equals(fieldName)) { + deserializedOnlineDeploymentProperties.withDescription(reader.getString()); } else if ("environmentId".equals(fieldName)) { deserializedOnlineDeploymentProperties.withEnvironmentId(reader.getString()); } else if ("environmentVariables".equals(fieldName)) { Map environmentVariables = reader.readMap(reader1 -> reader1.getString()); deserializedOnlineDeploymentProperties.withEnvironmentVariables(environmentVariables); + } else if ("properties".equals(fieldName)) { + Map properties = reader.readMap(reader1 -> reader1.getString()); + deserializedOnlineDeploymentProperties.withProperties(properties); } else if ("endpointComputeType".equals(fieldName)) { deserializedOnlineDeploymentProperties.endpointComputeType = EndpointComputeType.fromString(reader.getString()); - } else if ("scaleSettings".equals(fieldName)) { - deserializedOnlineDeploymentProperties.scaleSettings = OnlineScaleSettings.fromJson(reader); - } else if ("requestSettings".equals(fieldName)) { - deserializedOnlineDeploymentProperties.requestSettings = OnlineRequestSettings.fromJson(reader); - } else if ("modelMountPath".equals(fieldName)) { - deserializedOnlineDeploymentProperties.modelMountPath = reader.getString(); } else if ("appInsightsEnabled".equals(fieldName)) { deserializedOnlineDeploymentProperties.appInsightsEnabled = reader.getNullable(JsonReader::getBoolean); + } else if ("dataCollector".equals(fieldName)) { + deserializedOnlineDeploymentProperties.dataCollector = DataCollector.fromJson(reader); + } else if ("egressPublicNetworkAccess".equals(fieldName)) { + deserializedOnlineDeploymentProperties.egressPublicNetworkAccess + = EgressPublicNetworkAccessType.fromString(reader.getString()); + } else if ("instanceType".equals(fieldName)) { + deserializedOnlineDeploymentProperties.instanceType = reader.getString(); } else if ("livenessProbe".equals(fieldName)) { deserializedOnlineDeploymentProperties.livenessProbe = ProbeSettings.fromJson(reader); - } else if ("readinessProbe".equals(fieldName)) { - deserializedOnlineDeploymentProperties.readinessProbe = ProbeSettings.fromJson(reader); + } else if ("model".equals(fieldName)) { + deserializedOnlineDeploymentProperties.model = reader.getString(); + } else if ("modelMountPath".equals(fieldName)) { + deserializedOnlineDeploymentProperties.modelMountPath = reader.getString(); } else if ("provisioningState".equals(fieldName)) { deserializedOnlineDeploymentProperties.provisioningState = DeploymentProvisioningState.fromString(reader.getString()); - } else if ("instanceType".equals(fieldName)) { - deserializedOnlineDeploymentProperties.instanceType = reader.getString(); - } else if ("model".equals(fieldName)) { - deserializedOnlineDeploymentProperties.model = reader.getString(); - } else if ("egressPublicNetworkAccess".equals(fieldName)) { - deserializedOnlineDeploymentProperties.egressPublicNetworkAccess - = EgressPublicNetworkAccessType.fromString(reader.getString()); - } else if ("dataCollector".equals(fieldName)) { - deserializedOnlineDeploymentProperties.dataCollector = DataCollector.fromJson(reader); + } else if ("readinessProbe".equals(fieldName)) { + deserializedOnlineDeploymentProperties.readinessProbe = ProbeSettings.fromJson(reader); + } else if ("requestSettings".equals(fieldName)) { + deserializedOnlineDeploymentProperties.requestSettings = OnlineRequestSettings.fromJson(reader); + } else if ("scaleSettings".equals(fieldName)) { + deserializedOnlineDeploymentProperties.scaleSettings = OnlineScaleSettings.fromJson(reader); } else { reader.skipChildren(); } 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 448b6864545c9..37c68eaddc1c9 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 @@ -20,14 +20,14 @@ public final class OnlineDeploymentTrackedResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type OnlineDeployment. + * The link to the next page of OnlineDeployment objects. If null, there are no additional pages. */ - private List value; + private String nextLink; /* - * The link to the next page of OnlineDeployment objects. If null, there are no additional pages. + * An array of objects of type OnlineDeployment. */ - private String nextLink; + private List value; /** * Creates an instance of OnlineDeploymentTrackedResourceArmPaginatedResult class. @@ -36,44 +36,44 @@ public OnlineDeploymentTrackedResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type OnlineDeployment. + * Get the nextLink property: The link to the next page of OnlineDeployment objects. If null, there are no + * additional pages. * - * @return the value value. + * @return the nextLink value. */ - public List value() { - return this.value; + public String nextLink() { + return this.nextLink; } /** - * Set the value property: An array of objects of type OnlineDeployment. + * Set the nextLink property: The link to the next page of OnlineDeployment objects. If null, there are no + * additional pages. * - * @param value the value value to set. + * @param nextLink the nextLink value to set. * @return the OnlineDeploymentTrackedResourceArmPaginatedResult object itself. */ - public OnlineDeploymentTrackedResourceArmPaginatedResult withValue(List value) { - this.value = value; + public OnlineDeploymentTrackedResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; return this; } /** - * Get the nextLink property: The link to the next page of OnlineDeployment objects. If null, there are no - * additional pages. + * Get the value property: An array of objects of type OnlineDeployment. * - * @return the nextLink value. + * @return the value value. */ - public String nextLink() { - return this.nextLink; + public List value() { + return this.value; } /** - * Set the nextLink property: The link to the next page of OnlineDeployment objects. If null, there are no - * additional pages. + * Set the value property: An array of objects of type OnlineDeployment. * - * @param nextLink the nextLink value to set. + * @param value the value value to set. * @return the OnlineDeploymentTrackedResourceArmPaginatedResult object itself. */ - public OnlineDeploymentTrackedResourceArmPaginatedResult withNextLink(String nextLink) { - this.nextLink = nextLink; + public OnlineDeploymentTrackedResourceArmPaginatedResult withValue(List value) { + this.value = value; return this; } @@ -94,8 +94,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -115,12 +115,12 @@ public static OnlineDeploymentTrackedResourceArmPaginatedResult fromJson(JsonRea String fieldName = reader.getFieldName(); reader.nextToken(); - if ("value".equals(fieldName)) { + if ("nextLink".equals(fieldName)) { + deserializedOnlineDeploymentTrackedResourceArmPaginatedResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> OnlineDeploymentInner.fromJson(reader1)); deserializedOnlineDeploymentTrackedResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedOnlineDeploymentTrackedResourceArmPaginatedResult.nextLink = reader.getString(); } else { reader.skipChildren(); } 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 06aeb02546a09..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 @@ -51,11 +51,11 @@ public interface OnlineEndpoint { Map tags(); /** - * Gets the properties property: [Required] Additional attributes of the entity. + * Gets the identity property: Managed service identity (system assigned and/or user assigned identities). * - * @return the properties value. + * @return the identity value. */ - OnlineEndpointProperties properties(); + ManagedServiceIdentity identity(); /** * Gets the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of @@ -66,11 +66,11 @@ public interface OnlineEndpoint { String kind(); /** - * Gets the identity property: Managed service identity (system assigned and/or user assigned identities). + * Gets the properties property: [Required] Additional attributes of the entity. * - * @return the identity value. + * @return the properties value. */ - ManagedServiceIdentity identity(); + OnlineEndpointProperties properties(); /** * Gets the sku property: Sku details required for ARM contract for Autoscaling. @@ -183,8 +183,8 @@ interface WithProperties { * 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.WithKind, - DefinitionStages.WithIdentity, DefinitionStages.WithSku { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, + DefinitionStages.WithKind, DefinitionStages.WithSku { /** * Executes the create request. * @@ -215,32 +215,32 @@ interface WithTags { } /** - * The stage of the OnlineEndpoint definition allowing to specify kind. + * The stage of the OnlineEndpoint definition allowing to specify identity. */ - interface WithKind { + interface WithIdentity { /** - * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for - * resources of the same type.. + * Specifies the identity property: Managed service identity (system assigned and/or user assigned + * identities). * - * @param kind Metadata used by portal/tooling/etc to render different UX experiences for resources of the - * same type. + * @param identity Managed service identity (system assigned and/or user assigned identities). * @return the next definition stage. */ - WithCreate withKind(String kind); + WithCreate withIdentity(ManagedServiceIdentity identity); } /** - * The stage of the OnlineEndpoint definition allowing to specify identity. + * The stage of the OnlineEndpoint definition allowing to specify kind. */ - interface WithIdentity { + interface WithKind { /** - * Specifies the identity property: Managed service identity (system assigned and/or user assigned - * identities). + * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for + * resources of the same type.. * - * @param identity Managed service identity (system assigned and/or user assigned identities). + * @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 withIdentity(ManagedServiceIdentity identity); + WithCreate withKind(String kind); } /** 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 48209bb0a73f5..cc92a1ade89f6 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 @@ -5,6 +5,7 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -18,17 +19,23 @@ */ @Fluent public final class OnlineEndpointProperties extends EndpointPropertiesBaseInner { - /* - * Provisioning state for the endpoint. - */ - private EndpointProvisioningState provisioningState; - /* * ARM resource ID of the compute if it exists. * optional */ private String compute; + /* + * Percentage of traffic to be mirrored to each deployment without using returned scoring. Traffic values need to + * sum to utmost 50. + */ + private Map mirrorTraffic; + + /* + * Provisioning state for the endpoint. + */ + private EndpointProvisioningState provisioningState; + /* * Set to "Enabled" for endpoints that should allow public access when Private Link is enabled. */ @@ -40,36 +47,21 @@ public final class OnlineEndpointProperties extends EndpointPropertiesBaseInner private Map traffic; /* - * Percentage of traffic to be mirrored to each deployment without using returned scoring. Traffic values need to - * sum to utmost 50. + * Endpoint Swagger URI. */ - private Map mirrorTraffic; + private String swaggerUri; /* * Endpoint URI. */ private String scoringUri; - /* - * Endpoint Swagger URI. - */ - private String swaggerUri; - /** * Creates an instance of OnlineEndpointProperties class. */ public OnlineEndpointProperties() { } - /** - * Get the provisioningState property: Provisioning state for the endpoint. - * - * @return the provisioningState value. - */ - public EndpointProvisioningState provisioningState() { - return this.provisioningState; - } - /** * Get the compute property: ARM resource ID of the compute if it exists. * optional. @@ -92,6 +84,37 @@ 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() { + return this.provisioningState; + } + /** * Get the publicNetworkAccess property: Set to "Enabled" for endpoints that should allow public access when Private * Link is enabled. @@ -137,25 +160,13 @@ public OnlineEndpointProperties withTraffic(Map traffic) { } /** - * 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. + * Get the swaggerUri property: Endpoint Swagger URI. * - * @param mirrorTraffic the mirrorTraffic value to set. - * @return the OnlineEndpointProperties object itself. + * @return the swaggerUri value. */ - public OnlineEndpointProperties withMirrorTraffic(Map mirrorTraffic) { - this.mirrorTraffic = mirrorTraffic; - return this; + @Override + public String swaggerUri() { + return this.swaggerUri; } /** @@ -168,22 +179,12 @@ public String scoringUri() { return this.scoringUri; } - /** - * Get the swaggerUri property: Endpoint Swagger URI. - * - * @return the swaggerUri value. - */ - @Override - public String swaggerUri() { - return this.swaggerUri; - } - /** * {@inheritDoc} */ @Override - public OnlineEndpointProperties withDescription(String description) { - super.withDescription(description); + public OnlineEndpointProperties withAuthMode(EndpointAuthMode authMode) { + super.withAuthMode(authMode); return this; } @@ -191,8 +192,8 @@ public OnlineEndpointProperties withDescription(String description) { * {@inheritDoc} */ @Override - public OnlineEndpointProperties withProperties(Map properties) { - super.withProperties(properties); + public OnlineEndpointProperties withDescription(String description) { + super.withDescription(description); return this; } @@ -200,8 +201,8 @@ public OnlineEndpointProperties withProperties(Map properties) { * {@inheritDoc} */ @Override - public OnlineEndpointProperties withAuthMode(EndpointAuthMode authMode) { - super.withAuthMode(authMode); + public OnlineEndpointProperties withKeys(EndpointAuthKeysInner keys) { + super.withKeys(keys); return this; } @@ -209,8 +210,8 @@ public OnlineEndpointProperties withAuthMode(EndpointAuthMode authMode) { * {@inheritDoc} */ @Override - public OnlineEndpointProperties withKeys(EndpointAuthKeysInner keys) { - super.withKeys(keys); + public OnlineEndpointProperties withProperties(Map properties) { + super.withProperties(properties); return this; } @@ -221,9 +222,18 @@ public OnlineEndpointProperties withKeys(EndpointAuthKeysInner keys) { */ @Override public void validate() { - super.validate(); + if (authMode() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property authMode in model OnlineEndpointProperties")); + } + if (keys() != null) { + keys().validate(); + } } + private static final ClientLogger LOGGER = new ClientLogger(OnlineEndpointProperties.class); + /** * {@inheritDoc} */ @@ -232,13 +242,13 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("authMode", authMode() == null ? null : authMode().toString()); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("keys", keys()); + jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("compute", this.compute); + jsonWriter.writeMapField("mirrorTraffic", this.mirrorTraffic, (writer, element) -> writer.writeInt(element)); jsonWriter.writeStringField("publicNetworkAccess", this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString()); jsonWriter.writeMapField("traffic", this.traffic, (writer, element) -> writer.writeInt(element)); - jsonWriter.writeMapField("mirrorTraffic", this.mirrorTraffic, (writer, element) -> writer.writeInt(element)); return jsonWriter.writeEndObject(); } @@ -262,6 +272,8 @@ public static OnlineEndpointProperties fromJson(JsonReader jsonReader) throws IO deserializedOnlineEndpointProperties.withAuthMode(EndpointAuthMode.fromString(reader.getString())); } else if ("description".equals(fieldName)) { deserializedOnlineEndpointProperties.withDescription(reader.getString()); + } else if ("keys".equals(fieldName)) { + deserializedOnlineEndpointProperties.withKeys(EndpointAuthKeysInner.fromJson(reader)); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedOnlineEndpointProperties.withProperties(properties); @@ -269,22 +281,20 @@ public static OnlineEndpointProperties fromJson(JsonReader jsonReader) throws IO deserializedOnlineEndpointProperties.scoringUri = reader.getString(); } else if ("swaggerUri".equals(fieldName)) { deserializedOnlineEndpointProperties.swaggerUri = reader.getString(); - } else if ("keys".equals(fieldName)) { - deserializedOnlineEndpointProperties.withKeys(EndpointAuthKeysInner.fromJson(reader)); + } else if ("compute".equals(fieldName)) { + deserializedOnlineEndpointProperties.compute = reader.getString(); + } else if ("mirrorTraffic".equals(fieldName)) { + Map mirrorTraffic = reader.readMap(reader1 -> reader1.getInt()); + deserializedOnlineEndpointProperties.mirrorTraffic = mirrorTraffic; } else if ("provisioningState".equals(fieldName)) { deserializedOnlineEndpointProperties.provisioningState = EndpointProvisioningState.fromString(reader.getString()); - } else if ("compute".equals(fieldName)) { - deserializedOnlineEndpointProperties.compute = reader.getString(); } else if ("publicNetworkAccess".equals(fieldName)) { deserializedOnlineEndpointProperties.publicNetworkAccess = PublicNetworkAccessType.fromString(reader.getString()); } else if ("traffic".equals(fieldName)) { Map traffic = reader.readMap(reader1 -> reader1.getInt()); deserializedOnlineEndpointProperties.traffic = traffic; - } else if ("mirrorTraffic".equals(fieldName)) { - Map mirrorTraffic = reader.readMap(reader1 -> reader1.getInt()); - deserializedOnlineEndpointProperties.mirrorTraffic = mirrorTraffic; } else { reader.skipChildren(); } 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 115ff52045f93..592c9c42b4358 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 @@ -20,14 +20,14 @@ public final class OnlineEndpointTrackedResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type OnlineEndpoint. + * The link to the next page of OnlineEndpoint objects. If null, there are no additional pages. */ - private List value; + private String nextLink; /* - * The link to the next page of OnlineEndpoint objects. If null, there are no additional pages. + * An array of objects of type OnlineEndpoint. */ - private String nextLink; + private List value; /** * Creates an instance of OnlineEndpointTrackedResourceArmPaginatedResult class. @@ -36,44 +36,44 @@ public OnlineEndpointTrackedResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type OnlineEndpoint. + * Get the nextLink property: The link to the next page of OnlineEndpoint objects. If null, there are no additional + * pages. * - * @return the value value. + * @return the nextLink value. */ - public List value() { - return this.value; + public String nextLink() { + return this.nextLink; } /** - * Set the value property: An array of objects of type OnlineEndpoint. + * Set the nextLink property: The link to the next page of OnlineEndpoint objects. If null, there are no additional + * pages. * - * @param value the value value to set. + * @param nextLink the nextLink value to set. * @return the OnlineEndpointTrackedResourceArmPaginatedResult object itself. */ - public OnlineEndpointTrackedResourceArmPaginatedResult withValue(List value) { - this.value = value; + public OnlineEndpointTrackedResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; return this; } /** - * Get the nextLink property: The link to the next page of OnlineEndpoint objects. If null, there are no additional - * pages. + * Get the value property: An array of objects of type OnlineEndpoint. * - * @return the nextLink value. + * @return the value value. */ - public String nextLink() { - return this.nextLink; + public List value() { + return this.value; } /** - * Set the nextLink property: The link to the next page of OnlineEndpoint objects. If null, there are no additional - * pages. + * Set the value property: An array of objects of type OnlineEndpoint. * - * @param nextLink the nextLink value to set. + * @param value the value value to set. * @return the OnlineEndpointTrackedResourceArmPaginatedResult object itself. */ - public OnlineEndpointTrackedResourceArmPaginatedResult withNextLink(String nextLink) { - this.nextLink = nextLink; + public OnlineEndpointTrackedResourceArmPaginatedResult withValue(List value) { + this.value = value; return this; } @@ -94,8 +94,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -115,12 +115,12 @@ public static OnlineEndpointTrackedResourceArmPaginatedResult fromJson(JsonReade String fieldName = reader.getFieldName(); reader.nextToken(); - if ("value".equals(fieldName)) { + if ("nextLink".equals(fieldName)) { + deserializedOnlineEndpointTrackedResourceArmPaginatedResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> OnlineEndpointInner.fromJson(reader1)); deserializedOnlineEndpointTrackedResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedOnlineEndpointTrackedResourceArmPaginatedResult.nextLink = reader.getString(); } else { reader.skipChildren(); } 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 050ae5e1e7c28..eab57900b1dd4 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 @@ -18,6 +18,11 @@ */ @Fluent public final class OnlineRequestSettings implements JsonSerializable { + /* + * The number of maximum concurrent requests per node allowed per deployment. Defaults to 1. + */ + private Integer maxConcurrentRequestsPerInstance; + /* * (Deprecated for Managed Online Endpoints) The maximum amount of time a request will stay in the queue in ISO 8601 * format. @@ -32,17 +37,34 @@ public final class OnlineRequestSettings implements JsonSerializable Duration.parse(nonNullReader.getString())); } else if ("requestTimeout".equals(fieldName)) { deserializedOnlineRequestSettings.requestTimeout = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); - } else if ("maxConcurrentRequestsPerInstance".equals(fieldName)) { - deserializedOnlineRequestSettings.maxConcurrentRequestsPerInstance - = reader.getNullable(JsonReader::getInt); } else { reader.skipChildren(); } 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..607df56b044ce --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OpenAIEndpointDeploymentResourceProperties.java @@ -0,0 +1,229 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the 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.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The OpenAIEndpointDeploymentResourceProperties model. + */ +@Fluent +public final class OpenAIEndpointDeploymentResourceProperties extends EndpointDeploymentResourceProperties { + /* + * Kind of the deployment. + */ + private String type = "Azure.OpenAI"; + + /* + * Model used for the endpoint deployment. + */ + private EndpointDeploymentModel model; + + /* + * The name of RAI policy. + */ + private String raiPolicyName; + + /* + * The sku property. + */ + private CognitiveServicesSku sku; + + /* + * Deployment model version upgrade option. + */ + private DeploymentModelVersionUpgradeOption versionUpgradeOption; + + /** + * Creates an instance of OpenAIEndpointDeploymentResourceProperties class. + */ + public OpenAIEndpointDeploymentResourceProperties() { + } + + /** + * Get the type property: Kind of the deployment. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * 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() { + if (model() == null) { + throw LOGGER.atError() + .log(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); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("failureReason", failureReason()); + jsonWriter.writeJsonField("model", this.model); + jsonWriter.writeStringField("type", this.type); + jsonWriter.writeStringField("raiPolicyName", this.raiPolicyName); + jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeStringField("versionUpgradeOption", + this.versionUpgradeOption == null ? null : this.versionUpgradeOption.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OpenAIEndpointDeploymentResourceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OpenAIEndpointDeploymentResourceProperties if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the OpenAIEndpointDeploymentResourceProperties. + */ + public static OpenAIEndpointDeploymentResourceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OpenAIEndpointDeploymentResourceProperties deserializedOpenAIEndpointDeploymentResourceProperties + = new OpenAIEndpointDeploymentResourceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("failureReason".equals(fieldName)) { + deserializedOpenAIEndpointDeploymentResourceProperties.withFailureReason(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedOpenAIEndpointDeploymentResourceProperties + .withProvisioningState(DefaultResourceProvisioningState.fromString(reader.getString())); + } else if ("model".equals(fieldName)) { + deserializedOpenAIEndpointDeploymentResourceProperties.model + = EndpointDeploymentModel.fromJson(reader); + } else if ("type".equals(fieldName)) { + deserializedOpenAIEndpointDeploymentResourceProperties.type = reader.getString(); + } else if ("raiPolicyName".equals(fieldName)) { + deserializedOpenAIEndpointDeploymentResourceProperties.raiPolicyName = reader.getString(); + } else if ("sku".equals(fieldName)) { + deserializedOpenAIEndpointDeploymentResourceProperties.sku = CognitiveServicesSku.fromJson(reader); + } else if ("versionUpgradeOption".equals(fieldName)) { + deserializedOpenAIEndpointDeploymentResourceProperties.versionUpgradeOption + = DeploymentModelVersionUpgradeOption.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedOpenAIEndpointDeploymentResourceProperties; + }); + } +} 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..70c4cc3b4ec55 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OpenAIEndpointResourceProperties.java @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; +import java.io.IOException; +import java.util.List; + +/** + * The OpenAIEndpointResourceProperties model. + */ +@Fluent +public final class OpenAIEndpointResourceProperties extends EndpointResourceProperties { + /* + * Type of the endpoint. + */ + private EndpointType endpointType = EndpointType.AZURE_OPEN_AI; + + /** + * Creates an instance of OpenAIEndpointResourceProperties class. + */ + public OpenAIEndpointResourceProperties() { + } + + /** + * Get the endpointType property: Type of the endpoint. + * + * @return the endpointType value. + */ + @Override + public EndpointType endpointType() { + return this.endpointType; + } + + /** + * {@inheritDoc} + */ + @Override + public OpenAIEndpointResourceProperties withAssociatedResourceId(String associatedResourceId) { + super.withAssociatedResourceId(associatedResourceId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public OpenAIEndpointResourceProperties + withDeployments(List deployments) { + super.withDeployments(deployments); + 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 withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public OpenAIEndpointResourceProperties withName(String name) { + super.withName(name); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public OpenAIEndpointResourceProperties withShouldCreateAiServicesEndpoint(Boolean shouldCreateAiServicesEndpoint) { + super.withShouldCreateAiServicesEndpoint(shouldCreateAiServicesEndpoint); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (deployments() != null) { + deployments().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("associatedResourceId", associatedResourceId()); + jsonWriter.writeArrayField("deployments", deployments(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("endpointUri", endpointUri()); + jsonWriter.writeStringField("failureReason", failureReason()); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeStringField("name", name()); + jsonWriter.writeBooleanField("shouldCreateAiServicesEndpoint", shouldCreateAiServicesEndpoint()); + jsonWriter.writeStringField("endpointType", this.endpointType == null ? null : this.endpointType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OpenAIEndpointResourceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OpenAIEndpointResourceProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the OpenAIEndpointResourceProperties. + */ + public static OpenAIEndpointResourceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OpenAIEndpointResourceProperties deserializedOpenAIEndpointResourceProperties + = new OpenAIEndpointResourceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("associatedResourceId".equals(fieldName)) { + deserializedOpenAIEndpointResourceProperties.withAssociatedResourceId(reader.getString()); + } else if ("deployments".equals(fieldName)) { + List deployments = reader + .readArray(reader1 -> EndpointDeploymentResourcePropertiesBasicResourceInner.fromJson(reader1)); + deserializedOpenAIEndpointResourceProperties.withDeployments(deployments); + } else if ("endpointUri".equals(fieldName)) { + deserializedOpenAIEndpointResourceProperties.withEndpointUri(reader.getString()); + } else if ("failureReason".equals(fieldName)) { + deserializedOpenAIEndpointResourceProperties.withFailureReason(reader.getString()); + } else if ("location".equals(fieldName)) { + deserializedOpenAIEndpointResourceProperties.withLocation(reader.getString()); + } else if ("name".equals(fieldName)) { + deserializedOpenAIEndpointResourceProperties.withName(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedOpenAIEndpointResourceProperties + .withProvisioningState(DefaultResourceProvisioningState.fromString(reader.getString())); + } else if ("shouldCreateAiServicesEndpoint".equals(fieldName)) { + deserializedOpenAIEndpointResourceProperties + .withShouldCreateAiServicesEndpoint(reader.getNullable(JsonReader::getBoolean)); + } else if ("endpointType".equals(fieldName)) { + deserializedOpenAIEndpointResourceProperties.endpointType + = EndpointType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedOpenAIEndpointResourceProperties; + }); + } +} 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 94745214e55d9..6bdcbbee570bc 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 @@ -31,6 +31,11 @@ public final class OperationName extends ExpandableStringEnum { */ public static final OperationName RESTART = fromString("Restart"); + /** + * Static value Resize for OperationName. + */ + public static final OperationName RESIZE = fromString("Resize"); + /** * Static value Reimage for OperationName. */ 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 a5196eb5cb804..11f260b0bd1c9 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 @@ -41,6 +41,11 @@ public final class OperationStatus extends ExpandableStringEnum */ public static final OperationStatus RESTART_FAILED = fromString("RestartFailed"); + /** + * Static value ResizeFailed for OperationStatus. + */ + public static final OperationStatus RESIZE_FAILED = fromString("ResizeFailed"); + /** * Static value ReimageFailed for OperationStatus. */ 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..84758fda52ee7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OsPatchingStatus.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.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.exception.ManagementError; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Returns metadata about the os patching. + */ +@Fluent +public final class OsPatchingStatus implements JsonSerializable { + /* + * The os patching status. + */ + private PatchStatus patchStatus; + + /* + * Time of the latest os patching. + */ + private String latestPatchTime; + + /* + * Specifies whether this compute instance is pending for reboot to finish os patching. + */ + private Boolean rebootPending; + + /* + * Time of scheduled reboot. + */ + private String scheduledRebootTime; + + /* + * Collection of errors encountered when doing os patching. + */ + private List osPatchingErrors; + + /** + * 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; + } + + /** + * Get the osPatchingErrors property: Collection of errors encountered when doing os patching. + * + * @return the osPatchingErrors value. + */ + public List osPatchingErrors() { + return this.osPatchingErrors; + } + + /** + * Set the osPatchingErrors property: Collection of errors encountered when doing os patching. + * + * @param osPatchingErrors the osPatchingErrors value to set. + * @return the OsPatchingStatus object itself. + */ + public OsPatchingStatus withOsPatchingErrors(List osPatchingErrors) { + this.osPatchingErrors = osPatchingErrors; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("patchStatus", this.patchStatus == null ? null : this.patchStatus.toString()); + jsonWriter.writeStringField("latestPatchTime", this.latestPatchTime); + jsonWriter.writeBooleanField("rebootPending", this.rebootPending); + jsonWriter.writeStringField("scheduledRebootTime", this.scheduledRebootTime); + jsonWriter.writeArrayField("osPatchingErrors", this.osPatchingErrors, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OsPatchingStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OsPatchingStatus if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the OsPatchingStatus. + */ + public static OsPatchingStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OsPatchingStatus deserializedOsPatchingStatus = new OsPatchingStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("patchStatus".equals(fieldName)) { + deserializedOsPatchingStatus.patchStatus = PatchStatus.fromString(reader.getString()); + } else if ("latestPatchTime".equals(fieldName)) { + deserializedOsPatchingStatus.latestPatchTime = reader.getString(); + } else if ("rebootPending".equals(fieldName)) { + deserializedOsPatchingStatus.rebootPending = reader.getNullable(JsonReader::getBoolean); + } else if ("scheduledRebootTime".equals(fieldName)) { + deserializedOsPatchingStatus.scheduledRebootTime = reader.getString(); + } else if ("osPatchingErrors".equals(fieldName)) { + List osPatchingErrors + = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); + deserializedOsPatchingStatus.osPatchingErrors = osPatchingErrors; + } else { + reader.skipChildren(); + } + } + + return deserializedOsPatchingStatus; + }); + } +} 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 index 35b2832512cc6..f107954b13891 100644 --- 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 @@ -10,6 +10,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.util.List; /** * Outbound Rule for the managed network of a machine learning workspace. @@ -26,6 +27,11 @@ public class OutboundRule implements JsonSerializable { */ private RuleCategory category; + /* + * The parentRuleNames property. + */ + private List parentRuleNames; + /* * Type of a managed network Outbound Rule of a machine learning workspace. */ @@ -66,6 +72,26 @@ public OutboundRule withCategory(RuleCategory category) { return this; } + /** + * Get the parentRuleNames property: The parentRuleNames property. + * + * @return the parentRuleNames value. + */ + public List parentRuleNames() { + return this.parentRuleNames; + } + + /** + * Set the parentRuleNames property: The parentRuleNames property. + * + * @param parentRuleNames the parentRuleNames value to set. + * @return the OutboundRule object itself. + */ + OutboundRule withParentRuleNames(List parentRuleNames) { + this.parentRuleNames = parentRuleNames; + return this; + } + /** * Get the status property: Type of a managed network Outbound Rule of a machine learning workspace. * @@ -130,12 +156,12 @@ public static OutboundRule fromJson(JsonReader jsonReader) throws IOException { } } // Use the discriminator value to determine which subtype should be deserialized. - if ("PrivateEndpoint".equals(discriminatorValue)) { + if ("FQDN".equals(discriminatorValue)) { + return FqdnOutboundRule.fromJson(readerToUse.reset()); + } else if ("PrivateEndpoint".equals(discriminatorValue)) { return PrivateEndpointOutboundRule.fromJson(readerToUse.reset()); } else if ("ServiceTag".equals(discriminatorValue)) { return ServiceTagOutboundRule.fromJson(readerToUse.reset()); - } else if ("FQDN".equals(discriminatorValue)) { - return FqdnOutboundRule.fromJson(readerToUse.reset()); } else { return fromJsonKnownDiscriminator(readerToUse.reset()); } @@ -154,6 +180,9 @@ static OutboundRule fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOE deserializedOutboundRule.type = RuleType.fromString(reader.getString()); } else if ("category".equals(fieldName)) { deserializedOutboundRule.category = RuleCategory.fromString(reader.getString()); + } else if ("parentRuleNames".equals(fieldName)) { + List parentRuleNames = reader.readArray(reader1 -> reader1.getString()); + deserializedOutboundRule.parentRuleNames = parentRuleNames; } else if ("status".equals(fieldName)) { deserializedOutboundRule.status = RuleStatus.fromString(reader.getString()); } else { 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 index 9ffd9fc14c5f8..8eabdf17ff3bc 100644 --- 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 @@ -86,7 +86,7 @@ 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); 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 58a86de492715..78a11cf2658eb 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 @@ -21,14 +21,14 @@ public final class OutputPathAssetReference extends AssetReferenceBase { private ReferenceType referenceType = ReferenceType.OUTPUT_PATH; /* - * The path of the file/directory in the job output. + * ARM resource ID of the job. */ - private String path; + private String jobId; /* - * ARM resource ID of the job. + * The path of the file/directory in the job output. */ - private String jobId; + private String path; /** * Creates an instance of OutputPathAssetReference class. @@ -47,42 +47,42 @@ public ReferenceType referenceType() { } /** - * Get the path property: The path of the file/directory in the job output. + * Get the jobId property: ARM resource ID of the job. * - * @return the path value. + * @return the jobId value. */ - public String path() { - return this.path; + public String jobId() { + return this.jobId; } /** - * Set the path property: The path of the file/directory in the job output. + * Set the jobId property: ARM resource ID of the job. * - * @param path the path value to set. + * @param jobId the jobId value to set. * @return the OutputPathAssetReference object itself. */ - public OutputPathAssetReference withPath(String path) { - this.path = path; + public OutputPathAssetReference withJobId(String jobId) { + this.jobId = jobId; return this; } /** - * Get the jobId property: ARM resource ID of the job. + * Get the path property: The path of the file/directory in the job output. * - * @return the jobId value. + * @return the path value. */ - public String jobId() { - return this.jobId; + public String path() { + return this.path; } /** - * Set the jobId property: ARM resource ID of the job. + * Set the path property: The path of the file/directory in the job output. * - * @param jobId the jobId value to set. + * @param path the path value to set. * @return the OutputPathAssetReference object itself. */ - public OutputPathAssetReference withJobId(String jobId) { - this.jobId = jobId; + public OutputPathAssetReference withPath(String path) { + this.path = path; return this; } @@ -93,7 +93,6 @@ public OutputPathAssetReference withJobId(String jobId) { */ @Override public void validate() { - super.validate(); } /** @@ -103,8 +102,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("referenceType", this.referenceType == null ? null : this.referenceType.toString()); - jsonWriter.writeStringField("path", this.path); jsonWriter.writeStringField("jobId", this.jobId); + jsonWriter.writeStringField("path", this.path); return jsonWriter.writeEndObject(); } @@ -125,10 +124,10 @@ public static OutputPathAssetReference fromJson(JsonReader jsonReader) throws IO if ("referenceType".equals(fieldName)) { deserializedOutputPathAssetReference.referenceType = ReferenceType.fromString(reader.getString()); - } else if ("path".equals(fieldName)) { - deserializedOutputPathAssetReference.path = reader.getString(); } else if ("jobId".equals(fieldName)) { deserializedOutputPathAssetReference.jobId = reader.getString(); + } else if ("path".equals(fieldName)) { + deserializedOutputPathAssetReference.path = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageDetails.java new file mode 100644 index 0000000000000..930d6ae2fd5bc --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PackageDetails.java @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the 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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The PackageDetails model. + */ +@Fluent +public final class PackageDetails implements JsonSerializable { + /* + * Install path. + */ + private String installPath; + + /* + * Installed version. + */ + private String installedVersion; + + /* + * Package or dependency name. + */ + private String name; + + /* + * Patched version. + */ + private String patchedVersion; + + /** + * Creates an instance of PackageDetails class. + */ + public PackageDetails() { + } + + /** + * Get the installPath property: Install path. + * + * @return the installPath value. + */ + public String installPath() { + return this.installPath; + } + + /** + * Set the installPath property: Install path. + * + * @param installPath the installPath value to set. + * @return the PackageDetails object itself. + */ + public PackageDetails withInstallPath(String installPath) { + this.installPath = installPath; + return this; + } + + /** + * Get the installedVersion property: Installed version. + * + * @return the installedVersion value. + */ + public String installedVersion() { + return this.installedVersion; + } + + /** + * Set the installedVersion property: Installed version. + * + * @param installedVersion the installedVersion value to set. + * @return the PackageDetails object itself. + */ + public PackageDetails withInstalledVersion(String installedVersion) { + this.installedVersion = installedVersion; + return this; + } + + /** + * Get the name property: Package or dependency name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Package or dependency name. + * + * @param name the name value to set. + * @return the PackageDetails object itself. + */ + public PackageDetails withName(String name) { + this.name = name; + return this; + } + + /** + * Get the patchedVersion property: Patched version. + * + * @return the patchedVersion value. + */ + public String patchedVersion() { + return this.patchedVersion; + } + + /** + * Set the patchedVersion property: Patched version. + * + * @param patchedVersion the patchedVersion value to set. + * @return the PackageDetails object itself. + */ + public PackageDetails withPatchedVersion(String patchedVersion) { + this.patchedVersion = patchedVersion; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("installPath", this.installPath); + jsonWriter.writeStringField("installedVersion", this.installedVersion); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("patchedVersion", this.patchedVersion); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PackageDetails from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PackageDetails if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the PackageDetails. + */ + public static PackageDetails fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PackageDetails deserializedPackageDetails = new PackageDetails(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("installPath".equals(fieldName)) { + deserializedPackageDetails.installPath = reader.getString(); + } else if ("installedVersion".equals(fieldName)) { + deserializedPackageDetails.installedVersion = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPackageDetails.name = reader.getString(); + } else if ("patchedVersion".equals(fieldName)) { + deserializedPackageDetails.patchedVersion = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPackageDetails; + }); + } +} 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 94621ebcbc369..7ce083254c9b9 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 @@ -63,7 +63,6 @@ public PartialMinimalTrackedResourceWithIdentity withTags(Map ta */ @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/PartialMinimalTrackedResourceWithSku.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithSku.java index 16db7a27cf84c..a15793100fd7c 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 @@ -63,7 +63,6 @@ public PartialMinimalTrackedResourceWithSku withTags(Map tags) { */ @Override public void validate() { - super.validate(); if (sku() != null) { sku().validate(); } 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 index 263a8830f4391..cbd1f24c52cc5 100644 --- 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 @@ -17,14 +17,14 @@ @Fluent public final class PartialMinimalTrackedResourceWithSkuAndIdentity extends PartialMinimalTrackedResource { /* - * Sku details required for ARM contract for Autoscaling. + * Managed service identity (system assigned and/or user assigned identities) */ - private PartialSku sku; + private PartialManagedServiceIdentity identity; /* - * Managed service identity (system assigned and/or user assigned identities) + * Sku details required for ARM contract for Autoscaling. */ - private PartialManagedServiceIdentity identity; + private PartialSku sku; /** * Creates an instance of PartialMinimalTrackedResourceWithSkuAndIdentity class. @@ -33,42 +33,42 @@ public PartialMinimalTrackedResourceWithSkuAndIdentity() { } /** - * Get the sku property: Sku details required for ARM contract for Autoscaling. + * Get the identity property: Managed service identity (system assigned and/or user assigned identities). * - * @return the sku value. + * @return the identity value. */ - public PartialSku sku() { - return this.sku; + public PartialManagedServiceIdentity identity() { + return this.identity; } /** - * Set the sku property: Sku details required for ARM contract for Autoscaling. + * Set the identity property: Managed service identity (system assigned and/or user assigned identities). * - * @param sku the sku value to set. + * @param identity the identity value to set. * @return the PartialMinimalTrackedResourceWithSkuAndIdentity object itself. */ - public PartialMinimalTrackedResourceWithSkuAndIdentity withSku(PartialSku sku) { - this.sku = sku; + public PartialMinimalTrackedResourceWithSkuAndIdentity withIdentity(PartialManagedServiceIdentity identity) { + this.identity = identity; return this; } /** - * Get the identity property: Managed service identity (system assigned and/or user assigned identities). + * Get the sku property: Sku details required for ARM contract for Autoscaling. * - * @return the identity value. + * @return the sku value. */ - public PartialManagedServiceIdentity identity() { - return this.identity; + public PartialSku sku() { + return this.sku; } /** - * Set the identity property: Managed service identity (system assigned and/or user assigned identities). + * Set the sku property: Sku details required for ARM contract for Autoscaling. * - * @param identity the identity value to set. + * @param sku the sku value to set. * @return the PartialMinimalTrackedResourceWithSkuAndIdentity object itself. */ - public PartialMinimalTrackedResourceWithSkuAndIdentity withIdentity(PartialManagedServiceIdentity identity) { - this.identity = identity; + public PartialMinimalTrackedResourceWithSkuAndIdentity withSku(PartialSku sku) { + this.sku = sku; return this; } @@ -88,13 +88,12 @@ public PartialMinimalTrackedResourceWithSkuAndIdentity withTags(Map writer.writeString(element)); - jsonWriter.writeJsonField("sku", this.sku); jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeJsonField("sku", this.sku); return jsonWriter.writeEndObject(); } @@ -128,11 +127,11 @@ public static PartialMinimalTrackedResourceWithSkuAndIdentity fromJson(JsonReade if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedPartialMinimalTrackedResourceWithSkuAndIdentity.withTags(tags); - } else if ("sku".equals(fieldName)) { - deserializedPartialMinimalTrackedResourceWithSkuAndIdentity.sku = PartialSku.fromJson(reader); } else if ("identity".equals(fieldName)) { deserializedPartialMinimalTrackedResourceWithSkuAndIdentity.identity = PartialManagedServiceIdentity.fromJson(reader); + } else if ("sku".equals(fieldName)) { + deserializedPartialMinimalTrackedResourceWithSkuAndIdentity.sku = PartialSku.fromJson(reader); } else { reader.skipChildren(); } 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 a4e0cec722d02..5f7040a3ac323 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 @@ -17,32 +17,32 @@ @Fluent public final class PartialSku implements JsonSerializable { /* - * The name of the SKU. Ex - P3. It is typically a letter+number code. + * 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. */ - private String name; + private Integer capacity; /* - * 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. + * If the service has different generations of hardware, for the same SKU, then that can be captured here. */ - private SkuTier tier; + private String family; /* - * The SKU size. When the name field is the combination of tier and some other value, this would be the standalone - * code. + * The name of the SKU. Ex - P3. It is typically a letter+number code. */ - private String size; + private String name; /* - * If the service has different generations of hardware, for the same SKU, then that can be captured here. + * The SKU size. When the name field is the combination of tier and some other value, this would be the standalone + * code. */ - private String family; + private String size; /* - * 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. + * 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. */ - private Integer capacity; + private SkuTier tier; /** * Creates an instance of PartialSku class. @@ -51,110 +51,110 @@ public PartialSku() { } /** - * Get the name property: The name of the SKU. Ex - P3. It is typically a letter+number code. + * 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 name value. + * @return the capacity value. */ - public String name() { - return this.name; + public Integer capacity() { + return this.capacity; } /** - * Set the name property: The name of the SKU. Ex - P3. It is typically a letter+number code. + * 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 name the name value to set. + * @param capacity the capacity value to set. * @return the PartialSku object itself. */ - public PartialSku withName(String name) { - this.name = name; + public PartialSku withCapacity(Integer capacity) { + this.capacity = capacity; return this; } /** - * 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. + * Get the family property: If the service has different generations of hardware, for the same SKU, then that can be + * captured here. * - * @return the tier value. + * @return the family value. */ - public SkuTier tier() { - return this.tier; + public String family() { + return this.family; } /** - * 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. + * Set the family property: If the service has different generations of hardware, for the same SKU, then that can be + * captured here. * - * @param tier the tier value to set. + * @param family the family value to set. * @return the PartialSku object itself. */ - public PartialSku withTier(SkuTier tier) { - this.tier = tier; + public PartialSku withFamily(String family) { + this.family = family; return this; } /** - * 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. + * Get the name property: The name of the SKU. Ex - P3. It is typically a letter+number code. * - * @return the size value. + * @return the name value. */ - public String size() { - return this.size; + public String name() { + return this.name; } /** - * 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. + * Set the name property: The name of the SKU. Ex - P3. It is typically a letter+number code. * - * @param size the size value to set. + * @param name the name value to set. * @return the PartialSku object itself. */ - public PartialSku withSize(String size) { - this.size = size; + public PartialSku withName(String name) { + this.name = name; return this; } /** - * Get the family property: If the service has different generations of hardware, for the same SKU, then that can be - * captured here. + * 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 family value. + * @return the size value. */ - public String family() { - return this.family; + public String size() { + return this.size; } /** - * Set the family property: If the service has different generations of hardware, for the same SKU, then that can be - * captured here. + * 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 family the family value to set. + * @param size the size value to set. * @return the PartialSku object itself. */ - public PartialSku withFamily(String family) { - this.family = family; + public PartialSku withSize(String size) { + this.size = size; return this; } /** - * 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. + * 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 capacity value. + * @return the tier value. */ - public Integer capacity() { - return this.capacity; + public SkuTier tier() { + return this.tier; } /** - * 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. + * 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 capacity the capacity value to set. + * @param tier the tier value to set. * @return the PartialSku object itself. */ - public PartialSku withCapacity(Integer capacity) { - this.capacity = capacity; + public PartialSku withTier(SkuTier tier) { + this.tier = tier; return this; } @@ -172,11 +172,11 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("capacity", this.capacity); + jsonWriter.writeStringField("family", this.family); jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("tier", this.tier == null ? null : this.tier.toString()); jsonWriter.writeStringField("size", this.size); - jsonWriter.writeStringField("family", this.family); - jsonWriter.writeNumberField("capacity", this.capacity); + jsonWriter.writeStringField("tier", this.tier == null ? null : this.tier.toString()); return jsonWriter.writeEndObject(); } @@ -195,16 +195,16 @@ public static PartialSku fromJson(JsonReader jsonReader) throws IOException { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("name".equals(fieldName)) { + if ("capacity".equals(fieldName)) { + deserializedPartialSku.capacity = reader.getNullable(JsonReader::getInt); + } else if ("family".equals(fieldName)) { + deserializedPartialSku.family = reader.getString(); + } else if ("name".equals(fieldName)) { deserializedPartialSku.name = reader.getString(); - } else if ("tier".equals(fieldName)) { - deserializedPartialSku.tier = SkuTier.fromString(reader.getString()); } else if ("size".equals(fieldName)) { deserializedPartialSku.size = reader.getString(); - } else if ("family".equals(fieldName)) { - deserializedPartialSku.family = reader.getString(); - } else if ("capacity".equals(fieldName)) { - deserializedPartialSku.capacity = reader.getNullable(JsonReader::getInt); + } else if ("tier".equals(fieldName)) { + deserializedPartialSku.tier = SkuTier.fromString(reader.getString()); } else { reader.skipChildren(); } 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 839f1fae0ee7f..dbe29891a1ada 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 @@ -30,16 +30,6 @@ public final class PatAuthTypeWorkspaceConnectionProperties extends WorkspaceCon */ private WorkspaceConnectionPersonalAccessToken credentials; - /* - * The createdByWorkspaceArmId property. - */ - private String createdByWorkspaceArmId; - - /* - * Group based on connection category - */ - private ConnectionGroup group; - /** * Creates an instance of PatAuthTypeWorkspaceConnectionProperties class. */ @@ -78,31 +68,29 @@ public WorkspaceConnectionPersonalAccessToken credentials() { } /** - * Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. - * - * @return the createdByWorkspaceArmId value. + * {@inheritDoc} */ @Override - public String createdByWorkspaceArmId() { - return this.createdByWorkspaceArmId; + public PatAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { + super.withCategory(category); + return this; } /** - * Get the group property: Group based on connection category. - * - * @return the group value. + * {@inheritDoc} */ @Override - public ConnectionGroup group() { - return this.group; + public PatAuthTypeWorkspaceConnectionProperties withError(String error) { + super.withError(error); + return this; } /** * {@inheritDoc} */ @Override - public PatAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); + public PatAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { + super.withExpiryTime(expiryTime); return this; } @@ -110,8 +98,8 @@ public PatAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory * {@inheritDoc} */ @Override - public PatAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { - super.withExpiryTime(expiryTime); + public PatAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { + super.withIsSharedToAll(isSharedToAll); return this; } @@ -119,8 +107,8 @@ public PatAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime ex * {@inheritDoc} */ @Override - public PatAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { - super.withIsSharedToAll(isSharedToAll); + public PatAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { + super.withMetadata(metadata); return this; } @@ -128,8 +116,8 @@ public PatAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isShar * {@inheritDoc} */ @Override - public PatAuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); + public PatAuthTypeWorkspaceConnectionProperties withPeRequirement(ManagedPERequirement peRequirement) { + super.withPeRequirement(peRequirement); return this; } @@ -137,8 +125,8 @@ public PatAuthTypeWorkspaceConnectionProperties withTarget(String target) { * {@inheritDoc} */ @Override - public PatAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { - super.withMetadata(metadata); + public PatAuthTypeWorkspaceConnectionProperties withPeStatus(ManagedPEStatus peStatus) { + super.withPeStatus(peStatus); return this; } @@ -155,8 +143,8 @@ public PatAuthTypeWorkspaceConnectionProperties withSharedUserList(List * {@inheritDoc} */ @Override - public PatAuthTypeWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); + public PatAuthTypeWorkspaceConnectionProperties withTarget(String target) { + super.withTarget(target); return this; } @@ -164,8 +152,9 @@ public PatAuthTypeWorkspaceConnectionProperties withValue(String value) { * {@inheritDoc} */ @Override - public PatAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); + public PatAuthTypeWorkspaceConnectionProperties + withUseWorkspaceManagedIdentity(Boolean useWorkspaceManagedIdentity) { + super.withUseWorkspaceManagedIdentity(useWorkspaceManagedIdentity); return this; } @@ -176,7 +165,6 @@ public PatAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valu */ @Override public void validate() { - super.validate(); if (credentials() != null) { credentials().validate(); } @@ -189,15 +177,17 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("category", category() == null ? null : category().toString()); + jsonWriter.writeStringField("error", error()); jsonWriter.writeStringField("expiryTime", expiryTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(expiryTime())); jsonWriter.writeBooleanField("isSharedToAll", isSharedToAll()); - jsonWriter.writeStringField("target", target()); jsonWriter.writeMapField("metadata", metadata(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("peRequirement", peRequirement() == null ? null : peRequirement().toString()); + jsonWriter.writeStringField("peStatus", peStatus() == null ? null : peStatus().toString()); jsonWriter.writeArrayField("sharedUserList", sharedUserList(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", value()); - jsonWriter.writeStringField("valueFormat", valueFormat() == null ? null : valueFormat().toString()); + jsonWriter.writeStringField("target", target()); + jsonWriter.writeBooleanField("useWorkspaceManagedIdentity", useWorkspaceManagedIdentity()); jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); jsonWriter.writeJsonField("credentials", this.credentials); return jsonWriter.writeEndObject(); @@ -223,29 +213,36 @@ public static PatAuthTypeWorkspaceConnectionProperties fromJson(JsonReader jsonR deserializedPatAuthTypeWorkspaceConnectionProperties .withCategory(ConnectionCategory.fromString(reader.getString())); } else if ("createdByWorkspaceArmId".equals(fieldName)) { - deserializedPatAuthTypeWorkspaceConnectionProperties.createdByWorkspaceArmId = reader.getString(); + deserializedPatAuthTypeWorkspaceConnectionProperties + .withCreatedByWorkspaceArmId(reader.getString()); + } else if ("error".equals(fieldName)) { + deserializedPatAuthTypeWorkspaceConnectionProperties.withError(reader.getString()); } else if ("expiryTime".equals(fieldName)) { deserializedPatAuthTypeWorkspaceConnectionProperties.withExpiryTime(reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("group".equals(fieldName)) { - deserializedPatAuthTypeWorkspaceConnectionProperties.group - = ConnectionGroup.fromString(reader.getString()); + deserializedPatAuthTypeWorkspaceConnectionProperties + .withGroup(ConnectionGroup.fromString(reader.getString())); } else if ("isSharedToAll".equals(fieldName)) { deserializedPatAuthTypeWorkspaceConnectionProperties .withIsSharedToAll(reader.getNullable(JsonReader::getBoolean)); - } else if ("target".equals(fieldName)) { - deserializedPatAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); } else if ("metadata".equals(fieldName)) { Map metadata = reader.readMap(reader1 -> reader1.getString()); deserializedPatAuthTypeWorkspaceConnectionProperties.withMetadata(metadata); + } else if ("peRequirement".equals(fieldName)) { + deserializedPatAuthTypeWorkspaceConnectionProperties + .withPeRequirement(ManagedPERequirement.fromString(reader.getString())); + } else if ("peStatus".equals(fieldName)) { + deserializedPatAuthTypeWorkspaceConnectionProperties + .withPeStatus(ManagedPEStatus.fromString(reader.getString())); } else if ("sharedUserList".equals(fieldName)) { List sharedUserList = reader.readArray(reader1 -> reader1.getString()); deserializedPatAuthTypeWorkspaceConnectionProperties.withSharedUserList(sharedUserList); - } else if ("value".equals(fieldName)) { - deserializedPatAuthTypeWorkspaceConnectionProperties.withValue(reader.getString()); - } else if ("valueFormat".equals(fieldName)) { + } else if ("target".equals(fieldName)) { + deserializedPatAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); + } else if ("useWorkspaceManagedIdentity".equals(fieldName)) { deserializedPatAuthTypeWorkspaceConnectionProperties - .withValueFormat(ValueFormat.fromString(reader.getString())); + .withUseWorkspaceManagedIdentity(reader.getNullable(JsonReader::getBoolean)); } else if ("authType".equals(fieldName)) { deserializedPatAuthTypeWorkspaceConnectionProperties.authType = ConnectionAuthType.fromString(reader.getString()); 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..02029df48f7fd --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PatchStatus.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 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. + */ + 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/PipelineJob.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PipelineJob.java index 2abbbdf9138f1..e4748231af975 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 @@ -22,34 +22,29 @@ public final class PipelineJob extends JobBaseProperties { private JobType jobType = JobType.PIPELINE; /* - * Pipeline settings, for things like ContinueRunOnStepFailure etc. + * Inputs for the pipeline job. */ - private Object settings; + private Map inputs; /* * Jobs construct the Pipeline Job. */ private Map jobs; - /* - * Inputs for the pipeline job. - */ - private Map inputs; - /* * Outputs for the pipeline job */ private Map outputs; /* - * ARM resource ID of source job. + * Pipeline settings, for things like ContinueRunOnStepFailure etc. */ - private String sourceJobId; + private Object settings; /* - * Status of the job. + * ARM resource ID of source job. */ - private JobStatus status; + private String sourceJobId; /** * Creates an instance of PipelineJob class. @@ -68,22 +63,22 @@ public JobType jobType() { } /** - * Get the settings property: Pipeline settings, for things like ContinueRunOnStepFailure etc. + * Get the inputs property: Inputs for the pipeline job. * - * @return the settings value. + * @return the inputs value. */ - public Object settings() { - return this.settings; + public Map inputs() { + return this.inputs; } /** - * Set the settings property: Pipeline settings, for things like ContinueRunOnStepFailure etc. + * Set the inputs property: Inputs for the pipeline job. * - * @param settings the settings value to set. + * @param inputs the inputs value to set. * @return the PipelineJob object itself. */ - public PipelineJob withSettings(Object settings) { - this.settings = settings; + public PipelineJob withInputs(Map inputs) { + this.inputs = inputs; return this; } @@ -108,42 +103,42 @@ public PipelineJob withJobs(Map jobs) { } /** - * Get the inputs property: Inputs for the pipeline job. + * Get the outputs property: Outputs for the pipeline job. * - * @return the inputs value. + * @return the outputs value. */ - public Map inputs() { - return this.inputs; + public Map outputs() { + return this.outputs; } /** - * Set the inputs property: Inputs for the pipeline job. + * Set the outputs property: Outputs for the pipeline job. * - * @param inputs the inputs value to set. + * @param outputs the outputs value to set. * @return the PipelineJob object itself. */ - public PipelineJob withInputs(Map inputs) { - this.inputs = inputs; + public PipelineJob withOutputs(Map outputs) { + this.outputs = outputs; return this; } /** - * Get the outputs property: Outputs for the pipeline job. + * Get the settings property: Pipeline settings, for things like ContinueRunOnStepFailure etc. * - * @return the outputs value. + * @return the settings value. */ - public Map outputs() { - return this.outputs; + public Object settings() { + return this.settings; } /** - * Set the outputs property: Outputs for the pipeline job. + * Set the settings property: Pipeline settings, for things like ContinueRunOnStepFailure etc. * - * @param outputs the outputs value to set. + * @param settings the settings value to set. * @return the PipelineJob object itself. */ - public PipelineJob withOutputs(Map outputs) { - this.outputs = outputs; + public PipelineJob withSettings(Object settings) { + this.settings = settings; return this; } @@ -168,21 +163,20 @@ public PipelineJob withSourceJobId(String sourceJobId) { } /** - * Get the status property: Status of the job. - * - * @return the status value. + * {@inheritDoc} */ @Override - public JobStatus status() { - return this.status; + public PipelineJob withComponentId(String componentId) { + super.withComponentId(componentId); + return this; } /** * {@inheritDoc} */ @Override - public PipelineJob withDisplayName(String displayName) { - super.withDisplayName(displayName); + public PipelineJob withComputeId(String computeId) { + super.withComputeId(computeId); return this; } @@ -190,8 +184,8 @@ public PipelineJob withDisplayName(String displayName) { * {@inheritDoc} */ @Override - public PipelineJob withExperimentName(String experimentName) { - super.withExperimentName(experimentName); + public PipelineJob withDisplayName(String displayName) { + super.withDisplayName(displayName); return this; } @@ -199,8 +193,8 @@ public PipelineJob withExperimentName(String experimentName) { * {@inheritDoc} */ @Override - public PipelineJob withServices(Map services) { - super.withServices(services); + public PipelineJob withExperimentName(String experimentName) { + super.withExperimentName(experimentName); return this; } @@ -208,8 +202,8 @@ public PipelineJob withServices(Map services) { * {@inheritDoc} */ @Override - public PipelineJob withComputeId(String computeId) { - super.withComputeId(computeId); + public PipelineJob withIdentity(IdentityConfiguration identity) { + super.withIdentity(identity); return this; } @@ -226,8 +220,8 @@ public PipelineJob withIsArchived(Boolean isArchived) { * {@inheritDoc} */ @Override - public PipelineJob withIdentity(IdentityConfiguration identity) { - super.withIdentity(identity); + public PipelineJob withNotificationSetting(NotificationSetting notificationSetting) { + super.withNotificationSetting(notificationSetting); return this; } @@ -235,8 +229,8 @@ public PipelineJob withIdentity(IdentityConfiguration identity) { * {@inheritDoc} */ @Override - public PipelineJob withComponentId(String componentId) { - super.withComponentId(componentId); + public PipelineJob withParentJobName(String parentJobName) { + super.withParentJobName(parentJobName); return this; } @@ -244,8 +238,8 @@ public PipelineJob withComponentId(String componentId) { * {@inheritDoc} */ @Override - public PipelineJob withNotificationSetting(NotificationSetting notificationSetting) { - super.withNotificationSetting(notificationSetting); + public PipelineJob withServices(Map services) { + super.withServices(services); return this; } @@ -262,8 +256,8 @@ public PipelineJob withDescription(String description) { * {@inheritDoc} */ @Override - public PipelineJob withTags(Map tags) { - super.withTags(tags); + public PipelineJob withProperties(Map properties) { + super.withProperties(properties); return this; } @@ -271,8 +265,8 @@ public PipelineJob withTags(Map tags) { * {@inheritDoc} */ @Override - public PipelineJob withProperties(Map properties) { - super.withProperties(properties); + public PipelineJob withTags(Map tags) { + super.withTags(tags); return this; } @@ -283,7 +277,6 @@ public PipelineJob withProperties(Map properties) { */ @Override public void validate() { - super.validate(); if (inputs() != null) { inputs().values().forEach(e -> { if (e != null) { @@ -298,6 +291,19 @@ public void validate() { } }); } + if (identity() != null) { + identity().validate(); + } + if (notificationSetting() != null) { + notificationSetting().validate(); + } + if (services() != null) { + services().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); + } } /** @@ -307,21 +313,22 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("componentId", componentId()); + jsonWriter.writeStringField("computeId", computeId()); jsonWriter.writeStringField("displayName", displayName()); jsonWriter.writeStringField("experimentName", experimentName()); - jsonWriter.writeMapField("services", services(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("computeId", computeId()); - jsonWriter.writeBooleanField("isArchived", isArchived()); jsonWriter.writeJsonField("identity", identity()); - jsonWriter.writeStringField("componentId", componentId()); + jsonWriter.writeBooleanField("isArchived", isArchived()); jsonWriter.writeJsonField("notificationSetting", notificationSetting()); + jsonWriter.writeStringField("parentJobName", parentJobName()); + jsonWriter.writeMapField("services", services(), (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); - jsonWriter.writeUntypedField("settings", this.settings); - jsonWriter.writeMapField("jobs", this.jobs, (writer, element) -> writer.writeUntyped(element)); jsonWriter.writeMapField("inputs", this.inputs, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeMapField("jobs", this.jobs, (writer, element) -> writer.writeUntyped(element)); jsonWriter.writeMapField("outputs", this.outputs, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeUntypedField("settings", this.settings); jsonWriter.writeStringField("sourceJobId", this.sourceJobId); return jsonWriter.writeEndObject(); } @@ -343,44 +350,46 @@ public static PipelineJob fromJson(JsonReader jsonReader) throws IOException { if ("description".equals(fieldName)) { deserializedPipelineJob.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedPipelineJob.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedPipelineJob.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedPipelineJob.withTags(tags); + } else if ("componentId".equals(fieldName)) { + deserializedPipelineJob.withComponentId(reader.getString()); + } else if ("computeId".equals(fieldName)) { + deserializedPipelineJob.withComputeId(reader.getString()); } else if ("displayName".equals(fieldName)) { deserializedPipelineJob.withDisplayName(reader.getString()); - } else if ("status".equals(fieldName)) { - deserializedPipelineJob.status = JobStatus.fromString(reader.getString()); } else if ("experimentName".equals(fieldName)) { deserializedPipelineJob.withExperimentName(reader.getString()); - } else if ("services".equals(fieldName)) { - Map services = reader.readMap(reader1 -> JobService.fromJson(reader1)); - deserializedPipelineJob.withServices(services); - } else if ("computeId".equals(fieldName)) { - deserializedPipelineJob.withComputeId(reader.getString()); - } else if ("isArchived".equals(fieldName)) { - deserializedPipelineJob.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("identity".equals(fieldName)) { deserializedPipelineJob.withIdentity(IdentityConfiguration.fromJson(reader)); - } else if ("componentId".equals(fieldName)) { - deserializedPipelineJob.withComponentId(reader.getString()); + } else if ("isArchived".equals(fieldName)) { + deserializedPipelineJob.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("notificationSetting".equals(fieldName)) { deserializedPipelineJob.withNotificationSetting(NotificationSetting.fromJson(reader)); + } else if ("parentJobName".equals(fieldName)) { + deserializedPipelineJob.withParentJobName(reader.getString()); + } else if ("services".equals(fieldName)) { + Map services = reader.readMap(reader1 -> JobService.fromJson(reader1)); + deserializedPipelineJob.withServices(services); + } else if ("status".equals(fieldName)) { + deserializedPipelineJob.withStatus(JobStatus.fromString(reader.getString())); } else if ("jobType".equals(fieldName)) { deserializedPipelineJob.jobType = JobType.fromString(reader.getString()); - } else if ("settings".equals(fieldName)) { - deserializedPipelineJob.settings = reader.readUntyped(); - } else if ("jobs".equals(fieldName)) { - Map jobs = reader.readMap(reader1 -> reader1.readUntyped()); - deserializedPipelineJob.jobs = jobs; } else if ("inputs".equals(fieldName)) { Map inputs = reader.readMap(reader1 -> JobInput.fromJson(reader1)); deserializedPipelineJob.inputs = inputs; + } else if ("jobs".equals(fieldName)) { + Map jobs = reader.readMap(reader1 -> reader1.readUntyped()); + deserializedPipelineJob.jobs = jobs; } else if ("outputs".equals(fieldName)) { Map outputs = reader.readMap(reader1 -> JobOutput.fromJson(reader1)); deserializedPipelineJob.outputs = outputs; + } else if ("settings".equals(fieldName)) { + deserializedPipelineJob.settings = reader.readUntyped(); } else if ("sourceJobId".equals(fieldName)) { deserializedPipelineJob.sourceJobId = reader.getString(); } else { 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..e817d34b00b0f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PoolProvisioningState.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.util.ExpandableStringEnum; +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. + */ + 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/PredictionDriftMonitoringSignal.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PredictionDriftMonitoringSignal.java index 41a8ed5d9da9a..336b1d29e6bc9 100644 --- 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 @@ -23,6 +23,11 @@ public final class PredictionDriftMonitoringSignal extends MonitoringSignalBase */ private MonitoringSignalType signalType = MonitoringSignalType.PREDICTION_DRIFT; + /* + * A dictionary that maps feature names to their respective data types. + */ + private Map featureDataTypeOverride; + /* * [Required] A list of metrics to calculate and their associated thresholds. */ @@ -38,11 +43,6 @@ public final class PredictionDriftMonitoringSignal extends MonitoringSignalBase */ private MonitoringInputDataBase referenceData; - /* - * A dictionary that maps feature names to their respective data types. - */ - private Map featureDataTypeOverride; - /** * Creates an instance of PredictionDriftMonitoringSignal class. */ @@ -59,6 +59,27 @@ public MonitoringSignalType signalType() { return this.signalType; } + /** + * 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. * @@ -120,27 +141,6 @@ public PredictionDriftMonitoringSignal withReferenceData(MonitoringInputDataBase 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 PredictionDriftMonitoringSignal object itself. - */ - public PredictionDriftMonitoringSignal - withFeatureDataTypeOverride(Map featureDataTypeOverride) { - this.featureDataTypeOverride = featureDataTypeOverride; - return this; - } - /** * {@inheritDoc} */ @@ -166,7 +166,6 @@ public PredictionDriftMonitoringSignal withProperties(Map proper */ @Override public void validate() { - super.validate(); if (metricThresholds() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( 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 af1b0ca198b45..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 @@ -36,32 +36,33 @@ public interface PrivateEndpointConnection { 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. + * 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 tags value. + * @return the sku value. */ - Map tags(); + Sku sku(); /** - * Gets the sku property: The sku of the workspace. + * Gets the tags property: Dictionary of <string>. * - * @return the sku value. + * @return the tags value. */ - Sku sku(); + Map tags(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -71,22 +72,21 @@ public interface PrivateEndpointConnection { 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. */ @@ -145,7 +145,7 @@ 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); @@ -157,7 +157,7 @@ interface WithParentResource { */ interface WithCreate extends DefinitionStages.WithLocation, DefinitionStages.WithTags, DefinitionStages.WithIdentity, DefinitionStages.WithSku, DefinitionStages.WithPrivateEndpoint, - DefinitionStages.WithPrivateLinkServiceConnectionState { + DefinitionStages.WithPrivateLinkServiceConnectionState, DefinitionStages.WithProvisioningState { /** * Executes the create request. * @@ -181,7 +181,7 @@ 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); @@ -189,7 +189,7 @@ 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(String location); @@ -200,9 +200,9 @@ interface WithLocation { */ interface WithTags { /** - * Specifies the tags property: Contains resource tags defined as key/value pairs.. + * Specifies the tags property: Dictionary of <string>. * - * @param tags Contains resource tags defined as key/value pairs. + * @param tags Dictionary of <string>. * @return the next definition stage. */ WithCreate withTags(Map tags); @@ -213,9 +213,10 @@ interface WithTags { */ interface WithIdentity { /** - * Specifies the identity property: The identity of the resource.. + * Specifies the identity property: Managed service identity (system assigned and/or user assigned + * identities). * - * @param identity The identity of the resource. + * @param identity Managed service identity (system assigned and/or user assigned identities). * @return the next definition stage. */ WithCreate withIdentity(ManagedServiceIdentity identity); @@ -226,9 +227,11 @@ interface WithIdentity { */ interface WithSku { /** - * Specifies the sku property: 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 The sku of the workspace. + * @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); @@ -239,12 +242,12 @@ interface WithSku { */ interface WithPrivateEndpoint { /** - * Specifies the privateEndpoint property: The resource of private end point.. + * Specifies the privateEndpoint property: The Private Endpoint resource.. * - * @param privateEndpoint The resource of private end point. + * @param privateEndpoint The Private Endpoint resource. * @return the next definition stage. */ - WithCreate withPrivateEndpoint(PrivateEndpoint privateEndpoint); + WithCreate withPrivateEndpoint(WorkspacePrivateEndpointResource privateEndpoint); } /** @@ -252,16 +255,27 @@ interface WithPrivateEndpoint { */ interface WithPrivateLinkServiceConnectionState { /** - * Specifies the privateLinkServiceConnectionState property: A collection of information about the state of - * the connection between service consumer and provider.. + * Specifies the privateLinkServiceConnectionState property: The connection state.. * - * @param privateLinkServiceConnectionState A collection of information about the state of the connection - * between service consumer and provider. + * @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); + } } /** @@ -275,7 +289,8 @@ WithCreate withPrivateLinkServiceConnectionState( * The template for PrivateEndpointConnection update. */ interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithSku, - UpdateStages.WithPrivateEndpoint, UpdateStages.WithPrivateLinkServiceConnectionState { + UpdateStages.WithPrivateEndpoint, UpdateStages.WithPrivateLinkServiceConnectionState, + UpdateStages.WithProvisioningState { /** * Executes the update request. * @@ -301,9 +316,9 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Contains resource tags defined as key/value pairs.. + * Specifies the tags property: Dictionary of <string>. * - * @param tags Contains resource tags defined as key/value pairs. + * @param tags Dictionary of <string>. * @return the next definition stage. */ Update withTags(Map tags); @@ -314,9 +329,10 @@ interface WithTags { */ interface WithIdentity { /** - * Specifies the identity property: The identity of the resource.. + * Specifies the identity property: Managed service identity (system assigned and/or user assigned + * identities). * - * @param identity The identity of the resource. + * @param identity Managed service identity (system assigned and/or user assigned identities). * @return the next definition stage. */ Update withIdentity(ManagedServiceIdentity identity); @@ -327,9 +343,11 @@ interface WithIdentity { */ interface WithSku { /** - * Specifies the sku property: 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 The sku of the workspace. + * @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); @@ -340,12 +358,12 @@ interface WithSku { */ interface WithPrivateEndpoint { /** - * Specifies the privateEndpoint property: The resource of private end point.. + * Specifies the privateEndpoint property: The Private Endpoint resource.. * - * @param privateEndpoint The resource of private end point. + * @param privateEndpoint The Private Endpoint resource. * @return the next definition stage. */ - Update withPrivateEndpoint(PrivateEndpoint privateEndpoint); + Update withPrivateEndpoint(WorkspacePrivateEndpointResource privateEndpoint); } /** @@ -353,16 +371,27 @@ interface WithPrivateEndpoint { */ interface WithPrivateLinkServiceConnectionState { /** - * Specifies the privateLinkServiceConnectionState property: A collection of information about the state of - * the connection between service consumer and provider.. + * Specifies the privateLinkServiceConnectionState property: The connection state.. * - * @param privateLinkServiceConnectionState A collection of information about the state of the connection - * between service consumer and provider. + * @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); + } } /** 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 a451262c1dd8e..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 @@ -13,10 +13,10 @@ */ 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. @@ -26,10 +26,10 @@ public interface PrivateEndpointConnections { 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. @@ -40,85 +40,85 @@ public interface PrivateEndpointConnections { 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, + 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, + 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. @@ -128,7 +128,7 @@ Response deleteWithResponse(String resourceGroupName, String workspaceName 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. 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 index f1f9fd565f37c..b937dfa80f365 100644 --- 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 @@ -9,6 +9,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.util.List; /** * Private Endpoint Outbound Rule for the managed network of a machine learning workspace. @@ -26,6 +27,11 @@ public final class PrivateEndpointOutboundRule extends OutboundRule { */ private PrivateEndpointDestination destination; + /* + * The fqdns property. + */ + private List fqdns; + /** * Creates an instance of PrivateEndpointOutboundRule class. */ @@ -64,6 +70,26 @@ public PrivateEndpointOutboundRule withDestination(PrivateEndpointDestination de return this; } + /** + * Get the fqdns property: The fqdns property. + * + * @return the fqdns value. + */ + public List fqdns() { + return this.fqdns; + } + + /** + * Set the fqdns property: The fqdns property. + * + * @param fqdns the fqdns value to set. + * @return the PrivateEndpointOutboundRule object itself. + */ + public PrivateEndpointOutboundRule withFqdns(List fqdns) { + this.fqdns = fqdns; + return this; + } + /** * {@inheritDoc} */ @@ -89,7 +115,6 @@ public PrivateEndpointOutboundRule withStatus(RuleStatus status) { */ @Override public void validate() { - super.validate(); if (destination() != null) { destination().validate(); } @@ -105,6 +130,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("status", status() == null ? null : status().toString()); jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); jsonWriter.writeJsonField("destination", this.destination); + jsonWriter.writeArrayField("fqdns", this.fqdns, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -125,12 +151,18 @@ public static PrivateEndpointOutboundRule fromJson(JsonReader jsonReader) throws if ("category".equals(fieldName)) { deserializedPrivateEndpointOutboundRule.withCategory(RuleCategory.fromString(reader.getString())); + } else if ("parentRuleNames".equals(fieldName)) { + List parentRuleNames = reader.readArray(reader1 -> reader1.getString()); + deserializedPrivateEndpointOutboundRule.withParentRuleNames(parentRuleNames); } else if ("status".equals(fieldName)) { deserializedPrivateEndpointOutboundRule.withStatus(RuleStatus.fromString(reader.getString())); } else if ("type".equals(fieldName)) { deserializedPrivateEndpointOutboundRule.type = RuleType.fromString(reader.getString()); } else if ("destination".equals(fieldName)) { deserializedPrivateEndpointOutboundRule.destination = PrivateEndpointDestination.fromJson(reader); + } else if ("fqdns".equals(fieldName)) { + List fqdns = reader.readArray(reader1 -> reader1.getString()); + deserializedPrivateEndpointOutboundRule.fqdns = fqdns; } else { reader.skipChildren(); } 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 index d6cf70a8406bf..5ad8586aa9ea0 100644 --- 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 @@ -68,7 +68,6 @@ public String id() { */ @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 3b384798802f2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointServiceConnectionStatus.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.models; - -import com.azure.core.util.ExpandableStringEnum; -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. - */ - 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 415c63c8ae507..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,314 +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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceProperties; -import java.io.IOException; +import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceInner; import java.util.List; import java.util.Map; /** - * A private link resource. + * An immutable client-side representation of PrivateLinkResource. */ -@Fluent -public final class PrivateLinkResource extends ProxyResource { - /* - * Resource properties. - */ - private PrivateLinkResourceProperties innerProperties; - - /* - * The identity of the resource. - */ - private ManagedServiceIdentity identity; - - /* - * Specifies the location of the resource. - */ - private String location; - - /* - * Contains resource tags defined as key/value pairs. - */ - private Map tags; - - /* - * The sku of the workspace. - */ - private Sku sku; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /* - * The name of the resource. - */ - private String name; - - /* - * The type of the resource. - */ - private String type; - - /** - * Creates an instance of PrivateLinkResource class. - */ - public PrivateLinkResource() { - } - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private PrivateLinkResourceProperties innerProperties() { - return this.innerProperties; - } - +public interface PrivateLinkResource { /** - * Get the identity property: The identity of the resource. + * Gets the id property: Fully qualified resource Id for the resource. * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The identity of the resource. - * - * @param identity the identity value to set. - * @return the PrivateLinkResource object itself. + * @return the id value. */ - public PrivateLinkResource withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } + String id(); /** - * Get the location property: Specifies the location of the resource. + * Gets the name property: The name of the resource. * - * @return the location value. + * @return the name value. */ - public String location() { - return this.location; - } + String name(); /** - * Set the location property: Specifies the location of the resource. + * Gets the type property: The type of the resource. * - * @param location the location value to set. - * @return the PrivateLinkResource object itself. + * @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. + * Gets the identity property: Managed service identity (system assigned and/or user assigned identities). * - * @return the tags value. + * @return the identity value. */ - public Map tags() { - return this.tags; - } + ManagedServiceIdentity identity(); /** - * Set the tags property: Contains resource tags defined as key/value pairs. + * Gets the location property: Same as workspace location. * - * @param tags the tags value to set. - * @return the PrivateLinkResource object itself. + * @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. + * Gets the tags property: Dictionary of <string>. * - * @param sku the sku value to set. - * @return the PrivateLinkResource object itself. + * @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 id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * 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; - } - - /** - * 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 (sku() != null) { - sku().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - jsonWriter.writeJsonField("identity", this.identity); - jsonWriter.writeStringField("location", this.location); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("sku", this.sku); - return jsonWriter.writeEndObject(); - } + List requiredZoneNames(); /** - * Reads an instance of PrivateLinkResource from the JsonReader. + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceInner object. * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateLinkResource if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PrivateLinkResource. + * @return the inner object. */ - public static PrivateLinkResource fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateLinkResource deserializedPrivateLinkResource = new PrivateLinkResource(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedPrivateLinkResource.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedPrivateLinkResource.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedPrivateLinkResource.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedPrivateLinkResource.innerProperties = PrivateLinkResourceProperties.fromJson(reader); - } else if ("identity".equals(fieldName)) { - deserializedPrivateLinkResource.identity = ManagedServiceIdentity.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedPrivateLinkResource.location = reader.getString(); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedPrivateLinkResource.tags = tags; - } else if ("sku".equals(fieldName)) { - deserializedPrivateLinkResource.sku = Sku.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedPrivateLinkResource.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateLinkResource; - }); - } + 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 b160ef185afd4..d728730cfea0d 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,24 +4,98 @@ package com.azure.resourcemanager.machinelearning.models; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceListResultInner; +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceInner; +import java.io.IOException; import java.util.List; /** - * An immutable client-side representation of PrivateLinkResourceListResult. + * A list of private link resources. */ -public interface PrivateLinkResourceListResult { +@Fluent +public final class PrivateLinkResourceListResult implements JsonSerializable { + /* + * The value property. + */ + 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. + * Validates the instance. * - * @return the inner object. + * @throws IllegalArgumentException thrown if the instance is not valid. */ - PrivateLinkResourceListResultInner innerModel(); + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateLinkResourceListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateLinkResourceListResult if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PrivateLinkResourceListResult. + */ + public static PrivateLinkResourceListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateLinkResourceListResult deserializedPrivateLinkResourceListResult + = new PrivateLinkResourceListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> PrivateLinkResourceInner.fromJson(reader1)); + deserializedPrivateLinkResourceListResult.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateLinkResourceListResult; + }); + } } 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 2ea81b90bfc3f..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,7 +4,7 @@ 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; /** @@ -12,28 +12,35 @@ */ 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 d1c7df0093f0d..2d40238b4740c 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 @@ -17,19 +17,19 @@ @Fluent public final class PrivateLinkServiceConnectionState implements JsonSerializable { /* - * 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. */ - private PrivateEndpointServiceConnectionStatus status; + 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. */ 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 */ - private String actionsRequired; + private EndpointServiceConnectionStatus status; /** * Creates an instance of PrivateLinkServiceConnectionState class. @@ -38,29 +38,27 @@ public PrivateLinkServiceConnectionState() { } /** - * Get the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the - * service. + * Get the actionsRequired property: Some RP chose "None". Other RPs use this for region expansion. * - * @return the status value. + * @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. + * Set the actionsRequired property: Some RP chose "None". Other RPs use this for region expansion. * - * @param status the status value to set. + * @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. */ @@ -69,7 +67,7 @@ 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. @@ -80,24 +78,22 @@ public PrivateLinkServiceConnectionState withDescription(String description) { } /** - * Get the actionsRequired property: A message indicating if changes on the service provider require any updates on - * the consumer. + * Get the status property: Connection status of the service consumer with the service provider. * - * @return the actionsRequired value. + * @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. + * Set the status property: Connection status of the service consumer with the service provider. * - * @param actionsRequired the actionsRequired value to set. + * @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; } @@ -115,9 +111,9 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); - jsonWriter.writeStringField("description", this.description); jsonWriter.writeStringField("actionsRequired", this.actionsRequired); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); return jsonWriter.writeEndObject(); } @@ -137,13 +133,13 @@ public static PrivateLinkServiceConnectionState fromJson(JsonReader jsonReader) String fieldName = reader.getFieldName(); reader.nextToken(); - if ("status".equals(fieldName)) { - deserializedPrivateLinkServiceConnectionState.status - = PrivateEndpointServiceConnectionStatus.fromString(reader.getString()); + if ("actionsRequired".equals(fieldName)) { + deserializedPrivateLinkServiceConnectionState.actionsRequired = reader.getString(); } else if ("description".equals(fieldName)) { deserializedPrivateLinkServiceConnectionState.description = reader.getString(); - } else if ("actionsRequired".equals(fieldName)) { - deserializedPrivateLinkServiceConnectionState.actionsRequired = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedPrivateLinkServiceConnectionState.status + = EndpointServiceConnectionStatus.fromString(reader.getString()); } else { reader.skipChildren(); } 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 58138c8e36c34..f61a901ac6cdf 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 @@ -24,24 +24,24 @@ public final class ProbeSettings implements JsonSerializable { private Integer failureThreshold; /* - * The number of successful probes before returning a healthy status. + * The delay before the first probe in ISO 8601 format. */ - private Integer successThreshold; + private Duration initialDelay; /* - * The probe timeout in ISO 8601 format. + * The length of time between probes in ISO 8601 format. */ - private Duration timeout; + private Duration period; /* - * The length of time between probes in ISO 8601 format. + * The number of successful probes before returning a healthy status. */ - private Duration period; + private Integer successThreshold; /* - * The delay before the first probe in ISO 8601 format. + * The probe timeout in ISO 8601 format. */ - private Duration initialDelay; + private Duration timeout; /** * Creates an instance of ProbeSettings class. @@ -70,82 +70,82 @@ public ProbeSettings withFailureThreshold(Integer failureThreshold) { } /** - * Get the successThreshold property: The number of successful probes before returning a healthy status. + * Get the initialDelay property: The delay before the first probe in ISO 8601 format. * - * @return the successThreshold value. + * @return the initialDelay value. */ - public Integer successThreshold() { - return this.successThreshold; + public Duration initialDelay() { + return this.initialDelay; } /** - * Set the successThreshold property: The number of successful probes before returning a healthy status. + * Set the initialDelay property: The delay before the first probe in ISO 8601 format. * - * @param successThreshold the successThreshold value to set. + * @param initialDelay the initialDelay value to set. * @return the ProbeSettings object itself. */ - public ProbeSettings withSuccessThreshold(Integer successThreshold) { - this.successThreshold = successThreshold; + public ProbeSettings withInitialDelay(Duration initialDelay) { + this.initialDelay = initialDelay; return this; } /** - * Get the timeout property: The probe timeout in ISO 8601 format. + * Get the period property: The length of time between probes in ISO 8601 format. * - * @return the timeout value. + * @return the period value. */ - public Duration timeout() { - return this.timeout; + public Duration period() { + return this.period; } /** - * Set the timeout property: The probe timeout in ISO 8601 format. + * Set the period property: The length of time between probes in ISO 8601 format. * - * @param timeout the timeout value to set. + * @param period the period value to set. * @return the ProbeSettings object itself. */ - public ProbeSettings withTimeout(Duration timeout) { - this.timeout = timeout; + public ProbeSettings withPeriod(Duration period) { + this.period = period; return this; } /** - * Get the period property: The length of time between probes in ISO 8601 format. + * Get the successThreshold property: The number of successful probes before returning a healthy status. * - * @return the period value. + * @return the successThreshold value. */ - public Duration period() { - return this.period; + public Integer successThreshold() { + return this.successThreshold; } /** - * Set the period property: The length of time between probes in ISO 8601 format. + * Set the successThreshold property: The number of successful probes before returning a healthy status. * - * @param period the period value to set. + * @param successThreshold the successThreshold value to set. * @return the ProbeSettings object itself. */ - public ProbeSettings withPeriod(Duration period) { - this.period = period; + public ProbeSettings withSuccessThreshold(Integer successThreshold) { + this.successThreshold = successThreshold; return this; } /** - * Get the initialDelay property: The delay before the first probe in ISO 8601 format. + * Get the timeout property: The probe timeout in ISO 8601 format. * - * @return the initialDelay value. + * @return the timeout value. */ - public Duration initialDelay() { - return this.initialDelay; + public Duration timeout() { + return this.timeout; } /** - * Set the initialDelay property: The delay before the first probe in ISO 8601 format. + * Set the timeout property: The probe timeout in ISO 8601 format. * - * @param initialDelay the initialDelay value to set. + * @param timeout the timeout value to set. * @return the ProbeSettings object itself. */ - public ProbeSettings withInitialDelay(Duration initialDelay) { - this.initialDelay = initialDelay; + public ProbeSettings withTimeout(Duration timeout) { + this.timeout = timeout; return this; } @@ -164,10 +164,10 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeNumberField("failureThreshold", this.failureThreshold); + jsonWriter.writeStringField("initialDelay", CoreUtils.durationToStringWithDays(this.initialDelay)); + jsonWriter.writeStringField("period", CoreUtils.durationToStringWithDays(this.period)); jsonWriter.writeNumberField("successThreshold", this.successThreshold); jsonWriter.writeStringField("timeout", CoreUtils.durationToStringWithDays(this.timeout)); - jsonWriter.writeStringField("period", CoreUtils.durationToStringWithDays(this.period)); - jsonWriter.writeStringField("initialDelay", CoreUtils.durationToStringWithDays(this.initialDelay)); return jsonWriter.writeEndObject(); } @@ -188,16 +188,16 @@ public static ProbeSettings fromJson(JsonReader jsonReader) throws IOException { if ("failureThreshold".equals(fieldName)) { deserializedProbeSettings.failureThreshold = reader.getNullable(JsonReader::getInt); - } else if ("successThreshold".equals(fieldName)) { - deserializedProbeSettings.successThreshold = reader.getNullable(JsonReader::getInt); - } else if ("timeout".equals(fieldName)) { - deserializedProbeSettings.timeout + } else if ("initialDelay".equals(fieldName)) { + deserializedProbeSettings.initialDelay = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); } else if ("period".equals(fieldName)) { deserializedProbeSettings.period = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); - } else if ("initialDelay".equals(fieldName)) { - deserializedProbeSettings.initialDelay + } else if ("successThreshold".equals(fieldName)) { + deserializedProbeSettings.successThreshold = reader.getNullable(JsonReader::getInt); + } else if ("timeout".equals(fieldName)) { + deserializedProbeSettings.timeout = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); } else { reader.skipChildren(); 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..5f144e2dbedb3 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PropertiesBase.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Base definition for pool resources. + */ +@Fluent +public class PropertiesBase implements JsonSerializable { + /* + * Description of the resource. + */ + private String description; + + /* + * Property dictionary. Properties can be added, but not removed or altered. + */ + private List 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 List 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(List 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().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeArrayField("properties", this.properties, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PropertiesBase from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PropertiesBase if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the PropertiesBase. + */ + public static PropertiesBase fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PropertiesBase deserializedPropertiesBase = new PropertiesBase(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("description".equals(fieldName)) { + deserializedPropertiesBase.description = reader.getString(); + } else if ("properties".equals(fieldName)) { + List properties + = reader.readArray(reader1 -> StringKeyValuePair.fromJson(reader1)); + deserializedPropertiesBase.properties = properties; + } else { + reader.skipChildren(); + } + } + + return deserializedPropertiesBase; + }); + } +} 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 8b9f3f919d3da..507d2291edbf8 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 @@ -8,8 +8,7 @@ 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 { /** diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PtuDeploymentUsage.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PtuDeploymentUsage.java new file mode 100644 index 0000000000000..c7f9b918dbf87 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PtuDeploymentUsage.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.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The PtuDeploymentUsage model. + */ +@Fluent +public final class PtuDeploymentUsage implements JsonSerializable { + /* + * Usage number from the collection level quota + */ + private Long collectionQuotaUsage; + + /* + * Deployment name + */ + private String deploymentName; + + /* + * Resource group name + */ + private String resourceGroup; + + /* + * Usage number from subscription level quota + */ + private Long usage; + + /* + * Workspace name + */ + private String workspaceName; + + /** + * Creates an instance of PtuDeploymentUsage class. + */ + public PtuDeploymentUsage() { + } + + /** + * Get the collectionQuotaUsage property: Usage number from the collection level quota. + * + * @return the collectionQuotaUsage value. + */ + public Long collectionQuotaUsage() { + return this.collectionQuotaUsage; + } + + /** + * Set the collectionQuotaUsage property: Usage number from the collection level quota. + * + * @param collectionQuotaUsage the collectionQuotaUsage value to set. + * @return the PtuDeploymentUsage object itself. + */ + public PtuDeploymentUsage withCollectionQuotaUsage(Long collectionQuotaUsage) { + this.collectionQuotaUsage = collectionQuotaUsage; + return this; + } + + /** + * Get the deploymentName property: Deployment name. + * + * @return the deploymentName value. + */ + public String deploymentName() { + return this.deploymentName; + } + + /** + * Set the deploymentName property: Deployment name. + * + * @param deploymentName the deploymentName value to set. + * @return the PtuDeploymentUsage object itself. + */ + public PtuDeploymentUsage withDeploymentName(String deploymentName) { + this.deploymentName = deploymentName; + return this; + } + + /** + * Get the resourceGroup property: Resource group name. + * + * @return the resourceGroup value. + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * Set the resourceGroup property: Resource group name. + * + * @param resourceGroup the resourceGroup value to set. + * @return the PtuDeploymentUsage object itself. + */ + public PtuDeploymentUsage withResourceGroup(String resourceGroup) { + this.resourceGroup = resourceGroup; + return this; + } + + /** + * Get the usage property: Usage number from subscription level quota. + * + * @return the usage value. + */ + public Long usage() { + return this.usage; + } + + /** + * Set the usage property: Usage number from subscription level quota. + * + * @param usage the usage value to set. + * @return the PtuDeploymentUsage object itself. + */ + public PtuDeploymentUsage withUsage(Long usage) { + this.usage = usage; + return this; + } + + /** + * Get the workspaceName property: Workspace name. + * + * @return the workspaceName value. + */ + public String workspaceName() { + return this.workspaceName; + } + + /** + * Set the workspaceName property: Workspace name. + * + * @param workspaceName the workspaceName value to set. + * @return the PtuDeploymentUsage object itself. + */ + public PtuDeploymentUsage withWorkspaceName(String workspaceName) { + this.workspaceName = workspaceName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("collectionQuotaUsage", this.collectionQuotaUsage); + jsonWriter.writeStringField("deploymentName", this.deploymentName); + jsonWriter.writeStringField("resourceGroup", this.resourceGroup); + jsonWriter.writeNumberField("usage", this.usage); + jsonWriter.writeStringField("workspaceName", this.workspaceName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PtuDeploymentUsage from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PtuDeploymentUsage if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the PtuDeploymentUsage. + */ + public static PtuDeploymentUsage fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PtuDeploymentUsage deserializedPtuDeploymentUsage = new PtuDeploymentUsage(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("collectionQuotaUsage".equals(fieldName)) { + deserializedPtuDeploymentUsage.collectionQuotaUsage = reader.getNullable(JsonReader::getLong); + } else if ("deploymentName".equals(fieldName)) { + deserializedPtuDeploymentUsage.deploymentName = reader.getString(); + } else if ("resourceGroup".equals(fieldName)) { + deserializedPtuDeploymentUsage.resourceGroup = reader.getString(); + } else if ("usage".equals(fieldName)) { + deserializedPtuDeploymentUsage.usage = reader.getNullable(JsonReader::getLong); + } else if ("workspaceName".equals(fieldName)) { + deserializedPtuDeploymentUsage.workspaceName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPtuDeploymentUsage; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PtuQuotas.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PtuQuotas.java new file mode 100644 index 0000000000000..8ae861d2a9814 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PtuQuotas.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.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of PtuQuotas. + */ +public interface PtuQuotas { + /** + * List available MaaS PTU quota. + * + * @param location The name of Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of AvailableQuota entities as paginated response with {@link PagedIterable}. + */ + PagedIterable listAvailable(String location); + + /** + * List available MaaS PTU quota. + * + * @param location The name of Azure region. + * @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 AvailableQuota entities as paginated response with {@link PagedIterable}. + */ + PagedIterable listAvailable(String location, String skip, Context context); + + /** + * Get available MaaS PTU quota. + * + * @param location The name of Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available MaaS PTU quota along with {@link Response}. + */ + Response getAvailableWithResponse(String location, Context context); + + /** + * Get available MaaS PTU quota. + * + * @param location The name of Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return available MaaS PTU quota. + */ + AvailableQuota getAvailable(String location); + + /** + * List MaaS PTU usage and quota. + * + * @param location The name of Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a paginated list of UsageAndQuotaDetails entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String location); + + /** + * List MaaS PTU usage and quota. + * + * @param location The name of Azure region. + * @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 UsageAndQuotaDetails entities as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String location, String skip, Context context); +} 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 fc4f3647534ed..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PublicNetworkAccess.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.models; - -import com.azure.core.util.ExpandableStringEnum; -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. - */ - 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/PyTorch.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PyTorch.java index 6f0ada746ac77..1b632ab3676d2 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 @@ -68,7 +68,6 @@ public PyTorch withProcessCountPerInstance(Integer processCountPerInstance) { */ @Override public void validate() { - super.validate(); } /** diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistConfig.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistConfig.java new file mode 100644 index 0000000000000..d9a13ec103a9b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistConfig.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Azure OpenAI blocklist config. + */ +@Fluent +public final class RaiBlocklistConfig implements JsonSerializable { + /* + * If blocking would occur. + */ + private Boolean blocking; + + /* + * Name of ContentFilter. + */ + private String blocklistName; + + /** + * Creates an instance of RaiBlocklistConfig class. + */ + public RaiBlocklistConfig() { + } + + /** + * Get the blocking property: If blocking would occur. + * + * @return the blocking value. + */ + public Boolean blocking() { + return this.blocking; + } + + /** + * Set the blocking property: If blocking would occur. + * + * @param blocking the blocking value to set. + * @return the RaiBlocklistConfig object itself. + */ + public RaiBlocklistConfig withBlocking(Boolean blocking) { + this.blocking = blocking; + return this; + } + + /** + * Get the blocklistName property: Name of ContentFilter. + * + * @return the blocklistName value. + */ + public String blocklistName() { + return this.blocklistName; + } + + /** + * Set the blocklistName property: Name of ContentFilter. + * + * @param blocklistName the blocklistName value to set. + * @return the RaiBlocklistConfig object itself. + */ + public RaiBlocklistConfig withBlocklistName(String blocklistName) { + this.blocklistName = blocklistName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("blocking", this.blocking); + jsonWriter.writeStringField("blocklistName", this.blocklistName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RaiBlocklistConfig from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RaiBlocklistConfig if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the RaiBlocklistConfig. + */ + public static RaiBlocklistConfig fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RaiBlocklistConfig deserializedRaiBlocklistConfig = new RaiBlocklistConfig(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("blocking".equals(fieldName)) { + deserializedRaiBlocklistConfig.blocking = reader.getNullable(JsonReader::getBoolean); + } else if ("blocklistName".equals(fieldName)) { + deserializedRaiBlocklistConfig.blocklistName = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRaiBlocklistConfig; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistItemBulkRequest.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistItemBulkRequest.java new file mode 100644 index 0000000000000..59fcbf0863b2d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistItemBulkRequest.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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The Cognitive Services RaiBlocklist Item request body. + */ +@Fluent +public final class RaiBlocklistItemBulkRequest implements JsonSerializable { + /* + * The name property. + */ + private String name; + + /* + * Properties of Cognitive Services RaiBlocklist Item. + */ + private RaiBlocklistItemProperties properties; + + /** + * Creates an instance of RaiBlocklistItemBulkRequest class. + */ + public RaiBlocklistItemBulkRequest() { + } + + /** + * 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 RaiBlocklistItemBulkRequest object itself. + */ + public RaiBlocklistItemBulkRequest withName(String name) { + this.name = name; + return this; + } + + /** + * Get the properties property: Properties of Cognitive Services RaiBlocklist Item. + * + * @return the properties value. + */ + public RaiBlocklistItemProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Properties of Cognitive Services RaiBlocklist Item. + * + * @param properties the properties value to set. + * @return the RaiBlocklistItemBulkRequest object itself. + */ + public RaiBlocklistItemBulkRequest withProperties(RaiBlocklistItemProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RaiBlocklistItemBulkRequest from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RaiBlocklistItemBulkRequest if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RaiBlocklistItemBulkRequest. + */ + public static RaiBlocklistItemBulkRequest fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RaiBlocklistItemBulkRequest deserializedRaiBlocklistItemBulkRequest = new RaiBlocklistItemBulkRequest(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedRaiBlocklistItemBulkRequest.name = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedRaiBlocklistItemBulkRequest.properties = RaiBlocklistItemProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedRaiBlocklistItemBulkRequest; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistItemProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistItemProperties.java new file mode 100644 index 0000000000000..d7b5200a017e5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistItemProperties.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * RAI Custom Blocklist Item properties. + */ +@Fluent +public final class RaiBlocklistItemProperties implements JsonSerializable { + /* + * If the pattern is a regex pattern. + */ + private Boolean isRegex; + + /* + * Pattern to match against. + */ + private String pattern; + + /** + * Creates an instance of RaiBlocklistItemProperties class. + */ + public RaiBlocklistItemProperties() { + } + + /** + * Get the isRegex property: If the pattern is a regex pattern. + * + * @return the isRegex value. + */ + public Boolean isRegex() { + return this.isRegex; + } + + /** + * Set the isRegex property: If the pattern is a regex pattern. + * + * @param isRegex the isRegex value to set. + * @return the RaiBlocklistItemProperties object itself. + */ + public RaiBlocklistItemProperties withIsRegex(Boolean isRegex) { + this.isRegex = isRegex; + return this; + } + + /** + * Get the pattern property: Pattern to match against. + * + * @return the pattern value. + */ + public String pattern() { + return this.pattern; + } + + /** + * Set the pattern property: Pattern to match against. + * + * @param pattern the pattern value to set. + * @return the RaiBlocklistItemProperties object itself. + */ + public RaiBlocklistItemProperties withPattern(String pattern) { + this.pattern = pattern; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("isRegex", this.isRegex); + jsonWriter.writeStringField("pattern", this.pattern); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RaiBlocklistItemProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RaiBlocklistItemProperties if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RaiBlocklistItemProperties. + */ + public static RaiBlocklistItemProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RaiBlocklistItemProperties deserializedRaiBlocklistItemProperties = new RaiBlocklistItemProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("isRegex".equals(fieldName)) { + deserializedRaiBlocklistItemProperties.isRegex = reader.getNullable(JsonReader::getBoolean); + } else if ("pattern".equals(fieldName)) { + deserializedRaiBlocklistItemProperties.pattern = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRaiBlocklistItemProperties; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistItemPropertiesBasicResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistItemPropertiesBasicResource.java new file mode 100644 index 0000000000000..72fa6e04575b8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistItemPropertiesBasicResource.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.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistItemPropertiesBasicResourceInner; + +/** + * An immutable client-side representation of RaiBlocklistItemPropertiesBasicResource. + */ +public interface RaiBlocklistItemPropertiesBasicResource { + /** + * 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: RAI Custom Blocklist Item properties. + * + * @return the properties value. + */ + RaiBlocklistItemProperties 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.RaiBlocklistItemPropertiesBasicResourceInner object. + * + * @return the inner object. + */ + RaiBlocklistItemPropertiesBasicResourceInner innerModel(); + + /** + * The entirety of the RaiBlocklistItemPropertiesBasicResource definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, DefinitionStages.WithCreate { + } + + /** + * The RaiBlocklistItemPropertiesBasicResource definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the RaiBlocklistItemPropertiesBasicResource definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the RaiBlocklistItemPropertiesBasicResource definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, workspaceName, connectionName, raiBlocklistName. + * + * @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 raiBlocklistName The name of the RaiBlocklist. + * @return the next definition stage. + */ + WithProperties withExistingRaiBlocklist(String resourceGroupName, String workspaceName, + String connectionName, String raiBlocklistName); + } + + /** + * The stage of the RaiBlocklistItemPropertiesBasicResource definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: RAI Custom Blocklist Item properties.. + * + * @param properties RAI Custom Blocklist Item properties. + * @return the next definition stage. + */ + WithCreate withProperties(RaiBlocklistItemProperties properties); + } + + /** + * The stage of the RaiBlocklistItemPropertiesBasicResource 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.WithProxyApiVersion { + /** + * Executes the create request. + * + * @return the created resource. + */ + RaiBlocklistItemPropertiesBasicResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + RaiBlocklistItemPropertiesBasicResource create(Context context); + } + + /** + * The stage of the RaiBlocklistItemPropertiesBasicResource definition allowing to specify proxyApiVersion. + */ + interface WithProxyApiVersion { + /** + * Specifies the proxyApiVersion property: Api version used by proxy call. + * + * @param proxyApiVersion Api version used by proxy call. + * @return the next definition stage. + */ + WithCreate withProxyApiVersion(String proxyApiVersion); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + RaiBlocklistItemPropertiesBasicResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + RaiBlocklistItemPropertiesBasicResource refresh(Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult.java new file mode 100644 index 0000000000000..ff04347ece5eb --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistItemPropertiesBasicResourceInner; +import java.io.IOException; +import java.util.List; + +/** + * The RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult model. + */ +@Fluent +public final class RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult + implements JsonSerializable { + /* + * The nextLink property. + */ + private String nextLink; + + /* + * The value property. + */ + private List value; + + /** + * Creates an instance of RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult class. + */ + public RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult() { + } + + /** + * 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 RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult object itself. + */ + public RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult 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 RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult object itself. + */ + public RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult + 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()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult if the JsonReader was pointing + * to an instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the + * RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult. + */ + public static RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult deserializedRaiBlocklistItemPropertiesBasicResourceArmPaginatedResult + = new RaiBlocklistItemPropertiesBasicResourceArmPaginatedResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nextLink".equals(fieldName)) { + deserializedRaiBlocklistItemPropertiesBasicResourceArmPaginatedResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> RaiBlocklistItemPropertiesBasicResourceInner.fromJson(reader1)); + deserializedRaiBlocklistItemPropertiesBasicResourceArmPaginatedResult.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedRaiBlocklistItemPropertiesBasicResourceArmPaginatedResult; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistProperties.java new file mode 100644 index 0000000000000..1057d6e6fd7a9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistProperties.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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * RAI Custom Blocklist properties. + */ +@Fluent +public final class RaiBlocklistProperties implements JsonSerializable { + /* + * Description of the block list. + */ + private String description; + + /** + * Creates an instance of RaiBlocklistProperties class. + */ + public RaiBlocklistProperties() { + } + + /** + * Get the description property: Description of the block list. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description of the block list. + * + * @param description the description value to set. + * @return the RaiBlocklistProperties object itself. + */ + public RaiBlocklistProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("description", this.description); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RaiBlocklistProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RaiBlocklistProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the RaiBlocklistProperties. + */ + public static RaiBlocklistProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RaiBlocklistProperties deserializedRaiBlocklistProperties = new RaiBlocklistProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("description".equals(fieldName)) { + deserializedRaiBlocklistProperties.description = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRaiBlocklistProperties; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistPropertiesBasicResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistPropertiesBasicResource.java new file mode 100644 index 0000000000000..15cee955f0edb --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistPropertiesBasicResource.java @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistPropertiesBasicResourceInner; + +/** + * An immutable client-side representation of RaiBlocklistPropertiesBasicResource. + */ +public interface RaiBlocklistPropertiesBasicResource { + /** + * 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: RAI Custom Blocklist properties. + * + * @return the properties value. + */ + RaiBlocklistProperties 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.RaiBlocklistPropertiesBasicResourceInner + * object. + * + * @return the inner object. + */ + RaiBlocklistPropertiesBasicResourceInner innerModel(); + + /** + * The entirety of the RaiBlocklistPropertiesBasicResource definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, DefinitionStages.WithCreate { + } + + /** + * The RaiBlocklistPropertiesBasicResource definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the RaiBlocklistPropertiesBasicResource definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the RaiBlocklistPropertiesBasicResource definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, workspaceName, connectionName. + * + * @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. + * @return the next definition stage. + */ + WithProperties withExistingConnection(String resourceGroupName, String workspaceName, + String connectionName); + } + + /** + * The stage of the RaiBlocklistPropertiesBasicResource definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: RAI Custom Blocklist properties.. + * + * @param properties RAI Custom Blocklist properties. + * @return the next definition stage. + */ + WithCreate withProperties(RaiBlocklistProperties properties); + } + + /** + * The stage of the RaiBlocklistPropertiesBasicResource 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.WithProxyApiVersion { + /** + * Executes the create request. + * + * @return the created resource. + */ + RaiBlocklistPropertiesBasicResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + RaiBlocklistPropertiesBasicResource create(Context context); + } + + /** + * The stage of the RaiBlocklistPropertiesBasicResource definition allowing to specify proxyApiVersion. + */ + interface WithProxyApiVersion { + /** + * Specifies the proxyApiVersion property: Api version used by proxy call. + * + * @param proxyApiVersion Api version used by proxy call. + * @return the next definition stage. + */ + WithCreate withProxyApiVersion(String proxyApiVersion); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + RaiBlocklistPropertiesBasicResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + RaiBlocklistPropertiesBasicResource refresh(Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistPropertiesBasicResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistPropertiesBasicResourceArmPaginatedResult.java new file mode 100644 index 0000000000000..7883b919d2c24 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiBlocklistPropertiesBasicResourceArmPaginatedResult.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.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiBlocklistPropertiesBasicResourceInner; +import java.io.IOException; +import java.util.List; + +/** + * The RaiBlocklistPropertiesBasicResourceArmPaginatedResult model. + */ +@Fluent +public final class RaiBlocklistPropertiesBasicResourceArmPaginatedResult + implements JsonSerializable { + /* + * The nextLink property. + */ + private String nextLink; + + /* + * The value property. + */ + private List value; + + /** + * Creates an instance of RaiBlocklistPropertiesBasicResourceArmPaginatedResult class. + */ + public RaiBlocklistPropertiesBasicResourceArmPaginatedResult() { + } + + /** + * 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 RaiBlocklistPropertiesBasicResourceArmPaginatedResult object itself. + */ + public RaiBlocklistPropertiesBasicResourceArmPaginatedResult 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 RaiBlocklistPropertiesBasicResourceArmPaginatedResult object itself. + */ + public RaiBlocklistPropertiesBasicResourceArmPaginatedResult + 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()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RaiBlocklistPropertiesBasicResourceArmPaginatedResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RaiBlocklistPropertiesBasicResourceArmPaginatedResult if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RaiBlocklistPropertiesBasicResourceArmPaginatedResult. + */ + public static RaiBlocklistPropertiesBasicResourceArmPaginatedResult fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + RaiBlocklistPropertiesBasicResourceArmPaginatedResult deserializedRaiBlocklistPropertiesBasicResourceArmPaginatedResult + = new RaiBlocklistPropertiesBasicResourceArmPaginatedResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nextLink".equals(fieldName)) { + deserializedRaiBlocklistPropertiesBasicResourceArmPaginatedResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> RaiBlocklistPropertiesBasicResourceInner.fromJson(reader1)); + deserializedRaiBlocklistPropertiesBasicResourceArmPaginatedResult.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedRaiBlocklistPropertiesBasicResourceArmPaginatedResult; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicies.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicies.java new file mode 100644 index 0000000000000..6145e2108b603 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicies.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** + * Resource collection API of RaiPolicies. + */ +public interface RaiPolicies { + /** + * List the specified Content Filters associated with the Azure OpenAI account. + * + * @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 azure OpenAI Content Filters resource list as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, + String endpointName); + + /** + * List the specified Content Filters associated with the Azure OpenAI account. + * + * @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 proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource list as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String workspaceName, + String endpointName, String proxyApiVersion, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyContentFilter.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyContentFilter.java new file mode 100644 index 0000000000000..90214d3f57037 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyContentFilter.java @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Azure OpenAI Content Filter. + */ +@Fluent +public final class RaiPolicyContentFilter implements JsonSerializable { + /* + * Level at which content is filtered. + */ + private AllowedContentLevel allowedContentLevel; + + /* + * If blocking would occur. + */ + private Boolean blocking; + + /* + * If the ContentFilter is enabled. + */ + private Boolean enabled; + + /* + * Name of ContentFilter. + */ + private String name; + + /* + * Content source to apply the Content Filters. + */ + private RaiPolicyContentSource source; + + /** + * Creates an instance of RaiPolicyContentFilter class. + */ + public RaiPolicyContentFilter() { + } + + /** + * Get the allowedContentLevel property: Level at which content is filtered. + * + * @return the allowedContentLevel value. + */ + public AllowedContentLevel allowedContentLevel() { + return this.allowedContentLevel; + } + + /** + * Set the allowedContentLevel property: Level at which content is filtered. + * + * @param allowedContentLevel the allowedContentLevel value to set. + * @return the RaiPolicyContentFilter object itself. + */ + public RaiPolicyContentFilter withAllowedContentLevel(AllowedContentLevel allowedContentLevel) { + this.allowedContentLevel = allowedContentLevel; + return this; + } + + /** + * Get the blocking property: If blocking would occur. + * + * @return the blocking value. + */ + public Boolean blocking() { + return this.blocking; + } + + /** + * Set the blocking property: If blocking would occur. + * + * @param blocking the blocking value to set. + * @return the RaiPolicyContentFilter object itself. + */ + public RaiPolicyContentFilter withBlocking(Boolean blocking) { + this.blocking = blocking; + return this; + } + + /** + * Get the enabled property: If the ContentFilter is enabled. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: If the ContentFilter is enabled. + * + * @param enabled the enabled value to set. + * @return the RaiPolicyContentFilter object itself. + */ + public RaiPolicyContentFilter withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the name property: Name of ContentFilter. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of ContentFilter. + * + * @param name the name value to set. + * @return the RaiPolicyContentFilter object itself. + */ + public RaiPolicyContentFilter withName(String name) { + this.name = name; + return this; + } + + /** + * Get the source property: Content source to apply the Content Filters. + * + * @return the source value. + */ + public RaiPolicyContentSource source() { + return this.source; + } + + /** + * Set the source property: Content source to apply the Content Filters. + * + * @param source the source value to set. + * @return the RaiPolicyContentFilter object itself. + */ + public RaiPolicyContentFilter withSource(RaiPolicyContentSource source) { + this.source = source; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("allowedContentLevel", + this.allowedContentLevel == null ? null : this.allowedContentLevel.toString()); + jsonWriter.writeBooleanField("blocking", this.blocking); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("source", this.source == null ? null : this.source.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RaiPolicyContentFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RaiPolicyContentFilter if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the RaiPolicyContentFilter. + */ + public static RaiPolicyContentFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RaiPolicyContentFilter deserializedRaiPolicyContentFilter = new RaiPolicyContentFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("allowedContentLevel".equals(fieldName)) { + deserializedRaiPolicyContentFilter.allowedContentLevel + = AllowedContentLevel.fromString(reader.getString()); + } else if ("blocking".equals(fieldName)) { + deserializedRaiPolicyContentFilter.blocking = reader.getNullable(JsonReader::getBoolean); + } else if ("enabled".equals(fieldName)) { + deserializedRaiPolicyContentFilter.enabled = reader.getNullable(JsonReader::getBoolean); + } else if ("name".equals(fieldName)) { + deserializedRaiPolicyContentFilter.name = reader.getString(); + } else if ("source".equals(fieldName)) { + deserializedRaiPolicyContentFilter.source = RaiPolicyContentSource.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedRaiPolicyContentFilter; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyContentSource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyContentSource.java new file mode 100644 index 0000000000000..6d0dbf141b57d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyContentSource.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Content source to apply the Content Filters. + */ +public final class RaiPolicyContentSource extends ExpandableStringEnum { + /** + * Static value Prompt for RaiPolicyContentSource. + */ + public static final RaiPolicyContentSource PROMPT = fromString("Prompt"); + + /** + * Static value Completion for RaiPolicyContentSource. + */ + public static final RaiPolicyContentSource COMPLETION = fromString("Completion"); + + /** + * Creates a new instance of RaiPolicyContentSource value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RaiPolicyContentSource() { + } + + /** + * Creates or finds a RaiPolicyContentSource from its string representation. + * + * @param name a name to look for. + * @return the corresponding RaiPolicyContentSource. + */ + public static RaiPolicyContentSource fromString(String name) { + return fromString(name, RaiPolicyContentSource.class); + } + + /** + * Gets known RaiPolicyContentSource values. + * + * @return known RaiPolicyContentSource values. + */ + public static Collection values() { + return values(RaiPolicyContentSource.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyMode.java new file mode 100644 index 0000000000000..c9728265dfa50 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyMode.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Content Filters mode. + */ +public final class RaiPolicyMode extends ExpandableStringEnum { + /** + * Static value Default for RaiPolicyMode. + */ + public static final RaiPolicyMode DEFAULT = fromString("Default"); + + /** + * Static value Deferred for RaiPolicyMode. + */ + public static final RaiPolicyMode DEFERRED = fromString("Deferred"); + + /** + * Static value Blocking for RaiPolicyMode. + */ + public static final RaiPolicyMode BLOCKING = fromString("Blocking"); + + /** + * Creates a new instance of RaiPolicyMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RaiPolicyMode() { + } + + /** + * Creates or finds a RaiPolicyMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding RaiPolicyMode. + */ + public static RaiPolicyMode fromString(String name) { + return fromString(name, RaiPolicyMode.class); + } + + /** + * Gets known RaiPolicyMode values. + * + * @return known RaiPolicyMode values. + */ + public static Collection values() { + return values(RaiPolicyMode.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyOperations.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyOperations.java new file mode 100644 index 0000000000000..23a400f16da08 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyOperations.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiPolicyPropertiesBasicResourceInner; + +/** + * Resource collection API of RaiPolicyOperations. + */ +public interface RaiPolicyOperations { + /** + * Deletes the specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 raiPolicyName); + + /** + * Deletes the specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 raiPolicyName, + String proxyApiVersion, Context context); + + /** + * Gets the specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 Content Filters associated with the Azure OpenAI account along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String workspaceName, + String endpointName, String raiPolicyName, Context context); + + /** + * Gets the specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 Content Filters associated with the Azure OpenAI account. + */ + RaiPolicyPropertiesBasicResource get(String resourceGroupName, String workspaceName, String endpointName, + String raiPolicyName); + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @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 azure OpenAI Content Filters resource. + */ + RaiPolicyPropertiesBasicResource create(String resourceGroupName, String workspaceName, String endpointName, + String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body); + + /** + * Update the state of specified Content Filters associated with the Azure OpenAI account. + * + * @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 raiPolicyName Name of the Rai Policy. + * @param body The body parameter. + * @param proxyApiVersion Api version used by proxy call. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azure OpenAI Content Filters resource. + */ + RaiPolicyPropertiesBasicResource create(String resourceGroupName, String workspaceName, String endpointName, + String raiPolicyName, RaiPolicyPropertiesBasicResourceInner body, String proxyApiVersion, Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyProperties.java new file mode 100644 index 0000000000000..51c730d0a34a5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyProperties.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.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Azure OpenAI Content Filters properties. + */ +@Fluent +public final class RaiPolicyProperties implements JsonSerializable { + /* + * Name of the base Content Filters. + */ + private String basePolicyName; + + /* + * The completionBlocklists property. + */ + private List completionBlocklists; + + /* + * The contentFilters property. + */ + private List contentFilters; + + /* + * Content Filters mode. + */ + private RaiPolicyMode mode; + + /* + * The promptBlocklists property. + */ + private List promptBlocklists; + + /* + * Content Filters policy type. + */ + private RaiPolicyType type; + + /** + * Creates an instance of RaiPolicyProperties class. + */ + public RaiPolicyProperties() { + } + + /** + * Get the basePolicyName property: Name of the base Content Filters. + * + * @return the basePolicyName value. + */ + public String basePolicyName() { + return this.basePolicyName; + } + + /** + * Set the basePolicyName property: Name of the base Content Filters. + * + * @param basePolicyName the basePolicyName value to set. + * @return the RaiPolicyProperties object itself. + */ + public RaiPolicyProperties withBasePolicyName(String basePolicyName) { + this.basePolicyName = basePolicyName; + return this; + } + + /** + * Get the completionBlocklists property: The completionBlocklists property. + * + * @return the completionBlocklists value. + */ + public List completionBlocklists() { + return this.completionBlocklists; + } + + /** + * Set the completionBlocklists property: The completionBlocklists property. + * + * @param completionBlocklists the completionBlocklists value to set. + * @return the RaiPolicyProperties object itself. + */ + public RaiPolicyProperties withCompletionBlocklists(List completionBlocklists) { + this.completionBlocklists = completionBlocklists; + return this; + } + + /** + * Get the contentFilters property: The contentFilters property. + * + * @return the contentFilters value. + */ + public List contentFilters() { + return this.contentFilters; + } + + /** + * Set the contentFilters property: The contentFilters property. + * + * @param contentFilters the contentFilters value to set. + * @return the RaiPolicyProperties object itself. + */ + public RaiPolicyProperties withContentFilters(List contentFilters) { + this.contentFilters = contentFilters; + return this; + } + + /** + * Get the mode property: Content Filters mode. + * + * @return the mode value. + */ + public RaiPolicyMode mode() { + return this.mode; + } + + /** + * Set the mode property: Content Filters mode. + * + * @param mode the mode value to set. + * @return the RaiPolicyProperties object itself. + */ + public RaiPolicyProperties withMode(RaiPolicyMode mode) { + this.mode = mode; + return this; + } + + /** + * Get the promptBlocklists property: The promptBlocklists property. + * + * @return the promptBlocklists value. + */ + public List promptBlocklists() { + return this.promptBlocklists; + } + + /** + * Set the promptBlocklists property: The promptBlocklists property. + * + * @param promptBlocklists the promptBlocklists value to set. + * @return the RaiPolicyProperties object itself. + */ + public RaiPolicyProperties withPromptBlocklists(List promptBlocklists) { + this.promptBlocklists = promptBlocklists; + return this; + } + + /** + * Get the type property: Content Filters policy type. + * + * @return the type value. + */ + public RaiPolicyType type() { + return this.type; + } + + /** + * Set the type property: Content Filters policy type. + * + * @param type the type value to set. + * @return the RaiPolicyProperties object itself. + */ + public RaiPolicyProperties withType(RaiPolicyType type) { + this.type = type; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (completionBlocklists() != null) { + completionBlocklists().forEach(e -> e.validate()); + } + if (contentFilters() != null) { + contentFilters().forEach(e -> e.validate()); + } + if (promptBlocklists() != null) { + promptBlocklists().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("basePolicyName", this.basePolicyName); + jsonWriter.writeArrayField("completionBlocklists", this.completionBlocklists, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("contentFilters", this.contentFilters, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + jsonWriter.writeArrayField("promptBlocklists", this.promptBlocklists, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RaiPolicyProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RaiPolicyProperties if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the RaiPolicyProperties. + */ + public static RaiPolicyProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RaiPolicyProperties deserializedRaiPolicyProperties = new RaiPolicyProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("basePolicyName".equals(fieldName)) { + deserializedRaiPolicyProperties.basePolicyName = reader.getString(); + } else if ("completionBlocklists".equals(fieldName)) { + List completionBlocklists + = reader.readArray(reader1 -> RaiBlocklistConfig.fromJson(reader1)); + deserializedRaiPolicyProperties.completionBlocklists = completionBlocklists; + } else if ("contentFilters".equals(fieldName)) { + List contentFilters + = reader.readArray(reader1 -> RaiPolicyContentFilter.fromJson(reader1)); + deserializedRaiPolicyProperties.contentFilters = contentFilters; + } else if ("mode".equals(fieldName)) { + deserializedRaiPolicyProperties.mode = RaiPolicyMode.fromString(reader.getString()); + } else if ("promptBlocklists".equals(fieldName)) { + List promptBlocklists + = reader.readArray(reader1 -> RaiBlocklistConfig.fromJson(reader1)); + deserializedRaiPolicyProperties.promptBlocklists = promptBlocklists; + } else if ("type".equals(fieldName)) { + deserializedRaiPolicyProperties.type = RaiPolicyType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedRaiPolicyProperties; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyPropertiesBasicResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyPropertiesBasicResource.java new file mode 100644 index 0000000000000..709ed50a34131 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyPropertiesBasicResource.java @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiPolicyPropertiesBasicResourceInner; + +/** + * An immutable client-side representation of RaiPolicyPropertiesBasicResource. + */ +public interface RaiPolicyPropertiesBasicResource { + /** + * 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: Azure OpenAI Content Filters properties. + * + * @return the properties value. + */ + RaiPolicyProperties 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.RaiPolicyPropertiesBasicResourceInner + * object. + * + * @return the inner object. + */ + RaiPolicyPropertiesBasicResourceInner innerModel(); + + /** + * The entirety of the RaiPolicyPropertiesBasicResource definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, + DefinitionStages.WithProperties, DefinitionStages.WithCreate { + } + + /** + * The RaiPolicyPropertiesBasicResource definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the RaiPolicyPropertiesBasicResource definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the RaiPolicyPropertiesBasicResource definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, workspaceName, connectionName. + * + * @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. + * @return the next definition stage. + */ + WithProperties withExistingConnection(String resourceGroupName, String workspaceName, + String connectionName); + } + + /** + * The stage of the RaiPolicyPropertiesBasicResource definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: Azure OpenAI Content Filters properties.. + * + * @param properties Azure OpenAI Content Filters properties. + * @return the next definition stage. + */ + WithCreate withProperties(RaiPolicyProperties properties); + } + + /** + * The stage of the RaiPolicyPropertiesBasicResource 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.WithProxyApiVersion { + /** + * Executes the create request. + * + * @return the created resource. + */ + RaiPolicyPropertiesBasicResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + RaiPolicyPropertiesBasicResource create(Context context); + } + + /** + * The stage of the RaiPolicyPropertiesBasicResource definition allowing to specify proxyApiVersion. + */ + interface WithProxyApiVersion { + /** + * Specifies the proxyApiVersion property: Api version used by proxy call. + * + * @param proxyApiVersion Api version used by proxy call. + * @return the next definition stage. + */ + WithCreate withProxyApiVersion(String proxyApiVersion); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + RaiPolicyPropertiesBasicResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + RaiPolicyPropertiesBasicResource refresh(Context context); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyPropertiesBasicResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyPropertiesBasicResourceArmPaginatedResult.java new file mode 100644 index 0000000000000..97558ac49c7e8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyPropertiesBasicResourceArmPaginatedResult.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.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.fluent.models.RaiPolicyPropertiesBasicResourceInner; +import java.io.IOException; +import java.util.List; + +/** + * Azure OpenAI Content Filters resource list. + */ +@Fluent +public final class RaiPolicyPropertiesBasicResourceArmPaginatedResult + implements JsonSerializable { + /* + * The nextLink property. + */ + private String nextLink; + + /* + * The value property. + */ + private List value; + + /** + * Creates an instance of RaiPolicyPropertiesBasicResourceArmPaginatedResult class. + */ + public RaiPolicyPropertiesBasicResourceArmPaginatedResult() { + } + + /** + * 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 RaiPolicyPropertiesBasicResourceArmPaginatedResult object itself. + */ + public RaiPolicyPropertiesBasicResourceArmPaginatedResult 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 RaiPolicyPropertiesBasicResourceArmPaginatedResult object itself. + */ + public RaiPolicyPropertiesBasicResourceArmPaginatedResult + 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()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RaiPolicyPropertiesBasicResourceArmPaginatedResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RaiPolicyPropertiesBasicResourceArmPaginatedResult if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RaiPolicyPropertiesBasicResourceArmPaginatedResult. + */ + public static RaiPolicyPropertiesBasicResourceArmPaginatedResult fromJson(JsonReader jsonReader) + throws IOException { + return jsonReader.readObject(reader -> { + RaiPolicyPropertiesBasicResourceArmPaginatedResult deserializedRaiPolicyPropertiesBasicResourceArmPaginatedResult + = new RaiPolicyPropertiesBasicResourceArmPaginatedResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nextLink".equals(fieldName)) { + deserializedRaiPolicyPropertiesBasicResourceArmPaginatedResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> RaiPolicyPropertiesBasicResourceInner.fromJson(reader1)); + deserializedRaiPolicyPropertiesBasicResourceArmPaginatedResult.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedRaiPolicyPropertiesBasicResourceArmPaginatedResult; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyType.java new file mode 100644 index 0000000000000..32ee91b0d0465 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RaiPolicyType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Content Filters policy type. + */ +public final class RaiPolicyType extends ExpandableStringEnum { + /** + * Static value UserManaged for RaiPolicyType. + */ + public static final RaiPolicyType USER_MANAGED = fromString("UserManaged"); + + /** + * Static value SystemManaged for RaiPolicyType. + */ + public static final RaiPolicyType SYSTEM_MANAGED = fromString("SystemManaged"); + + /** + * Creates a new instance of RaiPolicyType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RaiPolicyType() { + } + + /** + * Creates or finds a RaiPolicyType from its string representation. + * + * @param name a name to look for. + * @return the corresponding RaiPolicyType. + */ + public static RaiPolicyType fromString(String name) { + return fromString(name, RaiPolicyType.class); + } + + /** + * Gets known RaiPolicyType values. + * + * @return known RaiPolicyType values. + */ + public static Collection values() { + return values(RaiPolicyType.class); + } +} 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 cad825a4e3994..f632afcf58e1a 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 @@ -21,14 +21,14 @@ public final class RandomSamplingAlgorithm extends SamplingAlgorithm { private SamplingAlgorithmType samplingAlgorithmType = SamplingAlgorithmType.RANDOM; /* - * An optional integer to use as the seed for random number generation + * The specific type of random algorithm */ - private Integer seed; + private RandomSamplingAlgorithmRule rule; /* - * The specific type of random algorithm + * An optional integer to use as the seed for random number generation */ - private RandomSamplingAlgorithmRule rule; + private Integer seed; /** * Creates an instance of RandomSamplingAlgorithm class. @@ -48,42 +48,42 @@ public SamplingAlgorithmType samplingAlgorithmType() { } /** - * Get the seed property: An optional integer to use as the seed for random number generation. + * Get the rule property: The specific type of random algorithm. * - * @return the seed value. + * @return the rule value. */ - public Integer seed() { - return this.seed; + public RandomSamplingAlgorithmRule rule() { + return this.rule; } /** - * Set the seed property: An optional integer to use as the seed for random number generation. + * Set the rule property: The specific type of random algorithm. * - * @param seed the seed value to set. + * @param rule the rule value to set. * @return the RandomSamplingAlgorithm object itself. */ - public RandomSamplingAlgorithm withSeed(Integer seed) { - this.seed = seed; + public RandomSamplingAlgorithm withRule(RandomSamplingAlgorithmRule rule) { + this.rule = rule; return this; } /** - * Get the rule property: The specific type of random algorithm. + * Get the seed property: An optional integer to use as the seed for random number generation. * - * @return the rule value. + * @return the seed value. */ - public RandomSamplingAlgorithmRule rule() { - return this.rule; + public Integer seed() { + return this.seed; } /** - * Set the rule property: The specific type of random algorithm. + * Set the seed property: An optional integer to use as the seed for random number generation. * - * @param rule the rule value to set. + * @param seed the seed value to set. * @return the RandomSamplingAlgorithm object itself. */ - public RandomSamplingAlgorithm withRule(RandomSamplingAlgorithmRule rule) { - this.rule = rule; + public RandomSamplingAlgorithm withSeed(Integer seed) { + this.seed = seed; return this; } @@ -94,7 +94,6 @@ public RandomSamplingAlgorithm withRule(RandomSamplingAlgorithmRule rule) { */ @Override public void validate() { - super.validate(); } /** @@ -105,8 +104,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("samplingAlgorithmType", this.samplingAlgorithmType == null ? null : this.samplingAlgorithmType.toString()); - jsonWriter.writeNumberField("seed", this.seed); jsonWriter.writeStringField("rule", this.rule == null ? null : this.rule.toString()); + jsonWriter.writeNumberField("seed", this.seed); return jsonWriter.writeEndObject(); } @@ -128,11 +127,11 @@ public static RandomSamplingAlgorithm fromJson(JsonReader jsonReader) throws IOE if ("samplingAlgorithmType".equals(fieldName)) { deserializedRandomSamplingAlgorithm.samplingAlgorithmType = SamplingAlgorithmType.fromString(reader.getString()); - } else if ("seed".equals(fieldName)) { - deserializedRandomSamplingAlgorithm.seed = reader.getNullable(JsonReader::getInt); } else if ("rule".equals(fieldName)) { deserializedRandomSamplingAlgorithm.rule = RandomSamplingAlgorithmRule.fromString(reader.getString()); + } else if ("seed".equals(fieldName)) { + deserializedRandomSamplingAlgorithm.seed = reader.getNullable(JsonReader::getInt); } else { reader.skipChildren(); } 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 4572b77f814a8..98a944c9bb774 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 @@ -29,14 +29,14 @@ public final class RecurrenceSchedule implements JsonSerializable minutes; /* - * List of days for the schedule. + * List of month days for the schedule */ - private List weekDays; + private List monthDays; /* - * List of month days for the schedule + * List of days for the schedule. */ - private List monthDays; + private List weekDays; /** * Creates an instance of RecurrenceSchedule class. @@ -85,42 +85,42 @@ public RecurrenceSchedule withMinutes(List minutes) { } /** - * Get the weekDays property: List of days for the schedule. + * Get the monthDays property: List of month days for the schedule. * - * @return the weekDays value. + * @return the monthDays value. */ - public List weekDays() { - return this.weekDays; + public List monthDays() { + return this.monthDays; } /** - * Set the weekDays property: List of days for the schedule. + * Set the monthDays property: List of month days for the schedule. * - * @param weekDays the weekDays value to set. + * @param monthDays the monthDays value to set. * @return the RecurrenceSchedule object itself. */ - public RecurrenceSchedule withWeekDays(List weekDays) { - this.weekDays = weekDays; + public RecurrenceSchedule withMonthDays(List monthDays) { + this.monthDays = monthDays; return this; } /** - * Get the monthDays property: List of month days for the schedule. + * Get the weekDays property: List of days for the schedule. * - * @return the monthDays value. + * @return the weekDays value. */ - public List monthDays() { - return this.monthDays; + public List weekDays() { + return this.weekDays; } /** - * Set the monthDays property: List of month days for the schedule. + * Set the weekDays property: List of days for the schedule. * - * @param monthDays the monthDays value to set. + * @param weekDays the weekDays value to set. * @return the RecurrenceSchedule object itself. */ - public RecurrenceSchedule withMonthDays(List monthDays) { - this.monthDays = monthDays; + public RecurrenceSchedule withWeekDays(List weekDays) { + this.weekDays = weekDays; return this; } @@ -150,9 +150,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("hours", this.hours, (writer, element) -> writer.writeInt(element)); jsonWriter.writeArrayField("minutes", this.minutes, (writer, element) -> writer.writeInt(element)); + jsonWriter.writeArrayField("monthDays", this.monthDays, (writer, element) -> writer.writeInt(element)); jsonWriter.writeArrayField("weekDays", this.weekDays, (writer, element) -> writer.writeString(element == null ? null : element.toString())); - jsonWriter.writeArrayField("monthDays", this.monthDays, (writer, element) -> writer.writeInt(element)); return jsonWriter.writeEndObject(); } @@ -178,12 +178,12 @@ public static RecurrenceSchedule fromJson(JsonReader jsonReader) throws IOExcept } else if ("minutes".equals(fieldName)) { List minutes = reader.readArray(reader1 -> reader1.getInt()); deserializedRecurrenceSchedule.minutes = minutes; - } else if ("weekDays".equals(fieldName)) { - List weekDays = reader.readArray(reader1 -> WeekDay.fromString(reader1.getString())); - deserializedRecurrenceSchedule.weekDays = weekDays; } else if ("monthDays".equals(fieldName)) { List monthDays = reader.readArray(reader1 -> reader1.getInt()); deserializedRecurrenceSchedule.monthDays = monthDays; + } else if ("weekDays".equals(fieldName)) { + List weekDays = reader.readArray(reader1 -> WeekDay.fromString(reader1.getString())); + deserializedRecurrenceSchedule.weekDays = weekDays; } else { reader.skipChildren(); } 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 e1c1b4c80f865..1337fe793e984 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 @@ -146,7 +146,6 @@ public RecurrenceTrigger withTimeZone(String timeZone) { */ @Override public void validate() { - super.validate(); if (frequency() == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property frequency in model RecurrenceTrigger")); 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..58767383fff49 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegenerateServiceAccountKeyContent.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.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The RegenerateServiceAccountKeyContent model. + */ +@Fluent +public final class RegenerateServiceAccountKeyContent implements JsonSerializable { + /* + * The keyName property. + */ + 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() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("keyName", this.keyName == null ? null : this.keyName.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RegenerateServiceAccountKeyContent from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RegenerateServiceAccountKeyContent if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the RegenerateServiceAccountKeyContent. + */ + public static RegenerateServiceAccountKeyContent fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RegenerateServiceAccountKeyContent deserializedRegenerateServiceAccountKeyContent + = new RegenerateServiceAccountKeyContent(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keyName".equals(fieldName)) { + deserializedRegenerateServiceAccountKeyContent.keyName + = ServiceAccountKeyName.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedRegenerateServiceAccountKeyContent; + }); + } +} 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 index 4434116a58a0b..33026841035df 100644 --- 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 @@ -101,6 +101,13 @@ public interface Registry { */ 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. * @@ -217,8 +224,9 @@ interface WithResourceGroup { interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, DefinitionStages.WithKind, DefinitionStages.WithSku, DefinitionStages.WithDiscoveryUrl, DefinitionStages.WithIntellectualPropertyPublisher, DefinitionStages.WithManagedResourceGroup, - DefinitionStages.WithMlFlowRegistryUri, DefinitionStages.WithRegistryPrivateEndpointConnections, - DefinitionStages.WithPublicNetworkAccess, DefinitionStages.WithRegionDetails { + DefinitionStages.WithManagedResourceGroupSettings, DefinitionStages.WithMlFlowRegistryUri, + DefinitionStages.WithRegistryPrivateEndpointConnections, DefinitionStages.WithPublicNetworkAccess, + DefinitionStages.WithRegionDetails { /** * Executes the create request. * @@ -330,6 +338,19 @@ interface WithManagedResourceGroup { 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. */ 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 838c746104ce5..0571338057344 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 @@ -18,19 +18,19 @@ @Fluent public final class RegistryListCredentialsResult implements JsonSerializable { /* - * The location property. + * The location of the workspace ACR */ private String location; /* - * The username property. + * The passwords property. */ - private String username; + private List passwords; /* - * The passwords property. + * The username of the workspace ACR */ - private List passwords; + private String username; /** * Creates an instance of RegistryListCredentialsResult class. @@ -39,7 +39,7 @@ public RegistryListCredentialsResult() { } /** - * Get the location property: The location property. + * Get the location property: The location of the workspace ACR. * * @return the location value. */ @@ -47,15 +47,6 @@ 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. * @@ -76,6 +67,15 @@ 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. * @@ -115,11 +115,11 @@ public static RegistryListCredentialsResult fromJson(JsonReader jsonReader) thro if ("location".equals(fieldName)) { deserializedRegistryListCredentialsResult.location = reader.getString(); - } else if ("username".equals(fieldName)) { - deserializedRegistryListCredentialsResult.username = reader.getString(); } else if ("passwords".equals(fieldName)) { List passwords = reader.readArray(reader1 -> Password.fromJson(reader1)); deserializedRegistryListCredentialsResult.passwords = passwords; + } else if ("username".equals(fieldName)) { + deserializedRegistryListCredentialsResult.username = reader.getString(); } else { reader.skipChildren(); } 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 index 758eeba7764ac..046e982386eed 100644 --- 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 @@ -5,6 +5,7 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -17,18 +18,18 @@ */ @Fluent public final class RegistryPartialManagedServiceIdentity extends ManagedServiceIdentity { - /* - * The service principal ID of the system assigned identity. This property will only be provided for a system - * assigned identity. - */ - private UUID principalId; - /* * The tenant ID of the system assigned identity. This property will only be provided for a system assigned * identity. */ private UUID tenantId; + /* + * The service principal ID of the system assigned identity. This property will only be provided for a system + * assigned identity. + */ + private UUID principalId; + /** * Creates an instance of RegistryPartialManagedServiceIdentity class. */ @@ -36,25 +37,25 @@ public RegistryPartialManagedServiceIdentity() { } /** - * Get the principalId property: The service principal 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 principalId value. + * @return the tenantId value. */ @Override - public UUID principalId() { - return this.principalId; + public UUID tenantId() { + return this.tenantId; } /** - * 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 principalId property: The service principal ID of the system assigned identity. This property will only + * be provided for a system assigned identity. * - * @return the tenantId value. + * @return the principalId value. */ @Override - public UUID tenantId() { - return this.tenantId; + public UUID principalId() { + return this.principalId; } /** @@ -83,9 +84,22 @@ public RegistryPartialManagedServiceIdentity withType(ManagedServiceIdentityType */ @Override public void validate() { - super.validate(); + if (type() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property type in model RegistryPartialManagedServiceIdentity")); + } + if (userAssignedIdentities() != null) { + userAssignedIdentities().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); + } } + private static final ClientLogger LOGGER = new ClientLogger(RegistryPartialManagedServiceIdentity.class); + /** * {@inheritDoc} */ 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 9ed55c8ac80fd..5265309fbb15c 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 @@ -5,6 +5,7 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -31,6 +32,16 @@ public final class Regression extends AutoMLVertical { */ private RegressionTrainingSettings trainingSettings; + /* + * Columns to use for CVSplit data. + */ + private List cvSplitColumnNames; + + /* + * Featurization inputs needed for AutoML job. + */ + private TableVerticalFeaturizationSettings featurizationSettings; + /* * Execution constraints for AutoMLJob. */ @@ -43,26 +54,22 @@ public final class Regression extends AutoMLVertical { private NCrossValidations nCrossValidations; /* - * Columns to use for CVSplit data. + * Test data input. */ - private List cvSplitColumnNames; + private MLTableJobInput testData; /* - * 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. + * 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. */ - private String weightColumnName; + private Double testDataSize; /* * Validation data inputs. */ private MLTableJobInput validationData; - /* - * Test data input. - */ - private MLTableJobInput testData; - /* * The fraction of training dataset that needs to be set aside for validation purpose. * Values between (0.0 , 1.0) @@ -71,16 +78,10 @@ public final class Regression extends AutoMLVertical { private Double validationDataSize; /* - * 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. - */ - private Double testDataSize; - - /* - * Featurization inputs needed for AutoML job. + * 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. */ - private TableVerticalFeaturizationSettings featurizationSettings; + private String weightColumnName; /** * Creates an instance of Regression class. @@ -138,6 +139,46 @@ public Regression withTrainingSettings(RegressionTrainingSettings trainingSettin return this; } + /** + * Get the cvSplitColumnNames property: Columns to use for CVSplit data. + * + * @return the cvSplitColumnNames value. + */ + public List cvSplitColumnNames() { + return this.cvSplitColumnNames; + } + + /** + * Set the cvSplitColumnNames property: Columns to use for CVSplit data. + * + * @param cvSplitColumnNames the cvSplitColumnNames value to set. + * @return the Regression object itself. + */ + public Regression withCvSplitColumnNames(List cvSplitColumnNames) { + this.cvSplitColumnNames = cvSplitColumnNames; + return this; + } + + /** + * Get the featurizationSettings property: Featurization inputs needed for AutoML job. + * + * @return the featurizationSettings value. + */ + public TableVerticalFeaturizationSettings featurizationSettings() { + return this.featurizationSettings; + } + + /** + * Set the featurizationSettings property: Featurization inputs needed for AutoML job. + * + * @param featurizationSettings the featurizationSettings value to set. + * @return the Regression object itself. + */ + public Regression withFeaturizationSettings(TableVerticalFeaturizationSettings featurizationSettings) { + this.featurizationSettings = featurizationSettings; + return this; + } + /** * Get the limitSettings property: Execution constraints for AutoMLJob. * @@ -181,44 +222,46 @@ public Regression withNCrossValidations(NCrossValidations nCrossValidations) { } /** - * Get the cvSplitColumnNames property: Columns to use for CVSplit data. + * Get the testData property: Test data input. * - * @return the cvSplitColumnNames value. + * @return the testData value. */ - public List cvSplitColumnNames() { - return this.cvSplitColumnNames; + public MLTableJobInput testData() { + return this.testData; } /** - * Set the cvSplitColumnNames property: Columns to use for CVSplit data. + * Set the testData property: Test data input. * - * @param cvSplitColumnNames the cvSplitColumnNames value to set. + * @param testData the testData value to set. * @return the Regression object itself. */ - public Regression withCvSplitColumnNames(List cvSplitColumnNames) { - this.cvSplitColumnNames = cvSplitColumnNames; + public Regression withTestData(MLTableJobInput testData) { + this.testData = testData; return this; } /** - * 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. + * 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. * - * @return the weightColumnName value. + * @return the testDataSize value. */ - public String weightColumnName() { - return this.weightColumnName; + public Double testDataSize() { + return this.testDataSize; } /** - * 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. + * 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. * - * @param weightColumnName the weightColumnName value to set. + * @param testDataSize the testDataSize value to set. * @return the Regression object itself. */ - public Regression withWeightColumnName(String weightColumnName) { - this.weightColumnName = weightColumnName; + public Regression withTestDataSize(Double testDataSize) { + this.testDataSize = testDataSize; return this; } @@ -242,26 +285,6 @@ public Regression withValidationData(MLTableJobInput validationData) { return this; } - /** - * Get the testData property: Test data input. - * - * @return the testData value. - */ - public MLTableJobInput testData() { - return this.testData; - } - - /** - * Set the testData property: Test data input. - * - * @param testData the testData value to set. - * @return the Regression object itself. - */ - public Regression withTestData(MLTableJobInput testData) { - this.testData = testData; - return this; - } - /** * Get the validationDataSize property: The fraction of training dataset that needs to be set aside for validation * purpose. @@ -289,46 +312,24 @@ public Regression withValidationDataSize(Double validationDataSize) { } /** - * 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. - * - * @return the testDataSize value. - */ - public Double testDataSize() { - return this.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. - * - * @param testDataSize the testDataSize value to set. - * @return the Regression object itself. - */ - public Regression withTestDataSize(Double testDataSize) { - this.testDataSize = testDataSize; - return this; - } - - /** - * Get the featurizationSettings property: Featurization inputs needed for AutoML job. + * 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 featurizationSettings value. + * @return the weightColumnName value. */ - public TableVerticalFeaturizationSettings featurizationSettings() { - return this.featurizationSettings; + public String weightColumnName() { + return this.weightColumnName; } /** - * Set the featurizationSettings property: Featurization inputs needed for AutoML job. + * 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 featurizationSettings the featurizationSettings value to set. + * @param weightColumnName the weightColumnName value to set. * @return the Regression object itself. */ - public Regression withFeaturizationSettings(TableVerticalFeaturizationSettings featurizationSettings) { - this.featurizationSettings = featurizationSettings; + public Regression withWeightColumnName(String weightColumnName) { + this.weightColumnName = weightColumnName; return this; } @@ -345,8 +346,8 @@ public Regression withLogVerbosity(LogVerbosity logVerbosity) { * {@inheritDoc} */ @Override - public Regression withTrainingData(MLTableJobInput trainingData) { - super.withTrainingData(trainingData); + public Regression withTargetColumnName(String targetColumnName) { + super.withTargetColumnName(targetColumnName); return this; } @@ -354,8 +355,8 @@ public Regression withTrainingData(MLTableJobInput trainingData) { * {@inheritDoc} */ @Override - public Regression withTargetColumnName(String targetColumnName) { - super.withTargetColumnName(targetColumnName); + public Regression withTrainingData(MLTableJobInput trainingData) { + super.withTrainingData(trainingData); return this; } @@ -366,27 +367,34 @@ public Regression withTargetColumnName(String targetColumnName) { */ @Override public void validate() { - super.validate(); if (trainingSettings() != null) { trainingSettings().validate(); } + if (featurizationSettings() != null) { + featurizationSettings().validate(); + } if (limitSettings() != null) { limitSettings().validate(); } if (nCrossValidations() != null) { nCrossValidations().validate(); } - if (validationData() != null) { - validationData().validate(); - } if (testData() != null) { testData().validate(); } - if (featurizationSettings() != null) { - featurizationSettings().validate(); + if (validationData() != null) { + validationData().validate(); + } + if (trainingData() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property trainingData in model Regression")); + } else { + trainingData().validate(); } } + private static final ClientLogger LOGGER = new ClientLogger(Regression.class); + /** * {@inheritDoc} */ @@ -399,16 +407,16 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("taskType", this.taskType == null ? null : this.taskType.toString()); jsonWriter.writeStringField("primaryMetric", this.primaryMetric == null ? null : this.primaryMetric.toString()); jsonWriter.writeJsonField("trainingSettings", this.trainingSettings); - jsonWriter.writeJsonField("limitSettings", this.limitSettings); - jsonWriter.writeJsonField("nCrossValidations", this.nCrossValidations); jsonWriter.writeArrayField("cvSplitColumnNames", this.cvSplitColumnNames, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("weightColumnName", this.weightColumnName); - jsonWriter.writeJsonField("validationData", this.validationData); + jsonWriter.writeJsonField("featurizationSettings", this.featurizationSettings); + jsonWriter.writeJsonField("limitSettings", this.limitSettings); + jsonWriter.writeJsonField("nCrossValidations", this.nCrossValidations); jsonWriter.writeJsonField("testData", this.testData); - jsonWriter.writeNumberField("validationDataSize", this.validationDataSize); jsonWriter.writeNumberField("testDataSize", this.testDataSize); - jsonWriter.writeJsonField("featurizationSettings", this.featurizationSettings); + jsonWriter.writeJsonField("validationData", this.validationData); + jsonWriter.writeNumberField("validationDataSize", this.validationDataSize); + jsonWriter.writeStringField("weightColumnName", this.weightColumnName); return jsonWriter.writeEndObject(); } @@ -440,25 +448,25 @@ public static Regression fromJson(JsonReader jsonReader) throws IOException { deserializedRegression.primaryMetric = RegressionPrimaryMetrics.fromString(reader.getString()); } else if ("trainingSettings".equals(fieldName)) { deserializedRegression.trainingSettings = RegressionTrainingSettings.fromJson(reader); + } else if ("cvSplitColumnNames".equals(fieldName)) { + List cvSplitColumnNames = reader.readArray(reader1 -> reader1.getString()); + deserializedRegression.cvSplitColumnNames = cvSplitColumnNames; + } else if ("featurizationSettings".equals(fieldName)) { + deserializedRegression.featurizationSettings = TableVerticalFeaturizationSettings.fromJson(reader); } else if ("limitSettings".equals(fieldName)) { deserializedRegression.limitSettings = TableVerticalLimitSettings.fromJson(reader); } else if ("nCrossValidations".equals(fieldName)) { deserializedRegression.nCrossValidations = NCrossValidations.fromJson(reader); - } else if ("cvSplitColumnNames".equals(fieldName)) { - List cvSplitColumnNames = reader.readArray(reader1 -> reader1.getString()); - deserializedRegression.cvSplitColumnNames = cvSplitColumnNames; - } else if ("weightColumnName".equals(fieldName)) { - deserializedRegression.weightColumnName = reader.getString(); - } else if ("validationData".equals(fieldName)) { - deserializedRegression.validationData = MLTableJobInput.fromJson(reader); } else if ("testData".equals(fieldName)) { deserializedRegression.testData = MLTableJobInput.fromJson(reader); - } else if ("validationDataSize".equals(fieldName)) { - deserializedRegression.validationDataSize = reader.getNullable(JsonReader::getDouble); } else if ("testDataSize".equals(fieldName)) { deserializedRegression.testDataSize = reader.getNullable(JsonReader::getDouble); - } else if ("featurizationSettings".equals(fieldName)) { - deserializedRegression.featurizationSettings = TableVerticalFeaturizationSettings.fromJson(reader); + } else if ("validationData".equals(fieldName)) { + deserializedRegression.validationData = MLTableJobInput.fromJson(reader); + } else if ("validationDataSize".equals(fieldName)) { + deserializedRegression.validationDataSize = reader.getNullable(JsonReader::getDouble); + } else if ("weightColumnName".equals(fieldName)) { + deserializedRegression.weightColumnName = reader.getString(); } else { reader.skipChildren(); } 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 aaf2bce550822..28609b5585051 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 @@ -78,8 +78,8 @@ public RegressionTrainingSettings withBlockedTrainingAlgorithms(List writer.writeString(element == null ? null : element.toString())); jsonWriter.writeArrayField("blockedTrainingAlgorithms", this.blockedTrainingAlgorithms, @@ -183,12 +185,15 @@ public static RegressionTrainingSettings fromJson(JsonReader jsonReader) throws String fieldName = reader.getFieldName(); reader.nextToken(); - if ("enableOnnxCompatibleModels".equals(fieldName)) { + if ("enableDnnTraining".equals(fieldName)) { deserializedRegressionTrainingSettings - .withEnableOnnxCompatibleModels(reader.getNullable(JsonReader::getBoolean)); - } else if ("stackEnsembleSettings".equals(fieldName)) { + .withEnableDnnTraining(reader.getNullable(JsonReader::getBoolean)); + } else if ("enableModelExplainability".equals(fieldName)) { deserializedRegressionTrainingSettings - .withStackEnsembleSettings(StackEnsembleSettings.fromJson(reader)); + .withEnableModelExplainability(reader.getNullable(JsonReader::getBoolean)); + } else if ("enableOnnxCompatibleModels".equals(fieldName)) { + deserializedRegressionTrainingSettings + .withEnableOnnxCompatibleModels(reader.getNullable(JsonReader::getBoolean)); } else if ("enableStackEnsemble".equals(fieldName)) { deserializedRegressionTrainingSettings .withEnableStackEnsemble(reader.getNullable(JsonReader::getBoolean)); @@ -198,12 +203,9 @@ public static RegressionTrainingSettings fromJson(JsonReader jsonReader) throws } else if ("ensembleModelDownloadTimeout".equals(fieldName)) { deserializedRegressionTrainingSettings.withEnsembleModelDownloadTimeout( reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString()))); - } else if ("enableModelExplainability".equals(fieldName)) { - deserializedRegressionTrainingSettings - .withEnableModelExplainability(reader.getNullable(JsonReader::getBoolean)); - } else if ("enableDnnTraining".equals(fieldName)) { + } else if ("stackEnsembleSettings".equals(fieldName)) { deserializedRegressionTrainingSettings - .withEnableDnnTraining(reader.getNullable(JsonReader::getBoolean)); + .withStackEnsembleSettings(StackEnsembleSettings.fromJson(reader)); } else if ("allowedTrainingAlgorithms".equals(fieldName)) { List allowedTrainingAlgorithms = reader.readArray(reader1 -> RegressionModels.fromString(reader1.getString())); 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..bfac3c2c150af --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RequestConfiguration.java @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.Duration; + +/** + * Scoring requests configuration. + */ +@Fluent +public final class RequestConfiguration implements JsonSerializable { + /* + * The number of maximum concurrent requests per node allowed per deployment. Defaults to 1. + */ + private Integer maxConcurrentRequestsPerInstance; + + /* + * The scoring timeout in ISO 8601 format. + * Defaults to 5000ms. + */ + 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() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("maxConcurrentRequestsPerInstance", this.maxConcurrentRequestsPerInstance); + jsonWriter.writeStringField("requestTimeout", CoreUtils.durationToStringWithDays(this.requestTimeout)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RequestConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RequestConfiguration if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the RequestConfiguration. + */ + public static RequestConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RequestConfiguration deserializedRequestConfiguration = new RequestConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("maxConcurrentRequestsPerInstance".equals(fieldName)) { + deserializedRequestConfiguration.maxConcurrentRequestsPerInstance + = reader.getNullable(JsonReader::getInt); + } else if ("requestTimeout".equals(fieldName)) { + deserializedRequestConfiguration.requestTimeout + = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedRequestConfiguration; + }); + } +} 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..7559f02492d41 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResizeSchema.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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Schema for Compute Instance resize. + */ +@Fluent +public final class ResizeSchema implements JsonSerializable { + /* + * The name of the virtual machine size. + */ + 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() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("targetVMSize", this.targetVMSize); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResizeSchema from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResizeSchema if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ResizeSchema. + */ + public static ResizeSchema fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResizeSchema deserializedResizeSchema = new ResizeSchema(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("targetVMSize".equals(fieldName)) { + deserializedResizeSchema.targetVMSize = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedResizeSchema; + }); + } +} 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 2c08db43b2b7d..8a0db9c0149a0 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 @@ -23,14 +23,14 @@ public class ResourceBase implements JsonSerializable { private String description; /* - * Tag dictionary. Tags can be added, removed, and updated. + * The asset property dictionary. */ - private Map tags; + private Map properties; /* - * The asset property dictionary. + * Tag dictionary. Tags can be added, removed, and updated. */ - private Map properties; + private Map tags; /** * Creates an instance of ResourceBase class. @@ -59,42 +59,42 @@ public ResourceBase withDescription(String description) { } /** - * Get the tags property: Tag dictionary. Tags can be added, removed, and updated. + * Get the properties property: The asset property dictionary. * - * @return the tags value. + * @return the properties value. */ - public Map tags() { - return this.tags; + public Map properties() { + return this.properties; } /** - * Set the tags property: Tag dictionary. Tags can be added, removed, and updated. + * Set the properties property: The asset property dictionary. * - * @param tags the tags value to set. + * @param properties the properties value to set. * @return the ResourceBase object itself. */ - public ResourceBase withTags(Map tags) { - this.tags = tags; + public ResourceBase withProperties(Map properties) { + this.properties = properties; return this; } /** - * Get the properties property: The asset property dictionary. + * Get the tags property: Tag dictionary. Tags can be added, removed, and updated. * - * @return the properties value. + * @return the tags value. */ - public Map properties() { - return this.properties; + public Map tags() { + return this.tags; } /** - * Set the properties property: The asset property dictionary. + * Set the tags property: Tag dictionary. Tags can be added, removed, and updated. * - * @param properties the properties value to set. + * @param tags the tags value to set. * @return the ResourceBase object itself. */ - public ResourceBase withProperties(Map properties) { - this.properties = properties; + public ResourceBase withTags(Map tags) { + this.tags = tags; return this; } @@ -113,8 +113,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", this.description); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", this.properties, (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -135,12 +135,12 @@ public static ResourceBase fromJson(JsonReader jsonReader) throws IOException { if ("description".equals(fieldName)) { deserializedResourceBase.description = reader.getString(); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedResourceBase.tags = tags; } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedResourceBase.properties = properties; + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedResourceBase.tags = tags; } else { reader.skipChildren(); } 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 index d21abe38c714b..af3a370c94cdd 100644 --- 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 @@ -24,6 +24,11 @@ public final class RollingInputData extends MonitoringInputDataBase { */ private MonitoringInputDataType inputDataType = MonitoringInputDataType.ROLLING; + /* + * Reference to the component asset used to preprocess the data. + */ + private String preprocessingComponentId; + /* * [Required] The time offset between the end of the data window and the monitor's current run time. */ @@ -34,11 +39,6 @@ public final class RollingInputData extends MonitoringInputDataBase { */ private Duration windowSize; - /* - * Reference to the component asset used to preprocess the data. - */ - private String preprocessingComponentId; - /** * Creates an instance of RollingInputData class. */ @@ -55,6 +55,26 @@ public MonitoringInputDataType inputDataType() { return this.inputDataType; } + /** + * Get the preprocessingComponentId property: Reference to the component asset used to preprocess the data. + * + * @return the preprocessingComponentId value. + */ + public String preprocessingComponentId() { + return this.preprocessingComponentId; + } + + /** + * Set the preprocessingComponentId property: Reference to the component asset used to preprocess the data. + * + * @param preprocessingComponentId the preprocessingComponentId value to set. + * @return the RollingInputData object itself. + */ + public RollingInputData withPreprocessingComponentId(String preprocessingComponentId) { + this.preprocessingComponentId = preprocessingComponentId; + return this; + } + /** * Get the windowOffset property: [Required] The time offset between the end of the data window and the monitor's * current run time. @@ -98,22 +118,11 @@ public RollingInputData withWindowSize(Duration windowSize) { } /** - * Get the preprocessingComponentId property: Reference to the component asset used to preprocess the data. - * - * @return the preprocessingComponentId value. - */ - public String preprocessingComponentId() { - return this.preprocessingComponentId; - } - - /** - * Set the preprocessingComponentId property: Reference to the component asset used to preprocess the data. - * - * @param preprocessingComponentId the preprocessingComponentId value to set. - * @return the RollingInputData object itself. + * {@inheritDoc} */ - public RollingInputData withPreprocessingComponentId(String preprocessingComponentId) { - this.preprocessingComponentId = preprocessingComponentId; + @Override + public RollingInputData withColumns(Map columns) { + super.withColumns(columns); return this; } @@ -144,15 +153,6 @@ public RollingInputData withUri(String uri) { return this; } - /** - * {@inheritDoc} - */ - @Override - public RollingInputData withColumns(Map columns) { - super.withColumns(columns); - return this; - } - /** * Validates the instance. * @@ -160,7 +160,6 @@ public RollingInputData withColumns(Map columns) { */ @Override public void validate() { - super.validate(); if (windowOffset() == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property windowOffset in model RollingInputData")); @@ -169,6 +168,14 @@ public void validate() { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property windowSize in model RollingInputData")); } + if (jobInputType() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property jobInputType in model RollingInputData")); + } + if (uri() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property uri in model RollingInputData")); + } } private static final ClientLogger LOGGER = new ClientLogger(RollingInputData.class); @@ -181,8 +188,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("jobInputType", jobInputType() == null ? null : jobInputType().toString()); jsonWriter.writeStringField("uri", uri()); - jsonWriter.writeStringField("dataContext", dataContext()); jsonWriter.writeMapField("columns", columns(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("dataContext", dataContext()); jsonWriter.writeStringField("windowOffset", CoreUtils.durationToStringWithDays(this.windowOffset)); jsonWriter.writeStringField("windowSize", CoreUtils.durationToStringWithDays(this.windowSize)); jsonWriter.writeStringField("inputDataType", this.inputDataType == null ? null : this.inputDataType.toString()); @@ -210,11 +217,11 @@ public static RollingInputData fromJson(JsonReader jsonReader) throws IOExceptio deserializedRollingInputData.withJobInputType(JobInputType.fromString(reader.getString())); } else if ("uri".equals(fieldName)) { deserializedRollingInputData.withUri(reader.getString()); - } else if ("dataContext".equals(fieldName)) { - deserializedRollingInputData.withDataContext(reader.getString()); } else if ("columns".equals(fieldName)) { Map columns = reader.readMap(reader1 -> reader1.getString()); deserializedRollingInputData.withColumns(columns); + } else if ("dataContext".equals(fieldName)) { + deserializedRollingInputData.withDataContext(reader.getString()); } else if ("windowOffset".equals(fieldName)) { deserializedRollingInputData.windowOffset = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); 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 33ccc29791fe3..f2be922187053 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 @@ -30,16 +30,6 @@ public final class SasAuthTypeWorkspaceConnectionProperties extends WorkspaceCon */ private WorkspaceConnectionSharedAccessSignature credentials; - /* - * The createdByWorkspaceArmId property. - */ - private String createdByWorkspaceArmId; - - /* - * Group based on connection category - */ - private ConnectionGroup group; - /** * Creates an instance of SasAuthTypeWorkspaceConnectionProperties class. */ @@ -78,31 +68,29 @@ public WorkspaceConnectionSharedAccessSignature credentials() { } /** - * Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. - * - * @return the createdByWorkspaceArmId value. + * {@inheritDoc} */ @Override - public String createdByWorkspaceArmId() { - return this.createdByWorkspaceArmId; + public SasAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { + super.withCategory(category); + return this; } /** - * Get the group property: Group based on connection category. - * - * @return the group value. + * {@inheritDoc} */ @Override - public ConnectionGroup group() { - return this.group; + public SasAuthTypeWorkspaceConnectionProperties withError(String error) { + super.withError(error); + return this; } /** * {@inheritDoc} */ @Override - public SasAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); + public SasAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { + super.withExpiryTime(expiryTime); return this; } @@ -110,8 +98,8 @@ public SasAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory * {@inheritDoc} */ @Override - public SasAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { - super.withExpiryTime(expiryTime); + public SasAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { + super.withIsSharedToAll(isSharedToAll); return this; } @@ -119,8 +107,8 @@ public SasAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime ex * {@inheritDoc} */ @Override - public SasAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { - super.withIsSharedToAll(isSharedToAll); + public SasAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { + super.withMetadata(metadata); return this; } @@ -128,8 +116,8 @@ public SasAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isShar * {@inheritDoc} */ @Override - public SasAuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); + public SasAuthTypeWorkspaceConnectionProperties withPeRequirement(ManagedPERequirement peRequirement) { + super.withPeRequirement(peRequirement); return this; } @@ -137,8 +125,8 @@ public SasAuthTypeWorkspaceConnectionProperties withTarget(String target) { * {@inheritDoc} */ @Override - public SasAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { - super.withMetadata(metadata); + public SasAuthTypeWorkspaceConnectionProperties withPeStatus(ManagedPEStatus peStatus) { + super.withPeStatus(peStatus); return this; } @@ -155,8 +143,8 @@ public SasAuthTypeWorkspaceConnectionProperties withSharedUserList(List * {@inheritDoc} */ @Override - public SasAuthTypeWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); + public SasAuthTypeWorkspaceConnectionProperties withTarget(String target) { + super.withTarget(target); return this; } @@ -164,8 +152,9 @@ public SasAuthTypeWorkspaceConnectionProperties withValue(String value) { * {@inheritDoc} */ @Override - public SasAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); + public SasAuthTypeWorkspaceConnectionProperties + withUseWorkspaceManagedIdentity(Boolean useWorkspaceManagedIdentity) { + super.withUseWorkspaceManagedIdentity(useWorkspaceManagedIdentity); return this; } @@ -176,7 +165,6 @@ public SasAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valu */ @Override public void validate() { - super.validate(); if (credentials() != null) { credentials().validate(); } @@ -189,15 +177,17 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("category", category() == null ? null : category().toString()); + jsonWriter.writeStringField("error", error()); jsonWriter.writeStringField("expiryTime", expiryTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(expiryTime())); jsonWriter.writeBooleanField("isSharedToAll", isSharedToAll()); - jsonWriter.writeStringField("target", target()); jsonWriter.writeMapField("metadata", metadata(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("peRequirement", peRequirement() == null ? null : peRequirement().toString()); + jsonWriter.writeStringField("peStatus", peStatus() == null ? null : peStatus().toString()); jsonWriter.writeArrayField("sharedUserList", sharedUserList(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", value()); - jsonWriter.writeStringField("valueFormat", valueFormat() == null ? null : valueFormat().toString()); + jsonWriter.writeStringField("target", target()); + jsonWriter.writeBooleanField("useWorkspaceManagedIdentity", useWorkspaceManagedIdentity()); jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); jsonWriter.writeJsonField("credentials", this.credentials); return jsonWriter.writeEndObject(); @@ -223,29 +213,36 @@ public static SasAuthTypeWorkspaceConnectionProperties fromJson(JsonReader jsonR deserializedSasAuthTypeWorkspaceConnectionProperties .withCategory(ConnectionCategory.fromString(reader.getString())); } else if ("createdByWorkspaceArmId".equals(fieldName)) { - deserializedSasAuthTypeWorkspaceConnectionProperties.createdByWorkspaceArmId = reader.getString(); + deserializedSasAuthTypeWorkspaceConnectionProperties + .withCreatedByWorkspaceArmId(reader.getString()); + } else if ("error".equals(fieldName)) { + deserializedSasAuthTypeWorkspaceConnectionProperties.withError(reader.getString()); } else if ("expiryTime".equals(fieldName)) { deserializedSasAuthTypeWorkspaceConnectionProperties.withExpiryTime(reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("group".equals(fieldName)) { - deserializedSasAuthTypeWorkspaceConnectionProperties.group - = ConnectionGroup.fromString(reader.getString()); + deserializedSasAuthTypeWorkspaceConnectionProperties + .withGroup(ConnectionGroup.fromString(reader.getString())); } else if ("isSharedToAll".equals(fieldName)) { deserializedSasAuthTypeWorkspaceConnectionProperties .withIsSharedToAll(reader.getNullable(JsonReader::getBoolean)); - } else if ("target".equals(fieldName)) { - deserializedSasAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); } else if ("metadata".equals(fieldName)) { Map metadata = reader.readMap(reader1 -> reader1.getString()); deserializedSasAuthTypeWorkspaceConnectionProperties.withMetadata(metadata); + } else if ("peRequirement".equals(fieldName)) { + deserializedSasAuthTypeWorkspaceConnectionProperties + .withPeRequirement(ManagedPERequirement.fromString(reader.getString())); + } else if ("peStatus".equals(fieldName)) { + deserializedSasAuthTypeWorkspaceConnectionProperties + .withPeStatus(ManagedPEStatus.fromString(reader.getString())); } else if ("sharedUserList".equals(fieldName)) { List sharedUserList = reader.readArray(reader1 -> reader1.getString()); deserializedSasAuthTypeWorkspaceConnectionProperties.withSharedUserList(sharedUserList); - } else if ("value".equals(fieldName)) { - deserializedSasAuthTypeWorkspaceConnectionProperties.withValue(reader.getString()); - } else if ("valueFormat".equals(fieldName)) { + } else if ("target".equals(fieldName)) { + deserializedSasAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); + } else if ("useWorkspaceManagedIdentity".equals(fieldName)) { deserializedSasAuthTypeWorkspaceConnectionProperties - .withValueFormat(ValueFormat.fromString(reader.getString())); + .withUseWorkspaceManagedIdentity(reader.getNullable(JsonReader::getBoolean)); } else if ("authType".equals(fieldName)) { deserializedSasAuthTypeWorkspaceConnectionProperties.authType = ConnectionAuthType.fromString(reader.getString()); 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 index cd31e7be4d1c4..9e5421352c259 100644 --- 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 @@ -68,7 +68,6 @@ public SasCredential withSasUri(String sasUri) { */ @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 index 435c44e23b65c..6832219134a86 100644 --- 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 @@ -68,7 +68,6 @@ public SasCredentialDto withSasUri(String sasUri) { */ @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 6fd6dec723787..6c15a0e3024e1 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 @@ -69,7 +69,6 @@ public SasDatastoreCredentials withSecrets(SasDatastoreSecrets secrets) { */ @Override public void validate() { - super.validate(); if (secrets() == null) { throw LOGGER.atError() .log( 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 47aca7a15101a..7254de883ee8d 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 @@ -69,7 +69,6 @@ public SasDatastoreSecrets withSasToken(String sasToken) { */ @Override public void validate() { - super.validate(); } /** diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleUnitConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleUnitConfiguration.java new file mode 100644 index 0000000000000..fa70f14439c56 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleUnitConfiguration.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Configuration for ScaleUnit pool. + */ +@Fluent +public final class ScaleUnitConfiguration implements JsonSerializable { + /* + * Gets or sets a value indicating whether PublicEgress is disabled. + */ + private Boolean disablePublicEgress; + + /* + * Gets or sets a list of Registry sources that will be used to confirm identity, storage, ACR. + */ + private List registries; + + /** + * Creates an instance of ScaleUnitConfiguration class. + */ + public ScaleUnitConfiguration() { + } + + /** + * Get the disablePublicEgress property: Gets or sets a value indicating whether PublicEgress is disabled. + * + * @return the disablePublicEgress value. + */ + public Boolean disablePublicEgress() { + return this.disablePublicEgress; + } + + /** + * Set the disablePublicEgress property: Gets or sets a value indicating whether PublicEgress is disabled. + * + * @param disablePublicEgress the disablePublicEgress value to set. + * @return the ScaleUnitConfiguration object itself. + */ + public ScaleUnitConfiguration withDisablePublicEgress(Boolean disablePublicEgress) { + this.disablePublicEgress = disablePublicEgress; + return this; + } + + /** + * Get the registries property: Gets or sets a list of Registry sources that will be used to confirm identity, + * storage, ACR. + * + * @return the registries value. + */ + public List registries() { + return this.registries; + } + + /** + * Set the registries property: Gets or sets a list of Registry sources that will be used to confirm identity, + * storage, ACR. + * + * @param registries the registries value to set. + * @return the ScaleUnitConfiguration object itself. + */ + public ScaleUnitConfiguration withRegistries(List registries) { + this.registries = registries; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("disablePublicEgress", this.disablePublicEgress); + jsonWriter.writeArrayField("registries", this.registries, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScaleUnitConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScaleUnitConfiguration if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the ScaleUnitConfiguration. + */ + public static ScaleUnitConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScaleUnitConfiguration deserializedScaleUnitConfiguration = new ScaleUnitConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("disablePublicEgress".equals(fieldName)) { + deserializedScaleUnitConfiguration.disablePublicEgress = reader.getNullable(JsonReader::getBoolean); + } else if ("registries".equals(fieldName)) { + List registries = reader.readArray(reader1 -> reader1.getString()); + deserializedScaleUnitConfiguration.registries = registries; + } else { + reader.skipChildren(); + } + } + + return deserializedScaleUnitConfiguration; + }); + } +} 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 6cd0572ffa4e4..adf83f703da8c 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 @@ -17,6 +17,11 @@ */ @Fluent public final class ScheduleProperties extends ResourceBase { + /* + * [Required] Specifies the action of the schedule + */ + private ScheduleActionBase action; + /* * Display name of schedule. */ @@ -27,25 +32,40 @@ public final class ScheduleProperties extends ResourceBase { */ private Boolean isEnabled; + /* + * Provisioning state for the schedule. + */ + private ScheduleProvisioningStatus provisioningState; + /* * [Required] Specifies the trigger details */ private TriggerBase trigger; - /* - * [Required] Specifies the action of the schedule + /** + * Creates an instance of ScheduleProperties class. */ - private ScheduleActionBase action; + public ScheduleProperties() { + } - /* - * Provisioning state for the schedule. + /** + * Get the action property: [Required] Specifies the action of the schedule. + * + * @return the action value. */ - private ScheduleProvisioningStatus provisioningState; + public ScheduleActionBase action() { + return this.action; + } /** - * Creates an instance of ScheduleProperties class. + * Set the action property: [Required] Specifies the action of the schedule. + * + * @param action the action value to set. + * @return the ScheduleProperties object itself. */ - public ScheduleProperties() { + public ScheduleProperties withAction(ScheduleActionBase action) { + this.action = action; + return this; } /** @@ -88,6 +108,15 @@ public ScheduleProperties withIsEnabled(Boolean isEnabled) { return this; } + /** + * Get the provisioningState property: Provisioning state for the schedule. + * + * @return the provisioningState value. + */ + public ScheduleProvisioningStatus provisioningState() { + return this.provisioningState; + } + /** * Get the trigger property: [Required] Specifies the trigger details. * @@ -108,35 +137,6 @@ public ScheduleProperties withTrigger(TriggerBase trigger) { return this; } - /** - * Get the action property: [Required] Specifies the action of the schedule. - * - * @return the action value. - */ - public ScheduleActionBase action() { - return this.action; - } - - /** - * Set the action property: [Required] Specifies the action of the schedule. - * - * @param action the action value to set. - * @return the ScheduleProperties object itself. - */ - public ScheduleProperties withAction(ScheduleActionBase action) { - this.action = action; - return this; - } - - /** - * Get the provisioningState property: Provisioning state for the schedule. - * - * @return the provisioningState value. - */ - public ScheduleProvisioningStatus provisioningState() { - return this.provisioningState; - } - /** * {@inheritDoc} */ @@ -150,8 +150,8 @@ public ScheduleProperties withDescription(String description) { * {@inheritDoc} */ @Override - public ScheduleProperties withTags(Map tags) { - super.withTags(tags); + public ScheduleProperties withProperties(Map properties) { + super.withProperties(properties); return this; } @@ -159,8 +159,8 @@ public ScheduleProperties withTags(Map tags) { * {@inheritDoc} */ @Override - public ScheduleProperties withProperties(Map properties) { - super.withProperties(properties); + public ScheduleProperties withTags(Map tags) { + super.withTags(tags); return this; } @@ -171,19 +171,18 @@ public ScheduleProperties withProperties(Map properties) { */ @Override public void validate() { - super.validate(); - if (trigger() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property trigger in model ScheduleProperties")); - } else { - trigger().validate(); - } if (action() == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property action in model ScheduleProperties")); } else { action().validate(); } + if (trigger() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property trigger in model ScheduleProperties")); + } else { + trigger().validate(); + } } private static final ClientLogger LOGGER = new ClientLogger(ScheduleProperties.class); @@ -195,10 +194,10 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("trigger", this.trigger); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("action", this.action); + jsonWriter.writeJsonField("trigger", this.trigger); jsonWriter.writeStringField("displayName", this.displayName); jsonWriter.writeBooleanField("isEnabled", this.isEnabled); return jsonWriter.writeEndObject(); @@ -222,16 +221,16 @@ public static ScheduleProperties fromJson(JsonReader jsonReader) throws IOExcept if ("description".equals(fieldName)) { deserializedScheduleProperties.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedScheduleProperties.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedScheduleProperties.withProperties(properties); - } else if ("trigger".equals(fieldName)) { - deserializedScheduleProperties.trigger = TriggerBase.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedScheduleProperties.withTags(tags); } else if ("action".equals(fieldName)) { deserializedScheduleProperties.action = ScheduleActionBase.fromJson(reader); + } else if ("trigger".equals(fieldName)) { + deserializedScheduleProperties.trigger = TriggerBase.fromJson(reader); } else if ("displayName".equals(fieldName)) { deserializedScheduleProperties.displayName = reader.getString(); } else if ("isEnabled".equals(fieldName)) { 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 89e82abf154e1..23d8dcd7f3d7f 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 @@ -19,14 +19,14 @@ @Fluent public final class ScheduleResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type Schedule. + * The link to the next page of Schedule objects. If null, there are no additional pages. */ - private List value; + private String nextLink; /* - * The link to the next page of Schedule objects. If null, there are no additional pages. + * An array of objects of type Schedule. */ - private String nextLink; + private List value; /** * Creates an instance of ScheduleResourceArmPaginatedResult class. @@ -35,42 +35,42 @@ public ScheduleResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type Schedule. + * Get the nextLink property: The link to the next page of Schedule objects. If null, there are no additional pages. * - * @return the value value. + * @return the nextLink value. */ - public List value() { - return this.value; + public String nextLink() { + return this.nextLink; } /** - * Set the value property: An array of objects of type Schedule. + * Set the nextLink property: The link to the next page of Schedule objects. If null, there are no additional pages. * - * @param value the value value to set. + * @param nextLink the nextLink value to set. * @return the ScheduleResourceArmPaginatedResult object itself. */ - public ScheduleResourceArmPaginatedResult withValue(List value) { - this.value = value; + public ScheduleResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; return this; } /** - * Get the nextLink property: The link to the next page of Schedule objects. If null, there are no additional pages. + * Get the value property: An array of objects of type Schedule. * - * @return the nextLink value. + * @return the value value. */ - public String nextLink() { - return this.nextLink; + public List value() { + return this.value; } /** - * Set the nextLink property: The link to the next page of Schedule objects. If null, there are no additional pages. + * Set the value property: An array of objects of type Schedule. * - * @param nextLink the nextLink value to set. + * @param value the value value to set. * @return the ScheduleResourceArmPaginatedResult object itself. */ - public ScheduleResourceArmPaginatedResult withNextLink(String nextLink) { - this.nextLink = nextLink; + public ScheduleResourceArmPaginatedResult withValue(List value) { + this.value = value; return this; } @@ -91,8 +91,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -112,11 +112,11 @@ public static ScheduleResourceArmPaginatedResult fromJson(JsonReader jsonReader) String fieldName = reader.getFieldName(); reader.nextToken(); - if ("value".equals(fieldName)) { + if ("nextLink".equals(fieldName)) { + deserializedScheduleResourceArmPaginatedResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> ScheduleInner.fromJson(reader1)); deserializedScheduleResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedScheduleResourceArmPaginatedResult.nextLink = reader.getString(); } else { reader.skipChildren(); } 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 583b1a9dd62d9..59c252a8bf24d 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 @@ -17,7 +17,7 @@ @Fluent public final class ScriptReference implements JsonSerializable { /* - * The storage source of the script: workspace. + * The storage source of the script: inline, workspace. */ private String scriptSource; @@ -43,7 +43,7 @@ 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. */ @@ -52,7 +52,7 @@ 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. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SecretExpiry.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SecretExpiry.java new file mode 100644 index 0000000000000..f51ac8b4ddf73 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SecretExpiry.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Secret expiration configuration. + */ +@Fluent +public final class SecretExpiry implements JsonSerializable { + /* + * Indicates if the secret is expirable. + */ + private Boolean expirableSecret; + + /* + * Number of hours after which the secret will expire. + */ + private Integer expireAfterHours; + + /** + * Creates an instance of SecretExpiry class. + */ + public SecretExpiry() { + } + + /** + * Get the expirableSecret property: Indicates if the secret is expirable. + * + * @return the expirableSecret value. + */ + public Boolean expirableSecret() { + return this.expirableSecret; + } + + /** + * Set the expirableSecret property: Indicates if the secret is expirable. + * + * @param expirableSecret the expirableSecret value to set. + * @return the SecretExpiry object itself. + */ + public SecretExpiry withExpirableSecret(Boolean expirableSecret) { + this.expirableSecret = expirableSecret; + return this; + } + + /** + * Get the expireAfterHours property: Number of hours after which the secret will expire. + * + * @return the expireAfterHours value. + */ + public Integer expireAfterHours() { + return this.expireAfterHours; + } + + /** + * Set the expireAfterHours property: Number of hours after which the secret will expire. + * + * @param expireAfterHours the expireAfterHours value to set. + * @return the SecretExpiry object itself. + */ + public SecretExpiry withExpireAfterHours(Integer expireAfterHours) { + this.expireAfterHours = expireAfterHours; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("expirableSecret", this.expirableSecret); + jsonWriter.writeNumberField("expireAfterHours", this.expireAfterHours); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SecretExpiry from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SecretExpiry if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the SecretExpiry. + */ + public static SecretExpiry fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SecretExpiry deserializedSecretExpiry = new SecretExpiry(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("expirableSecret".equals(fieldName)) { + deserializedSecretExpiry.expirableSecret = reader.getNullable(JsonReader::getBoolean); + } else if ("expireAfterHours".equals(fieldName)) { + deserializedSecretExpiry.expireAfterHours = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedSecretExpiry; + }); + } +} 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 index 4a6d2f5d405cb..cafe00341b2b1 100644 --- 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 @@ -51,11 +51,11 @@ public interface ServerlessEndpoint { Map tags(); /** - * Gets the properties property: [Required] Additional attributes of the entity. + * Gets the identity property: Managed service identity (system assigned and/or user assigned identities). * - * @return the properties value. + * @return the identity value. */ - ServerlessEndpointProperties properties(); + ManagedServiceIdentity identity(); /** * Gets the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of @@ -66,11 +66,11 @@ public interface ServerlessEndpoint { String kind(); /** - * Gets the identity property: Managed service identity (system assigned and/or user assigned identities). + * Gets the properties property: [Required] Additional attributes of the entity. * - * @return the identity value. + * @return the properties value. */ - ManagedServiceIdentity identity(); + ServerlessEndpointProperties properties(); /** * Gets the sku property: Sku details required for ARM contract for Autoscaling. @@ -183,8 +183,8 @@ interface WithProperties { * 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.WithKind, - DefinitionStages.WithIdentity, DefinitionStages.WithSku { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, + DefinitionStages.WithKind, DefinitionStages.WithSku { /** * Executes the create request. * @@ -215,32 +215,32 @@ interface WithTags { } /** - * The stage of the ServerlessEndpoint definition allowing to specify kind. + * The stage of the ServerlessEndpoint definition allowing to specify identity. */ - interface WithKind { + interface WithIdentity { /** - * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for - * resources of the same type.. + * Specifies the identity property: Managed service identity (system assigned and/or user assigned + * identities). * - * @param kind Metadata used by portal/tooling/etc to render different UX experiences for resources of the - * same type. + * @param identity Managed service identity (system assigned and/or user assigned identities). * @return the next definition stage. */ - WithCreate withKind(String kind); + WithCreate withIdentity(ManagedServiceIdentity identity); } /** - * The stage of the ServerlessEndpoint definition allowing to specify identity. + * The stage of the ServerlessEndpoint definition allowing to specify kind. */ - interface WithIdentity { + interface WithKind { /** - * Specifies the identity property: Managed service identity (system assigned and/or user assigned - * identities). + * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for + * resources of the same type.. * - * @param identity Managed service identity (system assigned and/or user assigned identities). + * @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 withIdentity(ManagedServiceIdentity identity); + WithCreate withKind(String kind); } /** @@ -267,7 +267,7 @@ interface WithSku { /** * The template for ServerlessEndpoint update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithSku, UpdateStages.WithIdentity { + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithSku { /** * Executes the update request. * @@ -302,30 +302,30 @@ interface WithTags { } /** - * The stage of the ServerlessEndpoint update allowing to specify sku. + * The stage of the ServerlessEndpoint update allowing to specify identity. */ - interface WithSku { + interface WithIdentity { /** - * Specifies the sku property: Sku details required for ARM contract for Autoscaling.. + * Specifies the identity property: Managed service identity (system assigned and/or user assigned + * identities). * - * @param sku Sku details required for ARM contract for Autoscaling. + * @param identity Managed service identity (system assigned and/or user assigned identities). * @return the next definition stage. */ - Update withSku(PartialSku sku); + Update withIdentity(PartialManagedServiceIdentity identity); } /** - * The stage of the ServerlessEndpoint update allowing to specify identity. + * The stage of the ServerlessEndpoint update allowing to specify sku. */ - interface WithIdentity { + interface WithSku { /** - * Specifies the identity property: Managed service identity (system assigned and/or user assigned - * identities). + * Specifies the sku property: Sku details required for ARM contract for Autoscaling.. * - * @param identity Managed service identity (system assigned and/or user assigned identities). + * @param sku Sku details required for ARM contract for Autoscaling. * @return the next definition stage. */ - Update withIdentity(PartialManagedServiceIdentity identity); + Update withSku(PartialSku sku); } } 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..192c321a102e2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointCapacityReservation.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The ServerlessEndpointCapacityReservation model. + */ +@Fluent +public final class ServerlessEndpointCapacityReservation + implements JsonSerializable { + /* + * The capacityReservationGroupId property. + */ + private String capacityReservationGroupId; + + /* + * The endpointReservedCapacity property. + */ + private Integer endpointReservedCapacity; + + /** + * Creates an instance of ServerlessEndpointCapacityReservation class. + */ + public ServerlessEndpointCapacityReservation() { + } + + /** + * Get the capacityReservationGroupId property: The capacityReservationGroupId property. + * + * @return the capacityReservationGroupId value. + */ + public String capacityReservationGroupId() { + return this.capacityReservationGroupId; + } + + /** + * Set the capacityReservationGroupId property: The capacityReservationGroupId property. + * + * @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: The endpointReservedCapacity property. + * + * @return the endpointReservedCapacity value. + */ + public Integer endpointReservedCapacity() { + return this.endpointReservedCapacity; + } + + /** + * Set the endpointReservedCapacity property: The endpointReservedCapacity property. + * + * @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.atError() + .log(new IllegalArgumentException( + "Missing required property capacityReservationGroupId in model ServerlessEndpointCapacityReservation")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ServerlessEndpointCapacityReservation.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("capacityReservationGroupId", this.capacityReservationGroupId); + jsonWriter.writeNumberField("endpointReservedCapacity", this.endpointReservedCapacity); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerlessEndpointCapacityReservation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerlessEndpointCapacityReservation if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServerlessEndpointCapacityReservation. + */ + public static ServerlessEndpointCapacityReservation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerlessEndpointCapacityReservation deserializedServerlessEndpointCapacityReservation + = new ServerlessEndpointCapacityReservation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("capacityReservationGroupId".equals(fieldName)) { + deserializedServerlessEndpointCapacityReservation.capacityReservationGroupId = reader.getString(); + } else if ("endpointReservedCapacity".equals(fieldName)) { + deserializedServerlessEndpointCapacityReservation.endpointReservedCapacity + = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedServerlessEndpointCapacityReservation; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointContentSafety.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointContentSafety.java new file mode 100644 index 0000000000000..7bb8ec2c06d6a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointContentSafety.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The ServerlessEndpointContentSafety model. + */ +@Fluent +public final class ServerlessEndpointContentSafety implements JsonSerializable { + /* + * Specifies the status of content safety. + */ + private ContentSafetyStatus contentSafetyStatus; + + /** + * Creates an instance of ServerlessEndpointContentSafety class. + */ + public ServerlessEndpointContentSafety() { + } + + /** + * Get the contentSafetyStatus property: Specifies the status of content safety. + * + * @return the contentSafetyStatus value. + */ + public ContentSafetyStatus contentSafetyStatus() { + return this.contentSafetyStatus; + } + + /** + * Set the contentSafetyStatus property: Specifies the status of content safety. + * + * @param contentSafetyStatus the contentSafetyStatus value to set. + * @return the ServerlessEndpointContentSafety object itself. + */ + public ServerlessEndpointContentSafety withContentSafetyStatus(ContentSafetyStatus contentSafetyStatus) { + this.contentSafetyStatus = contentSafetyStatus; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (contentSafetyStatus() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property contentSafetyStatus in model ServerlessEndpointContentSafety")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ServerlessEndpointContentSafety.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("contentSafetyStatus", + this.contentSafetyStatus == null ? null : this.contentSafetyStatus.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerlessEndpointContentSafety from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerlessEndpointContentSafety if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServerlessEndpointContentSafety. + */ + public static ServerlessEndpointContentSafety fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerlessEndpointContentSafety deserializedServerlessEndpointContentSafety + = new ServerlessEndpointContentSafety(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("contentSafetyStatus".equals(fieldName)) { + deserializedServerlessEndpointContentSafety.contentSafetyStatus + = ContentSafetyStatus.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedServerlessEndpointContentSafety; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointInferenceEndpoint.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointInferenceEndpoint.java new file mode 100644 index 0000000000000..e5d0e218c9a81 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointInferenceEndpoint.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.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The ServerlessEndpointInferenceEndpoint model. + */ +@Fluent +public final class ServerlessEndpointInferenceEndpoint + implements JsonSerializable { + /* + * Dictionary of + */ + private Map headers; + + /* + * The uri property. + */ + private String uri; + + /** + * Creates an instance of ServerlessEndpointInferenceEndpoint class. + */ + public ServerlessEndpointInferenceEndpoint() { + } + + /** + * Get the headers property: Dictionary of <string>. + * + * @return the headers value. + */ + public Map headers() { + return this.headers; + } + + /** + * Get the uri property: The uri property. + * + * @return the uri value. + */ + public String uri() { + return this.uri; + } + + /** + * Set the uri property: The uri property. + * + * @param uri the uri value to set. + * @return the ServerlessEndpointInferenceEndpoint object itself. + */ + public ServerlessEndpointInferenceEndpoint 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.atError() + .log(new IllegalArgumentException( + "Missing required property uri in model ServerlessEndpointInferenceEndpoint")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ServerlessEndpointInferenceEndpoint.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("uri", this.uri); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerlessEndpointInferenceEndpoint from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerlessEndpointInferenceEndpoint if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServerlessEndpointInferenceEndpoint. + */ + public static ServerlessEndpointInferenceEndpoint fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerlessEndpointInferenceEndpoint deserializedServerlessEndpointInferenceEndpoint + = new ServerlessEndpointInferenceEndpoint(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("uri".equals(fieldName)) { + deserializedServerlessEndpointInferenceEndpoint.uri = reader.getString(); + } else if ("headers".equals(fieldName)) { + Map headers = reader.readMap(reader1 -> reader1.getString()); + deserializedServerlessEndpointInferenceEndpoint.headers = headers; + } else { + reader.skipChildren(); + } + } + + return deserializedServerlessEndpointInferenceEndpoint; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointModelSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointModelSettings.java new file mode 100644 index 0000000000000..34b1927ed6d10 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessEndpointModelSettings.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.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The ServerlessEndpointModelSettings model. + */ +@Fluent +public final class ServerlessEndpointModelSettings implements JsonSerializable { + /* + * The modelId property. + */ + private String modelId; + + /** + * Creates an instance of ServerlessEndpointModelSettings class. + */ + public ServerlessEndpointModelSettings() { + } + + /** + * Get the modelId property: The modelId property. + * + * @return the modelId value. + */ + public String modelId() { + return this.modelId; + } + + /** + * Set the modelId property: The modelId property. + * + * @param modelId the modelId value to set. + * @return the ServerlessEndpointModelSettings object itself. + */ + public ServerlessEndpointModelSettings 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.atError() + .log(new IllegalArgumentException( + "Missing required property modelId in model ServerlessEndpointModelSettings")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ServerlessEndpointModelSettings.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("modelId", this.modelId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerlessEndpointModelSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerlessEndpointModelSettings if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServerlessEndpointModelSettings. + */ + public static ServerlessEndpointModelSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerlessEndpointModelSettings deserializedServerlessEndpointModelSettings + = new ServerlessEndpointModelSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("modelId".equals(fieldName)) { + deserializedServerlessEndpointModelSettings.modelId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedServerlessEndpointModelSettings; + }); + } +} 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 index c9a8c938e0163..0847580d36ae9 100644 --- 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 @@ -17,30 +17,25 @@ */ @Fluent public final class ServerlessEndpointProperties implements JsonSerializable { - /* - * The model settings (model id) for the model being serviced on the ServerlessEndpoint. - */ - private ModelSettings modelSettings; - /* * [Required] Specifies the authentication mode for the Serverless endpoint. */ private ServerlessInferenceEndpointAuthMode authMode; /* - * The inference uri to target when making requests against the serverless endpoint + * Specifies the content safety options. If omitted, the default content safety settings will be configured */ - private ServerlessInferenceEndpoint inferenceEndpoint; + private ContentSafety contentSafety; /* - * Provisioning state for the endpoint. + * The current state of the ServerlessEndpoint. */ - private EndpointProvisioningState provisioningState; + private ServerlessEndpointState endpointState; /* - * The current state of the ServerlessEndpoint. + * The inference uri to target when making requests against the serverless endpoint */ - private ServerlessEndpointState endpointState; + private ServerlessInferenceEndpoint inferenceEndpoint; /* * The MarketplaceSubscription Azure ID associated to this ServerlessEndpoint. @@ -48,36 +43,19 @@ public final class ServerlessEndpointProperties implements JsonSerializable deployments) { + super.withDeployments(deployments); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ServerlessEndpointResourceProperties withEndpointUri(String endpointUri) { + super.withEndpointUri(endpointUri); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ServerlessEndpointResourceProperties withFailureReason(String failureReason) { + super.withFailureReason(failureReason); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ServerlessEndpointResourceProperties withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ServerlessEndpointResourceProperties withName(String name) { + super.withName(name); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ServerlessEndpointResourceProperties + withShouldCreateAiServicesEndpoint(Boolean shouldCreateAiServicesEndpoint) { + super.withShouldCreateAiServicesEndpoint(shouldCreateAiServicesEndpoint); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (capacityReservation() != null) { + capacityReservation().validate(); + } + if (contentSafety() != null) { + contentSafety().validate(); + } + if (inferenceEndpoint() != null) { + inferenceEndpoint().validate(); + } + if (modelSettings() != null) { + modelSettings().validate(); + } + if (offer() != null) { + offer().validate(); + } + if (deployments() != null) { + deployments().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("associatedResourceId", associatedResourceId()); + jsonWriter.writeArrayField("deployments", deployments(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("endpointUri", endpointUri()); + jsonWriter.writeStringField("failureReason", failureReason()); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeStringField("name", name()); + jsonWriter.writeBooleanField("shouldCreateAiServicesEndpoint", shouldCreateAiServicesEndpoint()); + jsonWriter.writeStringField("endpointType", this.endpointType == null ? null : this.endpointType.toString()); + jsonWriter.writeStringField("authMode", this.authMode == null ? null : this.authMode.toString()); + jsonWriter.writeJsonField("capacityReservation", this.capacityReservation); + jsonWriter.writeJsonField("contentSafety", this.contentSafety); + jsonWriter.writeStringField("endpointState", this.endpointState == null ? null : this.endpointState.toString()); + jsonWriter.writeJsonField("inferenceEndpoint", this.inferenceEndpoint); + jsonWriter.writeStringField("marketplaceSubscriptionId", this.marketplaceSubscriptionId); + jsonWriter.writeUntypedField("metadata", this.metadata); + jsonWriter.writeJsonField("modelSettings", this.modelSettings); + jsonWriter.writeJsonField("offer", this.offer); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerlessEndpointResourceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerlessEndpointResourceProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ServerlessEndpointResourceProperties. + */ + public static ServerlessEndpointResourceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerlessEndpointResourceProperties deserializedServerlessEndpointResourceProperties + = new ServerlessEndpointResourceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("associatedResourceId".equals(fieldName)) { + deserializedServerlessEndpointResourceProperties.withAssociatedResourceId(reader.getString()); + } else if ("deployments".equals(fieldName)) { + List deployments = reader + .readArray(reader1 -> EndpointDeploymentResourcePropertiesBasicResourceInner.fromJson(reader1)); + deserializedServerlessEndpointResourceProperties.withDeployments(deployments); + } else if ("endpointUri".equals(fieldName)) { + deserializedServerlessEndpointResourceProperties.withEndpointUri(reader.getString()); + } else if ("failureReason".equals(fieldName)) { + deserializedServerlessEndpointResourceProperties.withFailureReason(reader.getString()); + } else if ("location".equals(fieldName)) { + deserializedServerlessEndpointResourceProperties.withLocation(reader.getString()); + } else if ("name".equals(fieldName)) { + deserializedServerlessEndpointResourceProperties.withName(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedServerlessEndpointResourceProperties + .withProvisioningState(DefaultResourceProvisioningState.fromString(reader.getString())); + } else if ("shouldCreateAiServicesEndpoint".equals(fieldName)) { + deserializedServerlessEndpointResourceProperties + .withShouldCreateAiServicesEndpoint(reader.getNullable(JsonReader::getBoolean)); + } else if ("endpointType".equals(fieldName)) { + deserializedServerlessEndpointResourceProperties.endpointType + = EndpointType.fromString(reader.getString()); + } else if ("authMode".equals(fieldName)) { + deserializedServerlessEndpointResourceProperties.authMode + = ServerlessInferenceEndpointAuthMode.fromString(reader.getString()); + } else if ("capacityReservation".equals(fieldName)) { + deserializedServerlessEndpointResourceProperties.capacityReservation + = ServerlessEndpointCapacityReservation.fromJson(reader); + } else if ("contentSafety".equals(fieldName)) { + deserializedServerlessEndpointResourceProperties.contentSafety + = ServerlessEndpointContentSafety.fromJson(reader); + } else if ("endpointState".equals(fieldName)) { + deserializedServerlessEndpointResourceProperties.endpointState + = ServerlessEndpointState.fromString(reader.getString()); + } else if ("inferenceEndpoint".equals(fieldName)) { + deserializedServerlessEndpointResourceProperties.inferenceEndpoint + = ServerlessEndpointInferenceEndpoint.fromJson(reader); + } else if ("marketplaceSubscriptionId".equals(fieldName)) { + deserializedServerlessEndpointResourceProperties.marketplaceSubscriptionId = reader.getString(); + } else if ("metadata".equals(fieldName)) { + deserializedServerlessEndpointResourceProperties.metadata = reader.readUntyped(); + } else if ("modelSettings".equals(fieldName)) { + deserializedServerlessEndpointResourceProperties.modelSettings + = ServerlessEndpointModelSettings.fromJson(reader); + } else if ("offer".equals(fieldName)) { + deserializedServerlessEndpointResourceProperties.offer = ServerlessOffer.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedServerlessEndpointResourceProperties; + }); + } +} 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 index a67ca4585e120..26f12015a9d2d 100644 --- 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 @@ -20,14 +20,14 @@ public final class ServerlessEndpointTrackedResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type ServerlessEndpoint. + * The link to the next page of ServerlessEndpoint objects. If null, there are no additional pages. */ - private List value; + private String nextLink; /* - * The link to the next page of ServerlessEndpoint objects. If null, there are no additional pages. + * An array of objects of type ServerlessEndpoint. */ - private String nextLink; + private List value; /** * Creates an instance of ServerlessEndpointTrackedResourceArmPaginatedResult class. @@ -36,44 +36,44 @@ public ServerlessEndpointTrackedResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type ServerlessEndpoint. + * Get the nextLink property: The link to the next page of ServerlessEndpoint objects. If null, there are no + * additional pages. * - * @return the value value. + * @return the nextLink value. */ - public List value() { - return this.value; + public String nextLink() { + return this.nextLink; } /** - * Set the value property: An array of objects of type ServerlessEndpoint. + * Set the nextLink property: The link to the next page of ServerlessEndpoint objects. If null, there are no + * additional pages. * - * @param value the value value to set. + * @param nextLink the nextLink value to set. * @return the ServerlessEndpointTrackedResourceArmPaginatedResult object itself. */ - public ServerlessEndpointTrackedResourceArmPaginatedResult withValue(List value) { - this.value = value; + public ServerlessEndpointTrackedResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; return this; } /** - * Get the nextLink property: The link to the next page of ServerlessEndpoint objects. If null, there are no - * additional pages. + * Get the value property: An array of objects of type ServerlessEndpoint. * - * @return the nextLink value. + * @return the value value. */ - public String nextLink() { - return this.nextLink; + public List value() { + return this.value; } /** - * Set the nextLink property: The link to the next page of ServerlessEndpoint objects. If null, there are no - * additional pages. + * Set the value property: An array of objects of type ServerlessEndpoint. * - * @param nextLink the nextLink value to set. + * @param value the value value to set. * @return the ServerlessEndpointTrackedResourceArmPaginatedResult object itself. */ - public ServerlessEndpointTrackedResourceArmPaginatedResult withNextLink(String nextLink) { - this.nextLink = nextLink; + public ServerlessEndpointTrackedResourceArmPaginatedResult withValue(List value) { + this.value = value; return this; } @@ -94,8 +94,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -116,12 +116,12 @@ public static ServerlessEndpointTrackedResourceArmPaginatedResult fromJson(JsonR String fieldName = reader.getFieldName(); reader.nextToken(); - if ("value".equals(fieldName)) { + if ("nextLink".equals(fieldName)) { + deserializedServerlessEndpointTrackedResourceArmPaginatedResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> ServerlessEndpointInner.fromJson(reader1)); deserializedServerlessEndpointTrackedResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedServerlessEndpointTrackedResourceArmPaginatedResult.nextLink = reader.getString(); } else { reader.skipChildren(); } 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 index 98103042d85e0..880b623cb51d5 100644 --- 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 @@ -19,14 +19,14 @@ @Fluent public final class ServerlessInferenceEndpoint implements JsonSerializable { /* - * [Required] The inference uri to target when making requests against the Serverless Endpoint. + * Specifies any required headers to target this serverless endpoint. */ - private String uri; + private Map headers; /* - * Specifies any required headers to target this serverless endpoint. + * [Required] The inference uri to target when making requests against the Serverless Endpoint. */ - private Map headers; + private String uri; /** * Creates an instance of ServerlessInferenceEndpoint class. @@ -34,6 +34,15 @@ public final class ServerlessInferenceEndpoint implements JsonSerializable headers() { + return this.headers; + } + /** * Get the uri property: [Required] The inference uri to target when making requests against the Serverless * Endpoint. @@ -56,15 +65,6 @@ public ServerlessInferenceEndpoint withUri(String uri) { return this; } - /** - * Get the headers property: Specifies any required headers to target this serverless endpoint. - * - * @return the headers value. - */ - public Map headers() { - return this.headers; - } - /** * Validates the instance. * 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 index 7dcd97bc44f81..ba3c87860af00 100644 --- 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 @@ -17,6 +17,16 @@ public final class ServerlessInferenceEndpointAuthMode */ public static final ServerlessInferenceEndpointAuthMode KEY = fromString("Key"); + /** + * Static value AAD for ServerlessInferenceEndpointAuthMode. + */ + public static final ServerlessInferenceEndpointAuthMode AAD = fromString("AAD"); + + /** + * Static value KeyAndAAD for ServerlessInferenceEndpointAuthMode. + */ + public static final ServerlessInferenceEndpointAuthMode KEY_AND_AAD = fromString("KeyAndAAD"); + /** * Creates a new instance of ServerlessInferenceEndpointAuthMode value. * 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..105c0fb3fa1c6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServerlessOffer.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The ServerlessOffer model. + */ +@Fluent +public final class ServerlessOffer implements JsonSerializable { + /* + * The offerName property. + */ + private String offerName; + + /* + * The publisher property. + */ + private String publisher; + + /** + * Creates an instance of ServerlessOffer class. + */ + public ServerlessOffer() { + } + + /** + * Get the offerName property: The offerName property. + * + * @return the offerName value. + */ + public String offerName() { + return this.offerName; + } + + /** + * Set the offerName property: The offerName property. + * + * @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: The publisher property. + * + * @return the publisher value. + */ + public String publisher() { + return this.publisher; + } + + /** + * Set the publisher property: The publisher property. + * + * @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.atError() + .log(new IllegalArgumentException("Missing required property offerName in model ServerlessOffer")); + } + if (publisher() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property publisher in model ServerlessOffer")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ServerlessOffer.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("offerName", this.offerName); + jsonWriter.writeStringField("publisher", this.publisher); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ServerlessOffer from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ServerlessOffer if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ServerlessOffer. + */ + public static ServerlessOffer fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ServerlessOffer deserializedServerlessOffer = new ServerlessOffer(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("offerName".equals(fieldName)) { + deserializedServerlessOffer.offerName = reader.getString(); + } else if ("publisher".equals(fieldName)) { + deserializedServerlessOffer.publisher = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedServerlessOffer; + }); + } +} 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..c304701d8f545 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceAccountKeyName.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import 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. + */ + 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/ServiceManagedResourcesSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceManagedResourcesSettings.java index 3d0853b9b566f..38ad300331ce6 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 @@ -17,7 +17,7 @@ @Fluent public final class ServiceManagedResourcesSettings implements JsonSerializable { /* - * The settings for the service managed cosmosdb account. + * The cosmosDb property. */ private CosmosDbSettings cosmosDb; @@ -28,7 +28,7 @@ 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. */ @@ -37,7 +37,7 @@ 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. 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 index 651ca1082d692..6c51e64d54d53 100644 --- 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 @@ -30,16 +30,6 @@ public final class ServicePrincipalAuthTypeWorkspaceConnectionProperties extends */ private WorkspaceConnectionServicePrincipal credentials; - /* - * The createdByWorkspaceArmId property. - */ - private String createdByWorkspaceArmId; - - /* - * Group based on connection category - */ - private ConnectionGroup group; - /** * Creates an instance of ServicePrincipalAuthTypeWorkspaceConnectionProperties class. */ @@ -78,31 +68,29 @@ public WorkspaceConnectionServicePrincipal credentials() { } /** - * Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. - * - * @return the createdByWorkspaceArmId value. + * {@inheritDoc} */ @Override - public String createdByWorkspaceArmId() { - return this.createdByWorkspaceArmId; + public ServicePrincipalAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { + super.withCategory(category); + return this; } /** - * Get the group property: Group based on connection category. - * - * @return the group value. + * {@inheritDoc} */ @Override - public ConnectionGroup group() { - return this.group; + public ServicePrincipalAuthTypeWorkspaceConnectionProperties withError(String error) { + super.withError(error); + return this; } /** * {@inheritDoc} */ @Override - public ServicePrincipalAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); + public ServicePrincipalAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { + super.withExpiryTime(expiryTime); return this; } @@ -110,8 +98,8 @@ public ServicePrincipalAuthTypeWorkspaceConnectionProperties withCategory(Connec * {@inheritDoc} */ @Override - public ServicePrincipalAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { - super.withExpiryTime(expiryTime); + public ServicePrincipalAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { + super.withIsSharedToAll(isSharedToAll); return this; } @@ -119,8 +107,8 @@ public ServicePrincipalAuthTypeWorkspaceConnectionProperties withExpiryTime(Offs * {@inheritDoc} */ @Override - public ServicePrincipalAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { - super.withIsSharedToAll(isSharedToAll); + public ServicePrincipalAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { + super.withMetadata(metadata); return this; } @@ -128,8 +116,8 @@ public ServicePrincipalAuthTypeWorkspaceConnectionProperties withIsSharedToAll(B * {@inheritDoc} */ @Override - public ServicePrincipalAuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); + public ServicePrincipalAuthTypeWorkspaceConnectionProperties withPeRequirement(ManagedPERequirement peRequirement) { + super.withPeRequirement(peRequirement); return this; } @@ -137,8 +125,8 @@ public ServicePrincipalAuthTypeWorkspaceConnectionProperties withTarget(String t * {@inheritDoc} */ @Override - public ServicePrincipalAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { - super.withMetadata(metadata); + public ServicePrincipalAuthTypeWorkspaceConnectionProperties withPeStatus(ManagedPEStatus peStatus) { + super.withPeStatus(peStatus); return this; } @@ -155,8 +143,8 @@ public ServicePrincipalAuthTypeWorkspaceConnectionProperties withSharedUserList( * {@inheritDoc} */ @Override - public ServicePrincipalAuthTypeWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); + public ServicePrincipalAuthTypeWorkspaceConnectionProperties withTarget(String target) { + super.withTarget(target); return this; } @@ -164,8 +152,9 @@ public ServicePrincipalAuthTypeWorkspaceConnectionProperties withValue(String va * {@inheritDoc} */ @Override - public ServicePrincipalAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); + public ServicePrincipalAuthTypeWorkspaceConnectionProperties + withUseWorkspaceManagedIdentity(Boolean useWorkspaceManagedIdentity) { + super.withUseWorkspaceManagedIdentity(useWorkspaceManagedIdentity); return this; } @@ -176,7 +165,6 @@ public ServicePrincipalAuthTypeWorkspaceConnectionProperties withValueFormat(Val */ @Override public void validate() { - super.validate(); if (credentials() != null) { credentials().validate(); } @@ -189,15 +177,17 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("category", category() == null ? null : category().toString()); + jsonWriter.writeStringField("error", error()); jsonWriter.writeStringField("expiryTime", expiryTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(expiryTime())); jsonWriter.writeBooleanField("isSharedToAll", isSharedToAll()); - jsonWriter.writeStringField("target", target()); jsonWriter.writeMapField("metadata", metadata(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("peRequirement", peRequirement() == null ? null : peRequirement().toString()); + jsonWriter.writeStringField("peStatus", peStatus() == null ? null : peStatus().toString()); jsonWriter.writeArrayField("sharedUserList", sharedUserList(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", value()); - jsonWriter.writeStringField("valueFormat", valueFormat() == null ? null : valueFormat().toString()); + jsonWriter.writeStringField("target", target()); + jsonWriter.writeBooleanField("useWorkspaceManagedIdentity", useWorkspaceManagedIdentity()); jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); jsonWriter.writeJsonField("credentials", this.credentials); return jsonWriter.writeEndObject(); @@ -224,31 +214,37 @@ public static ServicePrincipalAuthTypeWorkspaceConnectionProperties fromJson(Jso deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties .withCategory(ConnectionCategory.fromString(reader.getString())); } else if ("createdByWorkspaceArmId".equals(fieldName)) { - deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties.createdByWorkspaceArmId - = reader.getString(); + deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties + .withCreatedByWorkspaceArmId(reader.getString()); + } else if ("error".equals(fieldName)) { + deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties.withError(reader.getString()); } else if ("expiryTime".equals(fieldName)) { deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties.withExpiryTime(reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("group".equals(fieldName)) { - deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties.group - = ConnectionGroup.fromString(reader.getString()); + deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties + .withGroup(ConnectionGroup.fromString(reader.getString())); } else if ("isSharedToAll".equals(fieldName)) { deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties .withIsSharedToAll(reader.getNullable(JsonReader::getBoolean)); - } else if ("target".equals(fieldName)) { - deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); } else if ("metadata".equals(fieldName)) { Map metadata = reader.readMap(reader1 -> reader1.getString()); deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties.withMetadata(metadata); + } else if ("peRequirement".equals(fieldName)) { + deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties + .withPeRequirement(ManagedPERequirement.fromString(reader.getString())); + } else if ("peStatus".equals(fieldName)) { + deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties + .withPeStatus(ManagedPEStatus.fromString(reader.getString())); } else if ("sharedUserList".equals(fieldName)) { List sharedUserList = reader.readArray(reader1 -> reader1.getString()); deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties .withSharedUserList(sharedUserList); - } else if ("value".equals(fieldName)) { - deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties.withValue(reader.getString()); - } else if ("valueFormat".equals(fieldName)) { + } else if ("target".equals(fieldName)) { + deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); + } else if ("useWorkspaceManagedIdentity".equals(fieldName)) { deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties - .withValueFormat(ValueFormat.fromString(reader.getString())); + .withUseWorkspaceManagedIdentity(reader.getNullable(JsonReader::getBoolean)); } else if ("authType".equals(fieldName)) { deserializedServicePrincipalAuthTypeWorkspaceConnectionProperties.authType = ConnectionAuthType.fromString(reader.getString()); 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 66e170dda417d..3a31466e0a6d4 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 @@ -29,24 +29,24 @@ public final class ServicePrincipalDatastoreCredentials extends DatastoreCredent private String authorityUrl; /* - * Resource the service principal has access to. + * [Required] Service principal client ID. */ - private String resourceUrl; + private UUID clientId; /* - * [Required] ID of the tenant to which the service principal belongs. + * Resource the service principal has access to. */ - private UUID tenantId; + private String resourceUrl; /* - * [Required] Service principal client ID. + * [Required] Service principal secrets. */ - private UUID clientId; + private ServicePrincipalDatastoreSecrets secrets; /* - * [Required] Service principal secrets. + * [Required] ID of the tenant to which the service principal belongs. */ - private ServicePrincipalDatastoreSecrets secrets; + private UUID tenantId; /** * Creates an instance of ServicePrincipalDatastoreCredentials class. @@ -85,82 +85,82 @@ public ServicePrincipalDatastoreCredentials withAuthorityUrl(String authorityUrl } /** - * Get the resourceUrl property: Resource the service principal has access to. + * Get the clientId property: [Required] Service principal client ID. * - * @return the resourceUrl value. + * @return the clientId value. */ - public String resourceUrl() { - return this.resourceUrl; + public UUID clientId() { + return this.clientId; } /** - * Set the resourceUrl property: Resource the service principal has access to. + * Set the clientId property: [Required] Service principal client ID. * - * @param resourceUrl the resourceUrl value to set. + * @param clientId the clientId value to set. * @return the ServicePrincipalDatastoreCredentials object itself. */ - public ServicePrincipalDatastoreCredentials withResourceUrl(String resourceUrl) { - this.resourceUrl = resourceUrl; + public ServicePrincipalDatastoreCredentials withClientId(UUID clientId) { + this.clientId = clientId; return this; } /** - * Get the tenantId property: [Required] ID of the tenant to which the service principal belongs. + * Get the resourceUrl property: Resource the service principal has access to. * - * @return the tenantId value. + * @return the resourceUrl value. */ - public UUID tenantId() { - return this.tenantId; + public String resourceUrl() { + return this.resourceUrl; } /** - * Set the tenantId property: [Required] ID of the tenant to which the service principal belongs. + * Set the resourceUrl property: Resource the service principal has access to. * - * @param tenantId the tenantId value to set. + * @param resourceUrl the resourceUrl value to set. * @return the ServicePrincipalDatastoreCredentials object itself. */ - public ServicePrincipalDatastoreCredentials withTenantId(UUID tenantId) { - this.tenantId = tenantId; + public ServicePrincipalDatastoreCredentials withResourceUrl(String resourceUrl) { + this.resourceUrl = resourceUrl; return this; } /** - * Get the clientId property: [Required] Service principal client ID. + * Get the secrets property: [Required] Service principal secrets. * - * @return the clientId value. + * @return the secrets value. */ - public UUID clientId() { - return this.clientId; + public ServicePrincipalDatastoreSecrets secrets() { + return this.secrets; } /** - * Set the clientId property: [Required] Service principal client ID. + * Set the secrets property: [Required] Service principal secrets. * - * @param clientId the clientId value to set. + * @param secrets the secrets value to set. * @return the ServicePrincipalDatastoreCredentials object itself. */ - public ServicePrincipalDatastoreCredentials withClientId(UUID clientId) { - this.clientId = clientId; + public ServicePrincipalDatastoreCredentials withSecrets(ServicePrincipalDatastoreSecrets secrets) { + this.secrets = secrets; return this; } /** - * Get the secrets property: [Required] Service principal secrets. + * Get the tenantId property: [Required] ID of the tenant to which the service principal belongs. * - * @return the secrets value. + * @return the tenantId value. */ - public ServicePrincipalDatastoreSecrets secrets() { - return this.secrets; + public UUID tenantId() { + return this.tenantId; } /** - * Set the secrets property: [Required] Service principal secrets. + * Set the tenantId property: [Required] ID of the tenant to which the service principal belongs. * - * @param secrets the secrets value to set. + * @param tenantId the tenantId value to set. * @return the ServicePrincipalDatastoreCredentials object itself. */ - public ServicePrincipalDatastoreCredentials withSecrets(ServicePrincipalDatastoreSecrets secrets) { - this.secrets = secrets; + public ServicePrincipalDatastoreCredentials withTenantId(UUID tenantId) { + this.tenantId = tenantId; return this; } @@ -171,12 +171,6 @@ public ServicePrincipalDatastoreCredentials withSecrets(ServicePrincipalDatastor */ @Override public void validate() { - super.validate(); - if (tenantId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property tenantId in model ServicePrincipalDatastoreCredentials")); - } if (clientId() == null) { throw LOGGER.atError() .log(new IllegalArgumentException( @@ -189,6 +183,11 @@ public void validate() { } else { secrets().validate(); } + if (tenantId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property tenantId in model ServicePrincipalDatastoreCredentials")); + } } private static final ClientLogger LOGGER = new ClientLogger(ServicePrincipalDatastoreCredentials.class); @@ -199,9 +198,9 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("tenantId", Objects.toString(this.tenantId, null)); jsonWriter.writeStringField("clientId", Objects.toString(this.clientId, null)); jsonWriter.writeJsonField("secrets", this.secrets); + jsonWriter.writeStringField("tenantId", Objects.toString(this.tenantId, null)); jsonWriter.writeStringField("credentialsType", this.credentialsType == null ? null : this.credentialsType.toString()); jsonWriter.writeStringField("authorityUrl", this.authorityUrl); @@ -226,15 +225,15 @@ public static ServicePrincipalDatastoreCredentials fromJson(JsonReader jsonReade String fieldName = reader.getFieldName(); reader.nextToken(); - if ("tenantId".equals(fieldName)) { - deserializedServicePrincipalDatastoreCredentials.tenantId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); - } else if ("clientId".equals(fieldName)) { + if ("clientId".equals(fieldName)) { deserializedServicePrincipalDatastoreCredentials.clientId = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); } else if ("secrets".equals(fieldName)) { deserializedServicePrincipalDatastoreCredentials.secrets = ServicePrincipalDatastoreSecrets.fromJson(reader); + } else if ("tenantId".equals(fieldName)) { + deserializedServicePrincipalDatastoreCredentials.tenantId + = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); } else if ("credentialsType".equals(fieldName)) { deserializedServicePrincipalDatastoreCredentials.credentialsType = CredentialsType.fromString(reader.getString()); 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 98cbcf7f186db..bcf0526a88e23 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 @@ -69,7 +69,6 @@ public ServicePrincipalDatastoreSecrets withClientSecret(String clientSecret) { */ @Override public void validate() { - super.validate(); } /** 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 index a574a3eb61d6e..b375adb3d2145 100644 --- 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 @@ -77,6 +77,17 @@ public List addressPrefixes() { return this.addressPrefixes; } + /** + * Set the addressPrefixes property: Optional, if provided, the ServiceTag property will be ignored. + * + * @param addressPrefixes the addressPrefixes value to set. + * @return the ServiceTagDestination object itself. + */ + public ServiceTagDestination withAddressPrefixes(List addressPrefixes) { + this.addressPrefixes = addressPrefixes; + return this; + } + /** * Get the portRanges property: The portRanges property. * @@ -152,6 +163,8 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("action", this.action == null ? null : this.action.toString()); + jsonWriter.writeArrayField("addressPrefixes", this.addressPrefixes, + (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("portRanges", this.portRanges); jsonWriter.writeStringField("protocol", this.protocol); jsonWriter.writeStringField("serviceTag", this.serviceTag); 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 index 742b73db9dc8d..08be6e14fa2b9 100644 --- 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 @@ -9,6 +9,7 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.util.List; /** * Service Tag Outbound Rule for the managed network of a machine learning workspace. @@ -88,7 +89,6 @@ public ServiceTagOutboundRule withStatus(RuleStatus status) { */ @Override public void validate() { - super.validate(); if (destination() != null) { destination().validate(); } @@ -124,6 +124,9 @@ public static ServiceTagOutboundRule fromJson(JsonReader jsonReader) throws IOEx if ("category".equals(fieldName)) { deserializedServiceTagOutboundRule.withCategory(RuleCategory.fromString(reader.getString())); + } else if ("parentRuleNames".equals(fieldName)) { + List parentRuleNames = reader.readArray(reader1 -> reader1.getString()); + deserializedServiceTagOutboundRule.withParentRuleNames(parentRuleNames); } else if ("status".equals(fieldName)) { deserializedServiceTagOutboundRule.withStatus(RuleStatus.fromString(reader.getString())); } else if ("type".equals(fieldName)) { 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 06fbc71b599a7..2c01c5992df8e 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 @@ -18,12 +18,12 @@ @Fluent public final class SharedPrivateLinkResource implements JsonSerializable { /* - * Unique name of the private link. + * Unique name of the private link */ private String name; /* - * Resource properties. + * Properties of a shared private link resource. */ private SharedPrivateLinkResourceProperty innerProperties; @@ -54,7 +54,7 @@ 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. */ @@ -63,48 +63,48 @@ private SharedPrivateLinkResourceProperty innerProperties() { } /** - * Get the privateLinkResourceId property: The resource id that private link links to. + * Get the groupId property: group id of the private link. * - * @return the privateLinkResourceId value. + * @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. + * Set the groupId property: group id of the private link. * - * @param privateLinkResourceId the privateLinkResourceId value to set. + * @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. + * Get the privateLinkResourceId property: the resource id that private link links to. * - * @return the groupId value. + * @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. + * Set the privateLinkResourceId property: the resource id that private link links to. * - * @param groupId the groupId value to set. + * @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; } @@ -132,23 +132,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(); } 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 50bdf48a59fc5..cf50ad11c62d9 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 @@ -17,9 +17,9 @@ @Fluent public final class SkuCapacity implements JsonSerializable { /* - * Gets or sets the minimum. + * Gets or sets the default capacity. */ - private Integer minimum; + private Integer defaultProperty; /* * Gets or sets the maximum. @@ -27,9 +27,9 @@ public final class SkuCapacity implements JsonSerializable { private Integer maximum; /* - * Gets or sets the default capacity. + * Gets or sets the minimum. */ - private Integer defaultProperty; + private Integer minimum; /* * Gets or sets the type of the scale. @@ -43,22 +43,22 @@ public SkuCapacity() { } /** - * Get the minimum property: Gets or sets the minimum. + * Get the defaultProperty property: Gets or sets the default capacity. * - * @return the minimum value. + * @return the defaultProperty value. */ - public Integer minimum() { - return this.minimum; + public Integer defaultProperty() { + return this.defaultProperty; } /** - * Set the minimum property: Gets or sets the minimum. + * Set the defaultProperty property: Gets or sets the default capacity. * - * @param minimum the minimum value to set. + * @param defaultProperty the defaultProperty value to set. * @return the SkuCapacity object itself. */ - public SkuCapacity withMinimum(Integer minimum) { - this.minimum = minimum; + public SkuCapacity withDefaultProperty(Integer defaultProperty) { + this.defaultProperty = defaultProperty; return this; } @@ -83,22 +83,22 @@ public SkuCapacity withMaximum(Integer maximum) { } /** - * Get the defaultProperty property: Gets or sets the default capacity. + * Get the minimum property: Gets or sets the minimum. * - * @return the defaultProperty value. + * @return the minimum value. */ - public Integer defaultProperty() { - return this.defaultProperty; + public Integer minimum() { + return this.minimum; } /** - * Set the defaultProperty property: Gets or sets the default capacity. + * Set the minimum property: Gets or sets the minimum. * - * @param defaultProperty the defaultProperty value to set. + * @param minimum the minimum value to set. * @return the SkuCapacity object itself. */ - public SkuCapacity withDefaultProperty(Integer defaultProperty) { - this.defaultProperty = defaultProperty; + public SkuCapacity withMinimum(Integer minimum) { + this.minimum = minimum; return this; } @@ -136,9 +136,9 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("minimum", this.minimum); - jsonWriter.writeNumberField("maximum", this.maximum); jsonWriter.writeNumberField("default", this.defaultProperty); + jsonWriter.writeNumberField("maximum", this.maximum); + jsonWriter.writeNumberField("minimum", this.minimum); jsonWriter.writeStringField("scaleType", this.scaleType == null ? null : this.scaleType.toString()); return jsonWriter.writeEndObject(); } @@ -158,12 +158,12 @@ public static SkuCapacity fromJson(JsonReader jsonReader) throws IOException { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("minimum".equals(fieldName)) { - deserializedSkuCapacity.minimum = reader.getNullable(JsonReader::getInt); + if ("default".equals(fieldName)) { + deserializedSkuCapacity.defaultProperty = reader.getNullable(JsonReader::getInt); } else if ("maximum".equals(fieldName)) { deserializedSkuCapacity.maximum = reader.getNullable(JsonReader::getInt); - } else if ("default".equals(fieldName)) { - deserializedSkuCapacity.defaultProperty = reader.getNullable(JsonReader::getInt); + } else if ("minimum".equals(fieldName)) { + deserializedSkuCapacity.minimum = reader.getNullable(JsonReader::getInt); } else if ("scaleType".equals(fieldName)) { deserializedSkuCapacity.scaleType = SkuScaleType.fromString(reader.getString()); } else { 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 3bbd83fa8bb0f..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 @@ -10,6 +10,13 @@ * 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. * @@ -24,13 +31,6 @@ public interface SkuResource { */ SkuSetting sku(); - /** - * Gets the capacity property: Gets or sets the Sku Capacity. - * - * @return the capacity value. - */ - SkuCapacity capacity(); - /** * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner object. * 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 499c476bfaa54..55e7d73d06b2c 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 @@ -19,14 +19,14 @@ @Fluent public final class SkuResourceArmPaginatedResult implements JsonSerializable { /* - * An array of objects of type SkuResource. + * The link to the next page of SkuResource objects. If null, there are no additional pages. */ - private List value; + private String nextLink; /* - * The link to the next page of SkuResource objects. If null, there are no additional pages. + * An array of objects of type SkuResource. */ - private String nextLink; + private List value; /** * Creates an instance of SkuResourceArmPaginatedResult class. @@ -35,44 +35,44 @@ public SkuResourceArmPaginatedResult() { } /** - * Get the value property: An array of objects of type SkuResource. + * Get the nextLink property: The link to the next page of SkuResource objects. If null, there are no additional + * pages. * - * @return the value value. + * @return the nextLink value. */ - public List value() { - return this.value; + public String nextLink() { + return this.nextLink; } /** - * Set the value property: An array of objects of type SkuResource. + * Set the nextLink property: The link to the next page of SkuResource objects. If null, there are no additional + * pages. * - * @param value the value value to set. + * @param nextLink the nextLink value to set. * @return the SkuResourceArmPaginatedResult object itself. */ - public SkuResourceArmPaginatedResult withValue(List value) { - this.value = value; + public SkuResourceArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; return this; } /** - * Get the nextLink property: The link to the next page of SkuResource objects. If null, there are no additional - * pages. + * Get the value property: An array of objects of type SkuResource. * - * @return the nextLink value. + * @return the value value. */ - public String nextLink() { - return this.nextLink; + public List value() { + return this.value; } /** - * Set the nextLink property: The link to the next page of SkuResource objects. If null, there are no additional - * pages. + * Set the value property: An array of objects of type SkuResource. * - * @param nextLink the nextLink value to set. + * @param value the value value to set. * @return the SkuResourceArmPaginatedResult object itself. */ - public SkuResourceArmPaginatedResult withNextLink(String nextLink) { - this.nextLink = nextLink; + public SkuResourceArmPaginatedResult withValue(List value) { + this.value = value; return this; } @@ -93,8 +93,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -114,11 +114,11 @@ public static SkuResourceArmPaginatedResult fromJson(JsonReader jsonReader) thro String fieldName = reader.getFieldName(); reader.nextToken(); - if ("value".equals(fieldName)) { + if ("nextLink".equals(fieldName)) { + deserializedSkuResourceArmPaginatedResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> SkuResourceInner.fromJson(reader1)); deserializedSkuResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedSkuResourceArmPaginatedResult.nextLink = reader.getString(); } else { reader.skipChildren(); } 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 index ad1ddf074bc6c..b1099181e8a07 100644 --- 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 @@ -24,9 +24,9 @@ public final class SparkJob extends JobBaseProperties { private JobType jobType = JobType.SPARK; /* - * Compute Resource configuration for the job. + * Archive files used in the job. */ - private SparkResourceConfiguration resources; + private List archives; /* * Arguments for the job. @@ -38,6 +38,11 @@ public final class SparkJob extends JobBaseProperties { */ private String codeId; + /* + * Spark configured properties. + */ + private Map conf; + /* * [Required] The entry to execute on startup of the job. */ @@ -49,19 +54,19 @@ public final class SparkJob extends JobBaseProperties { private String environmentId; /* - * Mapping of input data bindings used in the job. + * Environment variables included in the job. */ - private Map inputs; + private Map environmentVariables; /* - * Mapping of output data bindings used in the job. + * Files used in the job. */ - private Map outputs; + private List files; /* - * Python files used in the job. + * Mapping of input data bindings used in the job. */ - private List pyFiles; + private Map inputs; /* * Jar files used in the job. @@ -69,19 +74,14 @@ public final class SparkJob extends JobBaseProperties { private List jars; /* - * Files used in the job. - */ - private List files; - - /* - * Archive files used in the job. + * Mapping of output data bindings used in the job. */ - private List archives; + private Map outputs; /* - * Spark configured properties. + * Python files used in the job. */ - private Map conf; + private List pyFiles; /* * Queue settings for the job @@ -89,14 +89,9 @@ public final class SparkJob extends JobBaseProperties { private QueueSettings queueSettings; /* - * Environment variables included in the job. - */ - private Map environmentVariables; - - /* - * Status of the job. + * Compute Resource configuration for the job. */ - private JobStatus status; + private SparkResourceConfiguration resources; /** * Creates an instance of SparkJob class. @@ -115,22 +110,22 @@ public JobType jobType() { } /** - * Get the resources property: Compute Resource configuration for the job. + * Get the archives property: Archive files used in the job. * - * @return the resources value. + * @return the archives value. */ - public SparkResourceConfiguration resources() { - return this.resources; + public List archives() { + return this.archives; } /** - * Set the resources property: Compute Resource configuration for the job. + * Set the archives property: Archive files used in the job. * - * @param resources the resources value to set. + * @param archives the archives value to set. * @return the SparkJob object itself. */ - public SparkJob withResources(SparkResourceConfiguration resources) { - this.resources = resources; + public SparkJob withArchives(List archives) { + this.archives = archives; return this; } @@ -174,6 +169,26 @@ public SparkJob withCodeId(String 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. * @@ -215,62 +230,62 @@ public SparkJob withEnvironmentId(String environmentId) { } /** - * Get the inputs property: Mapping of input data bindings used in the job. + * Get the environmentVariables property: Environment variables included in the job. * - * @return the inputs value. + * @return the environmentVariables value. */ - public Map inputs() { - return this.inputs; + public Map environmentVariables() { + return this.environmentVariables; } /** - * Set the inputs property: Mapping of input data bindings used in the job. + * Set the environmentVariables property: Environment variables included in the job. * - * @param inputs the inputs value to set. + * @param environmentVariables the environmentVariables value to set. * @return the SparkJob object itself. */ - public SparkJob withInputs(Map inputs) { - this.inputs = inputs; + public SparkJob withEnvironmentVariables(Map environmentVariables) { + this.environmentVariables = environmentVariables; return this; } /** - * Get the outputs property: Mapping of output data bindings used in the job. + * Get the files property: Files used in the job. * - * @return the outputs value. + * @return the files value. */ - public Map outputs() { - return this.outputs; + public List files() { + return this.files; } /** - * Set the outputs property: Mapping of output data bindings used in the job. + * Set the files property: Files used in the job. * - * @param outputs the outputs value to set. + * @param files the files value to set. * @return the SparkJob object itself. */ - public SparkJob withOutputs(Map outputs) { - this.outputs = outputs; + public SparkJob withFiles(List files) { + this.files = files; return this; } /** - * Get the pyFiles property: Python files used in the job. + * Get the inputs property: Mapping of input data bindings used in the job. * - * @return the pyFiles value. + * @return the inputs value. */ - public List pyFiles() { - return this.pyFiles; + public Map inputs() { + return this.inputs; } /** - * Set the pyFiles property: Python files used in the job. + * Set the inputs property: Mapping of input data bindings used in the job. * - * @param pyFiles the pyFiles value to set. + * @param inputs the inputs value to set. * @return the SparkJob object itself. */ - public SparkJob withPyFiles(List pyFiles) { - this.pyFiles = pyFiles; + public SparkJob withInputs(Map inputs) { + this.inputs = inputs; return this; } @@ -295,62 +310,42 @@ public SparkJob withJars(List jars) { } /** - * 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 archives property: Archive files used in the job. + * Get the outputs property: Mapping of output data bindings used in the job. * - * @return the archives value. + * @return the outputs value. */ - public List archives() { - return this.archives; + public Map outputs() { + return this.outputs; } /** - * Set the archives property: Archive files used in the job. + * Set the outputs property: Mapping of output data bindings used in the job. * - * @param archives the archives value to set. + * @param outputs the outputs value to set. * @return the SparkJob object itself. */ - public SparkJob withArchives(List archives) { - this.archives = archives; + public SparkJob withOutputs(Map outputs) { + this.outputs = outputs; return this; } /** - * Get the conf property: Spark configured properties. + * Get the pyFiles property: Python files used in the job. * - * @return the conf value. + * @return the pyFiles value. */ - public Map conf() { - return this.conf; + public List pyFiles() { + return this.pyFiles; } /** - * Set the conf property: Spark configured properties. + * Set the pyFiles property: Python files used in the job. * - * @param conf the conf value to set. + * @param pyFiles the pyFiles value to set. * @return the SparkJob object itself. */ - public SparkJob withConf(Map conf) { - this.conf = conf; + public SparkJob withPyFiles(List pyFiles) { + this.pyFiles = pyFiles; return this; } @@ -375,41 +370,40 @@ public SparkJob withQueueSettings(QueueSettings queueSettings) { } /** - * Get the environmentVariables property: Environment variables included in the job. + * Get the resources property: Compute Resource configuration for the job. * - * @return the environmentVariables value. + * @return the resources value. */ - public Map environmentVariables() { - return this.environmentVariables; + public SparkResourceConfiguration resources() { + return this.resources; } /** - * Set the environmentVariables property: Environment variables included in the job. + * Set the resources property: Compute Resource configuration for the job. * - * @param environmentVariables the environmentVariables value to set. + * @param resources the resources value to set. * @return the SparkJob object itself. */ - public SparkJob withEnvironmentVariables(Map environmentVariables) { - this.environmentVariables = environmentVariables; + public SparkJob withResources(SparkResourceConfiguration resources) { + this.resources = resources; return this; } /** - * Get the status property: Status of the job. - * - * @return the status value. + * {@inheritDoc} */ @Override - public JobStatus status() { - return this.status; + public SparkJob withComponentId(String componentId) { + super.withComponentId(componentId); + return this; } /** * {@inheritDoc} */ @Override - public SparkJob withDisplayName(String displayName) { - super.withDisplayName(displayName); + public SparkJob withComputeId(String computeId) { + super.withComputeId(computeId); return this; } @@ -417,8 +411,8 @@ public SparkJob withDisplayName(String displayName) { * {@inheritDoc} */ @Override - public SparkJob withExperimentName(String experimentName) { - super.withExperimentName(experimentName); + public SparkJob withDisplayName(String displayName) { + super.withDisplayName(displayName); return this; } @@ -426,8 +420,8 @@ public SparkJob withExperimentName(String experimentName) { * {@inheritDoc} */ @Override - public SparkJob withServices(Map services) { - super.withServices(services); + public SparkJob withExperimentName(String experimentName) { + super.withExperimentName(experimentName); return this; } @@ -435,8 +429,8 @@ public SparkJob withServices(Map services) { * {@inheritDoc} */ @Override - public SparkJob withComputeId(String computeId) { - super.withComputeId(computeId); + public SparkJob withIdentity(IdentityConfiguration identity) { + super.withIdentity(identity); return this; } @@ -453,8 +447,8 @@ public SparkJob withIsArchived(Boolean isArchived) { * {@inheritDoc} */ @Override - public SparkJob withIdentity(IdentityConfiguration identity) { - super.withIdentity(identity); + public SparkJob withNotificationSetting(NotificationSetting notificationSetting) { + super.withNotificationSetting(notificationSetting); return this; } @@ -462,8 +456,8 @@ public SparkJob withIdentity(IdentityConfiguration identity) { * {@inheritDoc} */ @Override - public SparkJob withComponentId(String componentId) { - super.withComponentId(componentId); + public SparkJob withParentJobName(String parentJobName) { + super.withParentJobName(parentJobName); return this; } @@ -471,8 +465,8 @@ public SparkJob withComponentId(String componentId) { * {@inheritDoc} */ @Override - public SparkJob withNotificationSetting(NotificationSetting notificationSetting) { - super.withNotificationSetting(notificationSetting); + public SparkJob withServices(Map services) { + super.withServices(services); return this; } @@ -489,8 +483,8 @@ public SparkJob withDescription(String description) { * {@inheritDoc} */ @Override - public SparkJob withTags(Map tags) { - super.withTags(tags); + public SparkJob withProperties(Map properties) { + super.withProperties(properties); return this; } @@ -498,8 +492,8 @@ public SparkJob withTags(Map tags) { * {@inheritDoc} */ @Override - public SparkJob withProperties(Map properties) { - super.withProperties(properties); + public SparkJob withTags(Map tags) { + super.withTags(tags); return this; } @@ -510,10 +504,6 @@ public SparkJob withProperties(Map properties) { */ @Override public void validate() { - super.validate(); - if (resources() != null) { - resources().validate(); - } if (codeId() == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property codeId in model SparkJob")); @@ -541,6 +531,22 @@ public void validate() { if (queueSettings() != null) { queueSettings().validate(); } + if (resources() != null) { + resources().validate(); + } + if (identity() != null) { + identity().validate(); + } + if (notificationSetting() != null) { + notificationSetting().validate(); + } + if (services() != null) { + services().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); + } } private static final ClientLogger LOGGER = new ClientLogger(SparkJob.class); @@ -552,32 +558,33 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("componentId", componentId()); + jsonWriter.writeStringField("computeId", computeId()); jsonWriter.writeStringField("displayName", displayName()); jsonWriter.writeStringField("experimentName", experimentName()); - jsonWriter.writeMapField("services", services(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("computeId", computeId()); - jsonWriter.writeBooleanField("isArchived", isArchived()); jsonWriter.writeJsonField("identity", identity()); - jsonWriter.writeStringField("componentId", componentId()); + jsonWriter.writeBooleanField("isArchived", isArchived()); jsonWriter.writeJsonField("notificationSetting", notificationSetting()); + jsonWriter.writeStringField("parentJobName", parentJobName()); + jsonWriter.writeMapField("services", services(), (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("codeId", this.codeId); jsonWriter.writeJsonField("entry", this.entry); jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); - jsonWriter.writeJsonField("resources", this.resources); + jsonWriter.writeArrayField("archives", this.archives, (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("args", this.args); + jsonWriter.writeMapField("conf", this.conf, (writer, element) -> writer.writeString(element)); jsonWriter.writeStringField("environmentId", this.environmentId); + jsonWriter.writeMapField("environmentVariables", this.environmentVariables, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("files", this.files, (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("inputs", this.inputs, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("jars", this.jars, (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("outputs", this.outputs, (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("pyFiles", this.pyFiles, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("jars", this.jars, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("files", this.files, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("archives", this.archives, (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("conf", this.conf, (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("queueSettings", this.queueSettings); - jsonWriter.writeMapField("environmentVariables", this.environmentVariables, - (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("resources", this.resources); return jsonWriter.writeEndObject(); } @@ -599,69 +606,71 @@ public static SparkJob fromJson(JsonReader jsonReader) throws IOException { if ("description".equals(fieldName)) { deserializedSparkJob.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedSparkJob.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedSparkJob.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedSparkJob.withTags(tags); + } else if ("componentId".equals(fieldName)) { + deserializedSparkJob.withComponentId(reader.getString()); + } else if ("computeId".equals(fieldName)) { + deserializedSparkJob.withComputeId(reader.getString()); } else if ("displayName".equals(fieldName)) { deserializedSparkJob.withDisplayName(reader.getString()); - } else if ("status".equals(fieldName)) { - deserializedSparkJob.status = JobStatus.fromString(reader.getString()); } else if ("experimentName".equals(fieldName)) { deserializedSparkJob.withExperimentName(reader.getString()); - } else if ("services".equals(fieldName)) { - Map services = reader.readMap(reader1 -> JobService.fromJson(reader1)); - deserializedSparkJob.withServices(services); - } else if ("computeId".equals(fieldName)) { - deserializedSparkJob.withComputeId(reader.getString()); - } else if ("isArchived".equals(fieldName)) { - deserializedSparkJob.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("identity".equals(fieldName)) { deserializedSparkJob.withIdentity(IdentityConfiguration.fromJson(reader)); - } else if ("componentId".equals(fieldName)) { - deserializedSparkJob.withComponentId(reader.getString()); + } else if ("isArchived".equals(fieldName)) { + deserializedSparkJob.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("notificationSetting".equals(fieldName)) { deserializedSparkJob.withNotificationSetting(NotificationSetting.fromJson(reader)); + } else if ("parentJobName".equals(fieldName)) { + deserializedSparkJob.withParentJobName(reader.getString()); + } else if ("services".equals(fieldName)) { + Map services = reader.readMap(reader1 -> JobService.fromJson(reader1)); + deserializedSparkJob.withServices(services); + } else if ("status".equals(fieldName)) { + deserializedSparkJob.withStatus(JobStatus.fromString(reader.getString())); } else if ("codeId".equals(fieldName)) { deserializedSparkJob.codeId = reader.getString(); } else if ("entry".equals(fieldName)) { deserializedSparkJob.entry = SparkJobEntry.fromJson(reader); } else if ("jobType".equals(fieldName)) { deserializedSparkJob.jobType = JobType.fromString(reader.getString()); - } else if ("resources".equals(fieldName)) { - deserializedSparkJob.resources = SparkResourceConfiguration.fromJson(reader); + } else if ("archives".equals(fieldName)) { + List archives = reader.readArray(reader1 -> reader1.getString()); + deserializedSparkJob.archives = archives; } else if ("args".equals(fieldName)) { deserializedSparkJob.args = reader.getString(); + } else if ("conf".equals(fieldName)) { + Map conf = reader.readMap(reader1 -> reader1.getString()); + deserializedSparkJob.conf = conf; } else if ("environmentId".equals(fieldName)) { deserializedSparkJob.environmentId = reader.getString(); + } else if ("environmentVariables".equals(fieldName)) { + Map environmentVariables = reader.readMap(reader1 -> reader1.getString()); + deserializedSparkJob.environmentVariables = environmentVariables; + } else if ("files".equals(fieldName)) { + List files = reader.readArray(reader1 -> reader1.getString()); + deserializedSparkJob.files = files; } else if ("inputs".equals(fieldName)) { Map inputs = reader.readMap(reader1 -> JobInput.fromJson(reader1)); deserializedSparkJob.inputs = inputs; + } else if ("jars".equals(fieldName)) { + List jars = reader.readArray(reader1 -> reader1.getString()); + deserializedSparkJob.jars = jars; } else if ("outputs".equals(fieldName)) { Map outputs = reader.readMap(reader1 -> JobOutput.fromJson(reader1)); deserializedSparkJob.outputs = outputs; } else if ("pyFiles".equals(fieldName)) { List pyFiles = reader.readArray(reader1 -> reader1.getString()); deserializedSparkJob.pyFiles = pyFiles; - } else if ("jars".equals(fieldName)) { - List jars = reader.readArray(reader1 -> reader1.getString()); - deserializedSparkJob.jars = jars; - } else if ("files".equals(fieldName)) { - List files = reader.readArray(reader1 -> reader1.getString()); - deserializedSparkJob.files = files; - } else if ("archives".equals(fieldName)) { - List archives = reader.readArray(reader1 -> reader1.getString()); - deserializedSparkJob.archives = archives; - } else if ("conf".equals(fieldName)) { - Map conf = reader.readMap(reader1 -> reader1.getString()); - deserializedSparkJob.conf = conf; } else if ("queueSettings".equals(fieldName)) { deserializedSparkJob.queueSettings = QueueSettings.fromJson(reader); - } else if ("environmentVariables".equals(fieldName)) { - Map environmentVariables = reader.readMap(reader1 -> reader1.getString()); - deserializedSparkJob.environmentVariables = environmentVariables; + } else if ("resources".equals(fieldName)) { + deserializedSparkJob.resources = SparkResourceConfiguration.fromJson(reader); } else { reader.skipChildren(); } 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 index c2db6133028f7..d8e1313a5199f 100644 --- 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 @@ -69,7 +69,6 @@ public SparkJobPythonEntry withFile(String file) { */ @Override public void validate() { - super.validate(); if (file() == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property file in model SparkJobPythonEntry")); 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 index e735204c3b6d5..5813adaa2fe07 100644 --- 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 @@ -69,7 +69,6 @@ public SparkJobScalaEntry withClassName(String className) { */ @Override public void validate() { - super.validate(); if (className() == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property className in model SparkJobScalaEntry")); 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..d7224880e9b5d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SpeechEndpointDeploymentResourceProperties.java @@ -0,0 +1,229 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the 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.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The SpeechEndpointDeploymentResourceProperties model. + */ +@Fluent +public final class SpeechEndpointDeploymentResourceProperties extends EndpointDeploymentResourceProperties { + /* + * Kind of the deployment. + */ + private String type = "Azure.Speech"; + + /* + * Model used for the endpoint deployment. + */ + private EndpointDeploymentModel model; + + /* + * The name of RAI policy. + */ + private String raiPolicyName; + + /* + * The sku property. + */ + private CognitiveServicesSku sku; + + /* + * Deployment model version upgrade option. + */ + private DeploymentModelVersionUpgradeOption versionUpgradeOption; + + /** + * Creates an instance of SpeechEndpointDeploymentResourceProperties class. + */ + public SpeechEndpointDeploymentResourceProperties() { + } + + /** + * Get the type property: Kind of the deployment. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * 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() { + if (model() == null) { + throw LOGGER.atError() + .log(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); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("failureReason", failureReason()); + jsonWriter.writeJsonField("model", this.model); + jsonWriter.writeStringField("type", this.type); + jsonWriter.writeStringField("raiPolicyName", this.raiPolicyName); + jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeStringField("versionUpgradeOption", + this.versionUpgradeOption == null ? null : this.versionUpgradeOption.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SpeechEndpointDeploymentResourceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SpeechEndpointDeploymentResourceProperties if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the SpeechEndpointDeploymentResourceProperties. + */ + public static SpeechEndpointDeploymentResourceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SpeechEndpointDeploymentResourceProperties deserializedSpeechEndpointDeploymentResourceProperties + = new SpeechEndpointDeploymentResourceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("failureReason".equals(fieldName)) { + deserializedSpeechEndpointDeploymentResourceProperties.withFailureReason(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedSpeechEndpointDeploymentResourceProperties + .withProvisioningState(DefaultResourceProvisioningState.fromString(reader.getString())); + } else if ("model".equals(fieldName)) { + deserializedSpeechEndpointDeploymentResourceProperties.model + = EndpointDeploymentModel.fromJson(reader); + } else if ("type".equals(fieldName)) { + deserializedSpeechEndpointDeploymentResourceProperties.type = reader.getString(); + } else if ("raiPolicyName".equals(fieldName)) { + deserializedSpeechEndpointDeploymentResourceProperties.raiPolicyName = reader.getString(); + } else if ("sku".equals(fieldName)) { + deserializedSpeechEndpointDeploymentResourceProperties.sku = CognitiveServicesSku.fromJson(reader); + } else if ("versionUpgradeOption".equals(fieldName)) { + deserializedSpeechEndpointDeploymentResourceProperties.versionUpgradeOption + = DeploymentModelVersionUpgradeOption.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedSpeechEndpointDeploymentResourceProperties; + }); + } +} 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..9cfed32d1810d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SpeechEndpointResourceProperties.java @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; +import java.io.IOException; +import java.util.List; + +/** + * The SpeechEndpointResourceProperties model. + */ +@Fluent +public final class SpeechEndpointResourceProperties extends EndpointResourceProperties { + /* + * Type of the endpoint. + */ + private EndpointType endpointType = EndpointType.AZURE_SPEECH; + + /** + * Creates an instance of SpeechEndpointResourceProperties class. + */ + public SpeechEndpointResourceProperties() { + } + + /** + * Get the endpointType property: Type of the endpoint. + * + * @return the endpointType value. + */ + @Override + public EndpointType endpointType() { + return this.endpointType; + } + + /** + * {@inheritDoc} + */ + @Override + public SpeechEndpointResourceProperties withAssociatedResourceId(String associatedResourceId) { + super.withAssociatedResourceId(associatedResourceId); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SpeechEndpointResourceProperties + withDeployments(List deployments) { + super.withDeployments(deployments); + 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 withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SpeechEndpointResourceProperties withName(String name) { + super.withName(name); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SpeechEndpointResourceProperties withShouldCreateAiServicesEndpoint(Boolean shouldCreateAiServicesEndpoint) { + super.withShouldCreateAiServicesEndpoint(shouldCreateAiServicesEndpoint); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (deployments() != null) { + deployments().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("associatedResourceId", associatedResourceId()); + jsonWriter.writeArrayField("deployments", deployments(), (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("endpointUri", endpointUri()); + jsonWriter.writeStringField("failureReason", failureReason()); + jsonWriter.writeStringField("location", location()); + jsonWriter.writeStringField("name", name()); + jsonWriter.writeBooleanField("shouldCreateAiServicesEndpoint", shouldCreateAiServicesEndpoint()); + jsonWriter.writeStringField("endpointType", this.endpointType == null ? null : this.endpointType.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SpeechEndpointResourceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SpeechEndpointResourceProperties if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the SpeechEndpointResourceProperties. + */ + public static SpeechEndpointResourceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SpeechEndpointResourceProperties deserializedSpeechEndpointResourceProperties + = new SpeechEndpointResourceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("associatedResourceId".equals(fieldName)) { + deserializedSpeechEndpointResourceProperties.withAssociatedResourceId(reader.getString()); + } else if ("deployments".equals(fieldName)) { + List deployments = reader + .readArray(reader1 -> EndpointDeploymentResourcePropertiesBasicResourceInner.fromJson(reader1)); + deserializedSpeechEndpointResourceProperties.withDeployments(deployments); + } else if ("endpointUri".equals(fieldName)) { + deserializedSpeechEndpointResourceProperties.withEndpointUri(reader.getString()); + } else if ("failureReason".equals(fieldName)) { + deserializedSpeechEndpointResourceProperties.withFailureReason(reader.getString()); + } else if ("location".equals(fieldName)) { + deserializedSpeechEndpointResourceProperties.withLocation(reader.getString()); + } else if ("name".equals(fieldName)) { + deserializedSpeechEndpointResourceProperties.withName(reader.getString()); + } else if ("provisioningState".equals(fieldName)) { + deserializedSpeechEndpointResourceProperties + .withProvisioningState(DefaultResourceProvisioningState.fromString(reader.getString())); + } else if ("shouldCreateAiServicesEndpoint".equals(fieldName)) { + deserializedSpeechEndpointResourceProperties + .withShouldCreateAiServicesEndpoint(reader.getNullable(JsonReader::getBoolean)); + } else if ("endpointType".equals(fieldName)) { + deserializedSpeechEndpointResourceProperties.endpointType + = EndpointType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedSpeechEndpointResourceProperties; + }); + } +} 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 ed6bf75444c28..45bd7e5004b7f 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 @@ -17,9 +17,9 @@ @Fluent public final class StackEnsembleSettings implements JsonSerializable { /* - * The meta-learner is a model trained on the output of the individual heterogeneous models. + * Optional parameters to pass to the initializer of the meta-learner. */ - private StackMetaLearnerType stackMetaLearnerType; + private Object stackMetaLearnerKWargs; /* * Specifies the proportion of the training set (when choosing train and validation type of training) to be reserved @@ -28,9 +28,9 @@ public final class StackEnsembleSettings implements JsonSerializable columns) { + super.withColumns(columns); return this; } @@ -129,8 +129,8 @@ public StaticInputData withDataContext(String dataContext) { * {@inheritDoc} */ @Override - public StaticInputData withJobInputType(JobInputType jobInputType) { - super.withJobInputType(jobInputType); + public StaticInputData withDataContext(String dataContext) { + super.withDataContext(dataContext); return this; } @@ -138,8 +138,8 @@ public StaticInputData withJobInputType(JobInputType jobInputType) { * {@inheritDoc} */ @Override - public StaticInputData withUri(String uri) { - super.withUri(uri); + public StaticInputData withJobInputType(JobInputType jobInputType) { + super.withJobInputType(jobInputType); return this; } @@ -147,8 +147,8 @@ public StaticInputData withUri(String uri) { * {@inheritDoc} */ @Override - public StaticInputData withColumns(Map columns) { - super.withColumns(columns); + public StaticInputData withUri(String uri) { + super.withUri(uri); return this; } @@ -159,14 +159,21 @@ public StaticInputData withColumns(Map columns) { */ @Override public void validate() { - super.validate(); + if (windowEnd() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property windowEnd in model StaticInputData")); + } if (windowStart() == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property windowStart in model StaticInputData")); } - if (windowEnd() == null) { + if (jobInputType() == null) { throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property windowEnd in model StaticInputData")); + .log(new IllegalArgumentException("Missing required property jobInputType in model StaticInputData")); + } + if (uri() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property uri in model StaticInputData")); } } @@ -180,12 +187,12 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("jobInputType", jobInputType() == null ? null : jobInputType().toString()); jsonWriter.writeStringField("uri", uri()); - jsonWriter.writeStringField("dataContext", dataContext()); jsonWriter.writeMapField("columns", columns(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("windowStart", - this.windowStart == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.windowStart)); + jsonWriter.writeStringField("dataContext", dataContext()); jsonWriter.writeStringField("windowEnd", this.windowEnd == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.windowEnd)); + jsonWriter.writeStringField("windowStart", + this.windowStart == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.windowStart)); jsonWriter.writeStringField("inputDataType", this.inputDataType == null ? null : this.inputDataType.toString()); jsonWriter.writeStringField("preprocessingComponentId", this.preprocessingComponentId); return jsonWriter.writeEndObject(); @@ -211,17 +218,17 @@ public static StaticInputData fromJson(JsonReader jsonReader) throws IOException deserializedStaticInputData.withJobInputType(JobInputType.fromString(reader.getString())); } else if ("uri".equals(fieldName)) { deserializedStaticInputData.withUri(reader.getString()); - } else if ("dataContext".equals(fieldName)) { - deserializedStaticInputData.withDataContext(reader.getString()); } else if ("columns".equals(fieldName)) { Map columns = reader.readMap(reader1 -> reader1.getString()); deserializedStaticInputData.withColumns(columns); - } else if ("windowStart".equals(fieldName)) { - deserializedStaticInputData.windowStart = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("dataContext".equals(fieldName)) { + deserializedStaticInputData.withDataContext(reader.getString()); } else if ("windowEnd".equals(fieldName)) { deserializedStaticInputData.windowEnd = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("windowStart".equals(fieldName)) { + deserializedStaticInputData.windowStart = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("inputDataType".equals(fieldName)) { deserializedStaticInputData.inputDataType = MonitoringInputDataType.fromString(reader.getString()); } else if ("preprocessingComponentId".equals(fieldName)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StringArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StringArmPaginatedResult.java new file mode 100644 index 0000000000000..41715d528814c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StringArmPaginatedResult.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.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * A paginated list of String entities. + */ +@Fluent +public final class StringArmPaginatedResult implements JsonSerializable { + /* + * The link to the next page of String objects. If null, there are no additional pages. + */ + private String nextLink; + + /* + * An array of objects of type String. + */ + private List value; + + /** + * Creates an instance of StringArmPaginatedResult class. + */ + public StringArmPaginatedResult() { + } + + /** + * Get the nextLink property: The link to the next page of String 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 String objects. If null, there are no additional pages. + * + * @param nextLink the nextLink value to set. + * @return the StringArmPaginatedResult object itself. + */ + public StringArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Get the value property: An array of objects of type String. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: An array of objects of type String. + * + * @param value the value value to set. + * @return the StringArmPaginatedResult object itself. + */ + public StringArmPaginatedResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StringArmPaginatedResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StringArmPaginatedResult if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the StringArmPaginatedResult. + */ + public static StringArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StringArmPaginatedResult deserializedStringArmPaginatedResult = new StringArmPaginatedResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nextLink".equals(fieldName)) { + deserializedStringArmPaginatedResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { + List value = reader.readArray(reader1 -> reader1.getString()); + deserializedStringArmPaginatedResult.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedStringArmPaginatedResult; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StringKeyValuePair.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StringKeyValuePair.java new file mode 100644 index 0000000000000..79ba4178026e7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StringKeyValuePair.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The StringKeyValuePair model. + */ +@Fluent +public final class StringKeyValuePair implements JsonSerializable { + /* + * The key property. + */ + private String key; + + /* + * The value property. + */ + private String value; + + /** + * Creates an instance of StringKeyValuePair class. + */ + public StringKeyValuePair() { + } + + /** + * 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 StringKeyValuePair object itself. + */ + public StringKeyValuePair withKey(String key) { + this.key = key; + return this; + } + + /** + * Get the value property: The value property. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: The value property. + * + * @param value the value value to set. + * @return the StringKeyValuePair object itself. + */ + public StringKeyValuePair withValue(String value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("key", this.key); + jsonWriter.writeStringField("value", this.value); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StringKeyValuePair from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StringKeyValuePair if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the StringKeyValuePair. + */ + public static StringKeyValuePair fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StringKeyValuePair deserializedStringKeyValuePair = new StringKeyValuePair(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("key".equals(fieldName)) { + deserializedStringKeyValuePair.key = reader.getString(); + } else if ("value".equals(fieldName)) { + deserializedStringKeyValuePair.value = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedStringKeyValuePair; + }); + } +} 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 b5679fa6f668a..c5788d2a356b9 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 @@ -23,55 +23,50 @@ public final class SweepJob extends JobBaseProperties { private JobType jobType = JobType.SWEEP; /* - * [Required] A dictionary containing each parameter and its distribution. The dictionary key is the name of the - * parameter + * Early termination policies enable canceling poor-performing runs before they complete */ - private Object searchSpace; + private EarlyTerminationPolicy earlyTermination; /* - * [Required] The hyperparameter sampling algorithm + * Mapping of input data bindings used in the job. */ - private SamplingAlgorithm samplingAlgorithm; + private Map inputs; /* * Sweep Job limit. */ private SweepJobLimits limits; - /* - * Early termination policies enable canceling poor-performing runs before they complete - */ - private EarlyTerminationPolicy earlyTermination; - /* * [Required] Optimization objective. */ private Objective objective; /* - * [Required] Trial component definition. + * Mapping of output data bindings used in the job. */ - private TrialComponent trial; + private Map outputs; /* - * Mapping of input data bindings used in the job. + * Queue settings for the job */ - private Map inputs; + private QueueSettings queueSettings; /* - * Mapping of output data bindings used in the job. + * [Required] The hyperparameter sampling algorithm */ - private Map outputs; + private SamplingAlgorithm samplingAlgorithm; /* - * Queue settings for the job + * [Required] A dictionary containing each parameter and its distribution. The dictionary key is the name of the + * parameter */ - private QueueSettings queueSettings; + private Object searchSpace; /* - * Status of the job. + * [Required] Trial component definition. */ - private JobStatus status; + private TrialComponent trial; /** * Creates an instance of SweepJob class. @@ -90,44 +85,44 @@ public JobType jobType() { } /** - * Get the searchSpace property: [Required] A dictionary containing each parameter and its distribution. The - * dictionary key is the name of the parameter. + * Get the earlyTermination property: Early termination policies enable canceling poor-performing runs before they + * complete. * - * @return the searchSpace value. + * @return the earlyTermination value. */ - public Object searchSpace() { - return this.searchSpace; + public EarlyTerminationPolicy earlyTermination() { + return this.earlyTermination; } /** - * Set the searchSpace property: [Required] A dictionary containing each parameter and its distribution. The - * dictionary key is the name of the parameter. + * Set the earlyTermination property: Early termination policies enable canceling poor-performing runs before they + * complete. * - * @param searchSpace the searchSpace value to set. + * @param earlyTermination the earlyTermination value to set. * @return the SweepJob object itself. */ - public SweepJob withSearchSpace(Object searchSpace) { - this.searchSpace = searchSpace; + public SweepJob withEarlyTermination(EarlyTerminationPolicy earlyTermination) { + this.earlyTermination = earlyTermination; return this; } /** - * Get the samplingAlgorithm property: [Required] The hyperparameter sampling algorithm. + * Get the inputs property: Mapping of input data bindings used in the job. * - * @return the samplingAlgorithm value. + * @return the inputs value. */ - public SamplingAlgorithm samplingAlgorithm() { - return this.samplingAlgorithm; + public Map inputs() { + return this.inputs; } /** - * Set the samplingAlgorithm property: [Required] The hyperparameter sampling algorithm. + * Set the inputs property: Mapping of input data bindings used in the job. * - * @param samplingAlgorithm the samplingAlgorithm value to set. + * @param inputs the inputs value to set. * @return the SweepJob object itself. */ - public SweepJob withSamplingAlgorithm(SamplingAlgorithm samplingAlgorithm) { - this.samplingAlgorithm = samplingAlgorithm; + public SweepJob withInputs(Map inputs) { + this.inputs = inputs; return this; } @@ -152,143 +147,142 @@ public SweepJob withLimits(SweepJobLimits limits) { } /** - * Get the earlyTermination property: Early termination policies enable canceling poor-performing runs before they - * complete. + * Get the objective property: [Required] Optimization objective. * - * @return the earlyTermination value. + * @return the objective value. */ - public EarlyTerminationPolicy earlyTermination() { - return this.earlyTermination; + public Objective objective() { + return this.objective; } /** - * Set the earlyTermination property: Early termination policies enable canceling poor-performing runs before they - * complete. + * Set the objective property: [Required] Optimization objective. * - * @param earlyTermination the earlyTermination value to set. + * @param objective the objective value to set. * @return the SweepJob object itself. */ - public SweepJob withEarlyTermination(EarlyTerminationPolicy earlyTermination) { - this.earlyTermination = earlyTermination; + public SweepJob withObjective(Objective objective) { + this.objective = objective; return this; } /** - * Get the objective property: [Required] Optimization objective. + * Get the outputs property: Mapping of output data bindings used in the job. * - * @return the objective value. + * @return the outputs value. */ - public Objective objective() { - return this.objective; + public Map outputs() { + return this.outputs; } /** - * Set the objective property: [Required] Optimization objective. + * Set the outputs property: Mapping of output data bindings used in the job. * - * @param objective the objective value to set. + * @param outputs the outputs value to set. * @return the SweepJob object itself. */ - public SweepJob withObjective(Objective objective) { - this.objective = objective; + public SweepJob withOutputs(Map outputs) { + this.outputs = outputs; return this; } /** - * Get the trial property: [Required] Trial component definition. + * Get the queueSettings property: Queue settings for the job. * - * @return the trial value. + * @return the queueSettings value. */ - public TrialComponent trial() { - return this.trial; + public QueueSettings queueSettings() { + return this.queueSettings; } /** - * Set the trial property: [Required] Trial component definition. + * Set the queueSettings property: Queue settings for the job. * - * @param trial the trial value to set. + * @param queueSettings the queueSettings value to set. * @return the SweepJob object itself. */ - public SweepJob withTrial(TrialComponent trial) { - this.trial = trial; + public SweepJob withQueueSettings(QueueSettings queueSettings) { + this.queueSettings = queueSettings; return this; } /** - * Get the inputs property: Mapping of input data bindings used in the job. + * Get the samplingAlgorithm property: [Required] The hyperparameter sampling algorithm. * - * @return the inputs value. + * @return the samplingAlgorithm value. */ - public Map inputs() { - return this.inputs; + public SamplingAlgorithm samplingAlgorithm() { + return this.samplingAlgorithm; } /** - * Set the inputs property: Mapping of input data bindings used in the job. + * Set the samplingAlgorithm property: [Required] The hyperparameter sampling algorithm. * - * @param inputs the inputs value to set. + * @param samplingAlgorithm the samplingAlgorithm value to set. * @return the SweepJob object itself. */ - public SweepJob withInputs(Map inputs) { - this.inputs = inputs; + public SweepJob withSamplingAlgorithm(SamplingAlgorithm samplingAlgorithm) { + this.samplingAlgorithm = samplingAlgorithm; return this; } /** - * Get the outputs property: Mapping of output data bindings used in the job. + * Get the searchSpace property: [Required] A dictionary containing each parameter and its distribution. The + * dictionary key is the name of the parameter. * - * @return the outputs value. + * @return the searchSpace value. */ - public Map outputs() { - return this.outputs; + public Object searchSpace() { + return this.searchSpace; } /** - * Set the outputs property: Mapping of output data bindings used in the job. + * Set the searchSpace property: [Required] A dictionary containing each parameter and its distribution. The + * dictionary key is the name of the parameter. * - * @param outputs the outputs value to set. + * @param searchSpace the searchSpace value to set. * @return the SweepJob object itself. */ - public SweepJob withOutputs(Map outputs) { - this.outputs = outputs; + public SweepJob withSearchSpace(Object searchSpace) { + this.searchSpace = searchSpace; return this; } /** - * Get the queueSettings property: Queue settings for the job. + * Get the trial property: [Required] Trial component definition. * - * @return the queueSettings value. + * @return the trial value. */ - public QueueSettings queueSettings() { - return this.queueSettings; + public TrialComponent trial() { + return this.trial; } /** - * Set the queueSettings property: Queue settings for the job. + * Set the trial property: [Required] Trial component definition. * - * @param queueSettings the queueSettings value to set. + * @param trial the trial value to set. * @return the SweepJob object itself. */ - public SweepJob withQueueSettings(QueueSettings queueSettings) { - this.queueSettings = queueSettings; + public SweepJob withTrial(TrialComponent trial) { + this.trial = trial; return this; } /** - * Get the status property: Status of the job. - * - * @return the status value. + * {@inheritDoc} */ @Override - public JobStatus status() { - return this.status; + public SweepJob withComponentId(String componentId) { + super.withComponentId(componentId); + return this; } /** * {@inheritDoc} */ @Override - public SweepJob withDisplayName(String displayName) { - super.withDisplayName(displayName); + public SweepJob withComputeId(String computeId) { + super.withComputeId(computeId); return this; } @@ -296,8 +290,8 @@ public SweepJob withDisplayName(String displayName) { * {@inheritDoc} */ @Override - public SweepJob withExperimentName(String experimentName) { - super.withExperimentName(experimentName); + public SweepJob withDisplayName(String displayName) { + super.withDisplayName(displayName); return this; } @@ -305,8 +299,8 @@ public SweepJob withExperimentName(String experimentName) { * {@inheritDoc} */ @Override - public SweepJob withServices(Map services) { - super.withServices(services); + public SweepJob withExperimentName(String experimentName) { + super.withExperimentName(experimentName); return this; } @@ -314,8 +308,8 @@ public SweepJob withServices(Map services) { * {@inheritDoc} */ @Override - public SweepJob withComputeId(String computeId) { - super.withComputeId(computeId); + public SweepJob withIdentity(IdentityConfiguration identity) { + super.withIdentity(identity); return this; } @@ -332,8 +326,8 @@ public SweepJob withIsArchived(Boolean isArchived) { * {@inheritDoc} */ @Override - public SweepJob withIdentity(IdentityConfiguration identity) { - super.withIdentity(identity); + public SweepJob withNotificationSetting(NotificationSetting notificationSetting) { + super.withNotificationSetting(notificationSetting); return this; } @@ -341,8 +335,8 @@ public SweepJob withIdentity(IdentityConfiguration identity) { * {@inheritDoc} */ @Override - public SweepJob withComponentId(String componentId) { - super.withComponentId(componentId); + public SweepJob withParentJobName(String parentJobName) { + super.withParentJobName(parentJobName); return this; } @@ -350,8 +344,8 @@ public SweepJob withComponentId(String componentId) { * {@inheritDoc} */ @Override - public SweepJob withNotificationSetting(NotificationSetting notificationSetting) { - super.withNotificationSetting(notificationSetting); + public SweepJob withServices(Map services) { + super.withServices(services); return this; } @@ -368,8 +362,8 @@ public SweepJob withDescription(String description) { * {@inheritDoc} */ @Override - public SweepJob withTags(Map tags) { - super.withTags(tags); + public SweepJob withProperties(Map properties) { + super.withProperties(properties); return this; } @@ -377,8 +371,8 @@ public SweepJob withTags(Map tags) { * {@inheritDoc} */ @Override - public SweepJob withProperties(Map properties) { - super.withProperties(properties); + public SweepJob withTags(Map tags) { + super.withTags(tags); return this; } @@ -389,52 +383,64 @@ public SweepJob withProperties(Map properties) { */ @Override public void validate() { - super.validate(); - if (searchSpace() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property searchSpace in model SweepJob")); + if (earlyTermination() != null) { + earlyTermination().validate(); } - if (samplingAlgorithm() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property samplingAlgorithm in model SweepJob")); - } else { - samplingAlgorithm().validate(); + if (inputs() != null) { + inputs().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); } if (limits() != null) { limits().validate(); } - if (earlyTermination() != null) { - earlyTermination().validate(); - } if (objective() == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property objective in model SweepJob")); } else { objective().validate(); } + if (outputs() != null) { + outputs().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); + } + if (queueSettings() != null) { + queueSettings().validate(); + } + if (samplingAlgorithm() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property samplingAlgorithm in model SweepJob")); + } else { + samplingAlgorithm().validate(); + } + if (searchSpace() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property searchSpace in model SweepJob")); + } if (trial() == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property trial in model SweepJob")); } else { trial().validate(); } - if (inputs() != null) { - inputs().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); + if (identity() != null) { + identity().validate(); } - if (outputs() != null) { - outputs().values().forEach(e -> { + if (notificationSetting() != null) { + notificationSetting().validate(); + } + if (services() != null) { + services().values().forEach(e -> { if (e != null) { e.validate(); } }); } - if (queueSettings() != null) { - queueSettings().validate(); - } } private static final ClientLogger LOGGER = new ClientLogger(SweepJob.class); @@ -446,24 +452,25 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("componentId", componentId()); + jsonWriter.writeStringField("computeId", computeId()); jsonWriter.writeStringField("displayName", displayName()); jsonWriter.writeStringField("experimentName", experimentName()); - jsonWriter.writeMapField("services", services(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("computeId", computeId()); - jsonWriter.writeBooleanField("isArchived", isArchived()); jsonWriter.writeJsonField("identity", identity()); - jsonWriter.writeStringField("componentId", componentId()); + jsonWriter.writeBooleanField("isArchived", isArchived()); jsonWriter.writeJsonField("notificationSetting", notificationSetting()); - jsonWriter.writeUntypedField("searchSpace", this.searchSpace); - jsonWriter.writeJsonField("samplingAlgorithm", this.samplingAlgorithm); + jsonWriter.writeStringField("parentJobName", parentJobName()); + jsonWriter.writeMapField("services", services(), (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("objective", this.objective); + jsonWriter.writeJsonField("samplingAlgorithm", this.samplingAlgorithm); + jsonWriter.writeUntypedField("searchSpace", this.searchSpace); jsonWriter.writeJsonField("trial", this.trial); jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString()); - jsonWriter.writeJsonField("limits", this.limits); jsonWriter.writeJsonField("earlyTermination", this.earlyTermination); jsonWriter.writeMapField("inputs", this.inputs, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("limits", this.limits); jsonWriter.writeMapField("outputs", this.outputs, (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("queueSettings", this.queueSettings); return jsonWriter.writeEndObject(); @@ -487,48 +494,50 @@ public static SweepJob fromJson(JsonReader jsonReader) throws IOException { if ("description".equals(fieldName)) { deserializedSweepJob.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedSweepJob.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedSweepJob.withProperties(properties); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedSweepJob.withTags(tags); + } else if ("componentId".equals(fieldName)) { + deserializedSweepJob.withComponentId(reader.getString()); + } else if ("computeId".equals(fieldName)) { + deserializedSweepJob.withComputeId(reader.getString()); } else if ("displayName".equals(fieldName)) { deserializedSweepJob.withDisplayName(reader.getString()); - } else if ("status".equals(fieldName)) { - deserializedSweepJob.status = JobStatus.fromString(reader.getString()); } else if ("experimentName".equals(fieldName)) { deserializedSweepJob.withExperimentName(reader.getString()); - } else if ("services".equals(fieldName)) { - Map services = reader.readMap(reader1 -> JobService.fromJson(reader1)); - deserializedSweepJob.withServices(services); - } else if ("computeId".equals(fieldName)) { - deserializedSweepJob.withComputeId(reader.getString()); - } else if ("isArchived".equals(fieldName)) { - deserializedSweepJob.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("identity".equals(fieldName)) { deserializedSweepJob.withIdentity(IdentityConfiguration.fromJson(reader)); - } else if ("componentId".equals(fieldName)) { - deserializedSweepJob.withComponentId(reader.getString()); + } else if ("isArchived".equals(fieldName)) { + deserializedSweepJob.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("notificationSetting".equals(fieldName)) { deserializedSweepJob.withNotificationSetting(NotificationSetting.fromJson(reader)); - } else if ("searchSpace".equals(fieldName)) { - deserializedSweepJob.searchSpace = reader.readUntyped(); - } else if ("samplingAlgorithm".equals(fieldName)) { - deserializedSweepJob.samplingAlgorithm = SamplingAlgorithm.fromJson(reader); + } else if ("parentJobName".equals(fieldName)) { + deserializedSweepJob.withParentJobName(reader.getString()); + } else if ("services".equals(fieldName)) { + Map services = reader.readMap(reader1 -> JobService.fromJson(reader1)); + deserializedSweepJob.withServices(services); + } else if ("status".equals(fieldName)) { + deserializedSweepJob.withStatus(JobStatus.fromString(reader.getString())); } else if ("objective".equals(fieldName)) { deserializedSweepJob.objective = Objective.fromJson(reader); + } else if ("samplingAlgorithm".equals(fieldName)) { + deserializedSweepJob.samplingAlgorithm = SamplingAlgorithm.fromJson(reader); + } else if ("searchSpace".equals(fieldName)) { + deserializedSweepJob.searchSpace = reader.readUntyped(); } else if ("trial".equals(fieldName)) { deserializedSweepJob.trial = TrialComponent.fromJson(reader); } else if ("jobType".equals(fieldName)) { deserializedSweepJob.jobType = JobType.fromString(reader.getString()); - } else if ("limits".equals(fieldName)) { - deserializedSweepJob.limits = SweepJobLimits.fromJson(reader); } else if ("earlyTermination".equals(fieldName)) { deserializedSweepJob.earlyTermination = EarlyTerminationPolicy.fromJson(reader); } else if ("inputs".equals(fieldName)) { Map inputs = reader.readMap(reader1 -> JobInput.fromJson(reader1)); deserializedSweepJob.inputs = inputs; + } else if ("limits".equals(fieldName)) { + deserializedSweepJob.limits = SweepJobLimits.fromJson(reader); } else if ("outputs".equals(fieldName)) { Map outputs = reader.readMap(reader1 -> JobOutput.fromJson(reader1)); deserializedSweepJob.outputs = outputs; 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 1262136044f3e..d43bcf2f7898d 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 @@ -23,14 +23,14 @@ public final class SweepJobLimits extends JobLimits { private JobLimitsType jobLimitsType = JobLimitsType.SWEEP; /* - * Sweep Job max total trials. + * Sweep Job max concurrent trials. */ - private Integer maxTotalTrials; + private Integer maxConcurrentTrials; /* - * Sweep Job max concurrent trials. + * Sweep Job max total trials. */ - private Integer maxConcurrentTrials; + private Integer maxTotalTrials; /* * Sweep Job Trial timeout value. @@ -54,42 +54,42 @@ public JobLimitsType jobLimitsType() { } /** - * Get the maxTotalTrials property: Sweep Job max total trials. + * Get the maxConcurrentTrials property: Sweep Job max concurrent trials. * - * @return the maxTotalTrials value. + * @return the maxConcurrentTrials value. */ - public Integer maxTotalTrials() { - return this.maxTotalTrials; + public Integer maxConcurrentTrials() { + return this.maxConcurrentTrials; } /** - * Set the maxTotalTrials property: Sweep Job max total trials. + * Set the maxConcurrentTrials property: Sweep Job max concurrent trials. * - * @param maxTotalTrials the maxTotalTrials value to set. + * @param maxConcurrentTrials the maxConcurrentTrials value to set. * @return the SweepJobLimits object itself. */ - public SweepJobLimits withMaxTotalTrials(Integer maxTotalTrials) { - this.maxTotalTrials = maxTotalTrials; + public SweepJobLimits withMaxConcurrentTrials(Integer maxConcurrentTrials) { + this.maxConcurrentTrials = maxConcurrentTrials; return this; } /** - * Get the maxConcurrentTrials property: Sweep Job max concurrent trials. + * Get the maxTotalTrials property: Sweep Job max total trials. * - * @return the maxConcurrentTrials value. + * @return the maxTotalTrials value. */ - public Integer maxConcurrentTrials() { - return this.maxConcurrentTrials; + public Integer maxTotalTrials() { + return this.maxTotalTrials; } /** - * Set the maxConcurrentTrials property: Sweep Job max concurrent trials. + * Set the maxTotalTrials property: Sweep Job max total trials. * - * @param maxConcurrentTrials the maxConcurrentTrials value to set. + * @param maxTotalTrials the maxTotalTrials value to set. * @return the SweepJobLimits object itself. */ - public SweepJobLimits withMaxConcurrentTrials(Integer maxConcurrentTrials) { - this.maxConcurrentTrials = maxConcurrentTrials; + public SweepJobLimits withMaxTotalTrials(Integer maxTotalTrials) { + this.maxTotalTrials = maxTotalTrials; return this; } @@ -129,7 +129,6 @@ public SweepJobLimits withTimeout(Duration timeout) { */ @Override public void validate() { - super.validate(); } /** @@ -140,8 +139,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("timeout", CoreUtils.durationToStringWithDays(timeout())); jsonWriter.writeStringField("jobLimitsType", this.jobLimitsType == null ? null : this.jobLimitsType.toString()); - jsonWriter.writeNumberField("maxTotalTrials", this.maxTotalTrials); jsonWriter.writeNumberField("maxConcurrentTrials", this.maxConcurrentTrials); + jsonWriter.writeNumberField("maxTotalTrials", this.maxTotalTrials); jsonWriter.writeStringField("trialTimeout", CoreUtils.durationToStringWithDays(this.trialTimeout)); return jsonWriter.writeEndObject(); } @@ -166,10 +165,10 @@ public static SweepJobLimits fromJson(JsonReader jsonReader) throws IOException .withTimeout(reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString()))); } else if ("jobLimitsType".equals(fieldName)) { deserializedSweepJobLimits.jobLimitsType = JobLimitsType.fromString(reader.getString()); - } else if ("maxTotalTrials".equals(fieldName)) { - deserializedSweepJobLimits.maxTotalTrials = reader.getNullable(JsonReader::getInt); } else if ("maxConcurrentTrials".equals(fieldName)) { deserializedSweepJobLimits.maxConcurrentTrials = reader.getNullable(JsonReader::getInt); + } else if ("maxTotalTrials".equals(fieldName)) { + deserializedSweepJobLimits.maxTotalTrials = reader.getNullable(JsonReader::getInt); } else if ("trialTimeout".equals(fieldName)) { deserializedSweepJobLimits.trialTimeout = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); 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 3a00e4eb5ea80..f66dd39fc77c9 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 @@ -11,7 +11,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.time.OffsetDateTime; import java.util.List; /** @@ -29,32 +28,6 @@ public final class SynapseSpark extends Compute { */ private SynapseSparkProperties properties; - /* - * The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - */ - private ProvisioningState provisioningState; - - /* - * The time at which the compute was created. - */ - private OffsetDateTime createdOn; - - /* - * The time at which the compute was last modified. - */ - private OffsetDateTime modifiedOn; - - /* - * Errors during provisioning - */ - private List provisioningErrors; - - /* - * Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning - * service provisioned it if false. - */ - private Boolean isAttachedCompute; - /** * Creates an instance of SynapseSpark class. */ @@ -91,58 +64,6 @@ public SynapseSpark withProperties(SynapseSparkProperties properties) { return this; } - /** - * Get the provisioningState property: The provision state of the cluster. Valid values are Unknown, Updating, - * Provisioning, Succeeded, and Failed. - * - * @return the provisioningState value. - */ - @Override - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the createdOn property: The time at which the compute was created. - * - * @return the createdOn value. - */ - @Override - public OffsetDateTime createdOn() { - return this.createdOn; - } - - /** - * Get the modifiedOn property: The time at which the compute was last modified. - * - * @return the modifiedOn value. - */ - @Override - public OffsetDateTime modifiedOn() { - return this.modifiedOn; - } - - /** - * Get the provisioningErrors property: Errors during provisioning. - * - * @return the provisioningErrors value. - */ - @Override - public List provisioningErrors() { - return this.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. - */ - @Override - public Boolean isAttachedCompute() { - return this.isAttachedCompute; - } - /** * {@inheritDoc} */ @@ -186,7 +107,6 @@ public SynapseSpark withDisableLocalAuth(Boolean disableLocalAuth) { */ @Override public void validate() { - super.validate(); if (properties() != null) { properties().validate(); } @@ -225,23 +145,23 @@ public static SynapseSpark fromJson(JsonReader jsonReader) throws IOException { if ("computeLocation".equals(fieldName)) { deserializedSynapseSpark.withComputeLocation(reader.getString()); } else if ("provisioningState".equals(fieldName)) { - deserializedSynapseSpark.provisioningState = ProvisioningState.fromString(reader.getString()); + deserializedSynapseSpark.withProvisioningState(ProvisioningState.fromString(reader.getString())); } else if ("description".equals(fieldName)) { deserializedSynapseSpark.withDescription(reader.getString()); } else if ("createdOn".equals(fieldName)) { - deserializedSynapseSpark.createdOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedSynapseSpark.withCreatedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("modifiedOn".equals(fieldName)) { - deserializedSynapseSpark.modifiedOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedSynapseSpark.withModifiedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("resourceId".equals(fieldName)) { deserializedSynapseSpark.withResourceId(reader.getString()); } else if ("provisioningErrors".equals(fieldName)) { List provisioningErrors = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); - deserializedSynapseSpark.provisioningErrors = provisioningErrors; + deserializedSynapseSpark.withProvisioningErrors(provisioningErrors); } else if ("isAttachedCompute".equals(fieldName)) { - deserializedSynapseSpark.isAttachedCompute = reader.getNullable(JsonReader::getBoolean); + deserializedSynapseSpark.withIsAttachedCompute(reader.getNullable(JsonReader::getBoolean)); } else if ("disableLocalAuth".equals(fieldName)) { deserializedSynapseSpark.withDisableLocalAuth(reader.getNullable(JsonReader::getBoolean)); } else if ("computeType".equals(fieldName)) { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemDatastoresAuthMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemDatastoresAuthMode.java new file mode 100644 index 0000000000000..8489607d7fde8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemDatastoresAuthMode.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The auth mode used for accessing the system datastores of the workspace. + */ +public final class SystemDatastoresAuthMode extends ExpandableStringEnum { + /** + * Static value AccessKey for SystemDatastoresAuthMode. + */ + public static final SystemDatastoresAuthMode ACCESS_KEY = fromString("AccessKey"); + + /** + * Static value Identity for SystemDatastoresAuthMode. + */ + public static final SystemDatastoresAuthMode IDENTITY = fromString("Identity"); + + /** + * Static value UserDelegationSAS for SystemDatastoresAuthMode. + */ + public static final SystemDatastoresAuthMode USER_DELEGATION_SAS = fromString("UserDelegationSAS"); + + /** + * Creates a new instance of SystemDatastoresAuthMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SystemDatastoresAuthMode() { + } + + /** + * Creates or finds a SystemDatastoresAuthMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding SystemDatastoresAuthMode. + */ + public static SystemDatastoresAuthMode fromString(String name) { + return fromString(name, SystemDatastoresAuthMode.class); + } + + /** + * Gets known SystemDatastoresAuthMode values. + * + * @return known SystemDatastoresAuthMode values. + */ + public static Collection values() { + return values(SystemDatastoresAuthMode.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 c7db2ecc7ce5d..ae837f005e88d 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 @@ -17,6 +17,16 @@ */ @Fluent public class TableVertical implements JsonSerializable { + /* + * Columns to use for CVSplit data. + */ + private List cvSplitColumnNames; + + /* + * Featurization inputs needed for AutoML job. + */ + private TableVerticalFeaturizationSettings featurizationSettings; + /* * Execution constraints for AutoMLJob. */ @@ -29,26 +39,22 @@ public class TableVertical implements JsonSerializable { private NCrossValidations nCrossValidations; /* - * Columns to use for CVSplit data. + * Test data input. */ - private List cvSplitColumnNames; + private MLTableJobInput testData; /* - * 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. + * 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. */ - private String weightColumnName; + private Double testDataSize; /* * Validation data inputs. */ private MLTableJobInput validationData; - /* - * Test data input. - */ - private MLTableJobInput testData; - /* * The fraction of training dataset that needs to be set aside for validation purpose. * Values between (0.0 , 1.0) @@ -57,16 +63,10 @@ public class TableVertical implements JsonSerializable { private Double validationDataSize; /* - * 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. - */ - private Double testDataSize; - - /* - * Featurization inputs needed for AutoML job. + * 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. */ - private TableVerticalFeaturizationSettings featurizationSettings; + private String weightColumnName; /** * Creates an instance of TableVertical class. @@ -74,6 +74,46 @@ public class TableVertical implements JsonSerializable { public TableVertical() { } + /** + * Get the cvSplitColumnNames property: Columns to use for CVSplit data. + * + * @return the cvSplitColumnNames value. + */ + public List cvSplitColumnNames() { + return this.cvSplitColumnNames; + } + + /** + * Set the cvSplitColumnNames property: Columns to use for CVSplit data. + * + * @param cvSplitColumnNames the cvSplitColumnNames value to set. + * @return the TableVertical object itself. + */ + public TableVertical withCvSplitColumnNames(List cvSplitColumnNames) { + this.cvSplitColumnNames = cvSplitColumnNames; + return this; + } + + /** + * Get the featurizationSettings property: Featurization inputs needed for AutoML job. + * + * @return the featurizationSettings value. + */ + public TableVerticalFeaturizationSettings featurizationSettings() { + return this.featurizationSettings; + } + + /** + * Set the featurizationSettings property: Featurization inputs needed for AutoML job. + * + * @param featurizationSettings the featurizationSettings value to set. + * @return the TableVertical object itself. + */ + public TableVertical withFeaturizationSettings(TableVerticalFeaturizationSettings featurizationSettings) { + this.featurizationSettings = featurizationSettings; + return this; + } + /** * Get the limitSettings property: Execution constraints for AutoMLJob. * @@ -117,44 +157,46 @@ public TableVertical withNCrossValidations(NCrossValidations nCrossValidations) } /** - * Get the cvSplitColumnNames property: Columns to use for CVSplit data. + * Get the testData property: Test data input. * - * @return the cvSplitColumnNames value. + * @return the testData value. */ - public List cvSplitColumnNames() { - return this.cvSplitColumnNames; + public MLTableJobInput testData() { + return this.testData; } /** - * Set the cvSplitColumnNames property: Columns to use for CVSplit data. + * Set the testData property: Test data input. * - * @param cvSplitColumnNames the cvSplitColumnNames value to set. + * @param testData the testData value to set. * @return the TableVertical object itself. */ - public TableVertical withCvSplitColumnNames(List cvSplitColumnNames) { - this.cvSplitColumnNames = cvSplitColumnNames; + public TableVertical withTestData(MLTableJobInput testData) { + this.testData = testData; return this; } /** - * 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. + * 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. * - * @return the weightColumnName value. + * @return the testDataSize value. */ - public String weightColumnName() { - return this.weightColumnName; + public Double testDataSize() { + return this.testDataSize; } /** - * 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. + * 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. * - * @param weightColumnName the weightColumnName value to set. + * @param testDataSize the testDataSize value to set. * @return the TableVertical object itself. */ - public TableVertical withWeightColumnName(String weightColumnName) { - this.weightColumnName = weightColumnName; + public TableVertical withTestDataSize(Double testDataSize) { + this.testDataSize = testDataSize; return this; } @@ -178,26 +220,6 @@ public TableVertical withValidationData(MLTableJobInput validationData) { return this; } - /** - * Get the testData property: Test data input. - * - * @return the testData value. - */ - public MLTableJobInput testData() { - return this.testData; - } - - /** - * Set the testData property: Test data input. - * - * @param testData the testData value to set. - * @return the TableVertical object itself. - */ - public TableVertical withTestData(MLTableJobInput testData) { - this.testData = testData; - return this; - } - /** * Get the validationDataSize property: The fraction of training dataset that needs to be set aside for validation * purpose. @@ -225,46 +247,24 @@ public TableVertical withValidationDataSize(Double validationDataSize) { } /** - * 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. - * - * @return the testDataSize value. - */ - public Double testDataSize() { - return this.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. - * - * @param testDataSize the testDataSize value to set. - * @return the TableVertical object itself. - */ - public TableVertical withTestDataSize(Double testDataSize) { - this.testDataSize = testDataSize; - return this; - } - - /** - * Get the featurizationSettings property: Featurization inputs needed for AutoML job. + * 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 featurizationSettings value. + * @return the weightColumnName value. */ - public TableVerticalFeaturizationSettings featurizationSettings() { - return this.featurizationSettings; + public String weightColumnName() { + return this.weightColumnName; } /** - * Set the featurizationSettings property: Featurization inputs needed for AutoML job. + * 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 featurizationSettings the featurizationSettings value to set. + * @param weightColumnName the weightColumnName value to set. * @return the TableVertical object itself. */ - public TableVertical withFeaturizationSettings(TableVerticalFeaturizationSettings featurizationSettings) { - this.featurizationSettings = featurizationSettings; + public TableVertical withWeightColumnName(String weightColumnName) { + this.weightColumnName = weightColumnName; return this; } @@ -274,20 +274,20 @@ public TableVertical withFeaturizationSettings(TableVerticalFeaturizationSetting * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (featurizationSettings() != null) { + featurizationSettings().validate(); + } if (limitSettings() != null) { limitSettings().validate(); } if (nCrossValidations() != null) { nCrossValidations().validate(); } - if (validationData() != null) { - validationData().validate(); - } if (testData() != null) { testData().validate(); } - if (featurizationSettings() != null) { - featurizationSettings().validate(); + if (validationData() != null) { + validationData().validate(); } } @@ -297,16 +297,16 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("limitSettings", this.limitSettings); - jsonWriter.writeJsonField("nCrossValidations", this.nCrossValidations); jsonWriter.writeArrayField("cvSplitColumnNames", this.cvSplitColumnNames, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("weightColumnName", this.weightColumnName); - jsonWriter.writeJsonField("validationData", this.validationData); + jsonWriter.writeJsonField("featurizationSettings", this.featurizationSettings); + jsonWriter.writeJsonField("limitSettings", this.limitSettings); + jsonWriter.writeJsonField("nCrossValidations", this.nCrossValidations); jsonWriter.writeJsonField("testData", this.testData); - jsonWriter.writeNumberField("validationDataSize", this.validationDataSize); jsonWriter.writeNumberField("testDataSize", this.testDataSize); - jsonWriter.writeJsonField("featurizationSettings", this.featurizationSettings); + jsonWriter.writeJsonField("validationData", this.validationData); + jsonWriter.writeNumberField("validationDataSize", this.validationDataSize); + jsonWriter.writeStringField("weightColumnName", this.weightColumnName); return jsonWriter.writeEndObject(); } @@ -325,26 +325,26 @@ public static TableVertical fromJson(JsonReader jsonReader) throws IOException { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("limitSettings".equals(fieldName)) { + if ("cvSplitColumnNames".equals(fieldName)) { + List cvSplitColumnNames = reader.readArray(reader1 -> reader1.getString()); + deserializedTableVertical.cvSplitColumnNames = cvSplitColumnNames; + } else if ("featurizationSettings".equals(fieldName)) { + deserializedTableVertical.featurizationSettings + = TableVerticalFeaturizationSettings.fromJson(reader); + } else if ("limitSettings".equals(fieldName)) { deserializedTableVertical.limitSettings = TableVerticalLimitSettings.fromJson(reader); } else if ("nCrossValidations".equals(fieldName)) { deserializedTableVertical.nCrossValidations = NCrossValidations.fromJson(reader); - } else if ("cvSplitColumnNames".equals(fieldName)) { - List cvSplitColumnNames = reader.readArray(reader1 -> reader1.getString()); - deserializedTableVertical.cvSplitColumnNames = cvSplitColumnNames; - } else if ("weightColumnName".equals(fieldName)) { - deserializedTableVertical.weightColumnName = reader.getString(); - } else if ("validationData".equals(fieldName)) { - deserializedTableVertical.validationData = MLTableJobInput.fromJson(reader); } else if ("testData".equals(fieldName)) { deserializedTableVertical.testData = MLTableJobInput.fromJson(reader); - } else if ("validationDataSize".equals(fieldName)) { - deserializedTableVertical.validationDataSize = reader.getNullable(JsonReader::getDouble); } else if ("testDataSize".equals(fieldName)) { deserializedTableVertical.testDataSize = reader.getNullable(JsonReader::getDouble); - } else if ("featurizationSettings".equals(fieldName)) { - deserializedTableVertical.featurizationSettings - = TableVerticalFeaturizationSettings.fromJson(reader); + } else if ("validationData".equals(fieldName)) { + deserializedTableVertical.validationData = MLTableJobInput.fromJson(reader); + } else if ("validationDataSize".equals(fieldName)) { + deserializedTableVertical.validationDataSize = reader.getNullable(JsonReader::getDouble); + } else if ("weightColumnName".equals(fieldName)) { + deserializedTableVertical.weightColumnName = reader.getString(); } else { reader.skipChildren(); } 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 e7a2cab26bd6b..175f9a6ebd457 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 @@ -17,14 +17,6 @@ */ @Fluent public final class TableVerticalFeaturizationSettings extends FeaturizationSettings { - /* - * Featurization mode - User can keep the default 'Auto' mode and AutoML will take care of necessary transformation - * of the data in featurization phase. - * If 'Off' is selected then no featurization is done. - * If 'Custom' is selected then user can specify additional inputs to customize how featurization is done. - */ - private FeaturizationMode mode; - /* * These transformers shall not be used in featurization. */ @@ -35,47 +27,29 @@ public final class TableVerticalFeaturizationSettings extends FeaturizationSetti */ private Map columnNameAndTypes; - /* - * User can specify additional transformers to be used along with the columns to which it would be applied and - * parameters for the transformer constructor. - */ - private Map> transformerParams; - /* * Determines whether to use Dnn based featurizers for data featurization. */ private Boolean enableDnnFeaturization; - /** - * Creates an instance of TableVerticalFeaturizationSettings class. - */ - public TableVerticalFeaturizationSettings() { - } - - /** - * Get the mode property: Featurization mode - User can keep the default 'Auto' mode and AutoML will take care of - * necessary transformation of the data in featurization phase. + /* + * Featurization mode - User can keep the default 'Auto' mode and AutoML will take care of necessary transformation + * of the data in featurization phase. * If 'Off' is selected then no featurization is done. * If 'Custom' is selected then user can specify additional inputs to customize how featurization is done. - * - * @return the mode value. */ - public FeaturizationMode mode() { - return this.mode; - } + private FeaturizationMode mode; + + /* + * User can specify additional transformers to be used along with the columns to which it would be applied and + * parameters for the transformer constructor. + */ + private Map> transformerParams; /** - * Set the mode property: Featurization mode - User can keep the default 'Auto' mode and AutoML will take care of - * necessary transformation of the data in featurization phase. - * If 'Off' is selected then no featurization is done. - * If 'Custom' is selected then user can specify additional inputs to customize how featurization is done. - * - * @param mode the mode value to set. - * @return the TableVerticalFeaturizationSettings object itself. + * Creates an instance of TableVerticalFeaturizationSettings class. */ - public TableVerticalFeaturizationSettings withMode(FeaturizationMode mode) { - this.mode = mode; - return this; + public TableVerticalFeaturizationSettings() { } /** @@ -119,45 +93,71 @@ public TableVerticalFeaturizationSettings withColumnNameAndTypes(Map> transformerParams() { - return this.transformerParams; + public Boolean enableDnnFeaturization() { + return this.enableDnnFeaturization; } /** - * 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 enableDnnFeaturization property: Determines whether to use Dnn based featurizers for data featurization. * - * @param transformerParams the transformerParams value to set. + * @param enableDnnFeaturization the enableDnnFeaturization value to set. * @return the TableVerticalFeaturizationSettings object itself. */ - public TableVerticalFeaturizationSettings - withTransformerParams(Map> transformerParams) { - this.transformerParams = transformerParams; + public TableVerticalFeaturizationSettings withEnableDnnFeaturization(Boolean enableDnnFeaturization) { + this.enableDnnFeaturization = enableDnnFeaturization; return this; } /** - * Get the enableDnnFeaturization property: Determines whether to use Dnn based featurizers for data featurization. + * Get the mode property: Featurization mode - User can keep the default 'Auto' mode and AutoML will take care of + * necessary transformation of the data in featurization phase. + * If 'Off' is selected then no featurization is done. + * If 'Custom' is selected then user can specify additional inputs to customize how featurization is done. * - * @return the enableDnnFeaturization value. + * @return the mode value. */ - public Boolean enableDnnFeaturization() { - return this.enableDnnFeaturization; + public FeaturizationMode mode() { + return this.mode; } /** - * Set the enableDnnFeaturization property: Determines whether to use Dnn based featurizers for data featurization. + * Set the mode property: Featurization mode - User can keep the default 'Auto' mode and AutoML will take care of + * necessary transformation of the data in featurization phase. + * If 'Off' is selected then no featurization is done. + * If 'Custom' is selected then user can specify additional inputs to customize how featurization is done. * - * @param enableDnnFeaturization the enableDnnFeaturization value to set. + * @param mode the mode value to set. * @return the TableVerticalFeaturizationSettings object itself. */ - public TableVerticalFeaturizationSettings withEnableDnnFeaturization(Boolean enableDnnFeaturization) { - this.enableDnnFeaturization = enableDnnFeaturization; + public TableVerticalFeaturizationSettings withMode(FeaturizationMode mode) { + this.mode = mode; + return this; + } + + /** + * Get 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. + * + * @return the transformerParams value. + */ + public Map> transformerParams() { + return this.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. + * + * @param transformerParams the transformerParams value to set. + * @return the TableVerticalFeaturizationSettings object itself. + */ + public TableVerticalFeaturizationSettings + withTransformerParams(Map> transformerParams) { + this.transformerParams = transformerParams; return this; } @@ -177,7 +177,6 @@ public TableVerticalFeaturizationSettings withDatasetLanguage(String datasetLang */ @Override public void validate() { - super.validate(); if (transformerParams() != null) { transformerParams().values().forEach(e -> { if (e != null) { @@ -194,14 +193,14 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("datasetLanguage", datasetLanguage()); - jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); jsonWriter.writeArrayField("blockedTransformers", this.blockedTransformers, (writer, element) -> writer.writeString(element == null ? null : element.toString())); jsonWriter.writeMapField("columnNameAndTypes", this.columnNameAndTypes, (writer, element) -> writer.writeString(element)); + jsonWriter.writeBooleanField("enableDnnFeaturization", this.enableDnnFeaturization); + jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); jsonWriter.writeMapField("transformerParams", this.transformerParams, (writer, element) -> writer.writeArray(element, (writer1, element1) -> writer1.writeJson(element1))); - jsonWriter.writeBooleanField("enableDnnFeaturization", this.enableDnnFeaturization); return jsonWriter.writeEndObject(); } @@ -223,9 +222,6 @@ public static TableVerticalFeaturizationSettings fromJson(JsonReader jsonReader) if ("datasetLanguage".equals(fieldName)) { deserializedTableVerticalFeaturizationSettings.withDatasetLanguage(reader.getString()); - } else if ("mode".equals(fieldName)) { - deserializedTableVerticalFeaturizationSettings.mode - = FeaturizationMode.fromString(reader.getString()); } else if ("blockedTransformers".equals(fieldName)) { List blockedTransformers = reader.readArray(reader1 -> BlockedTransformers.fromString(reader1.getString())); @@ -233,13 +229,16 @@ public static TableVerticalFeaturizationSettings fromJson(JsonReader jsonReader) } else if ("columnNameAndTypes".equals(fieldName)) { Map columnNameAndTypes = reader.readMap(reader1 -> reader1.getString()); deserializedTableVerticalFeaturizationSettings.columnNameAndTypes = columnNameAndTypes; + } else if ("enableDnnFeaturization".equals(fieldName)) { + deserializedTableVerticalFeaturizationSettings.enableDnnFeaturization + = reader.getNullable(JsonReader::getBoolean); + } else if ("mode".equals(fieldName)) { + deserializedTableVerticalFeaturizationSettings.mode + = FeaturizationMode.fromString(reader.getString()); } else if ("transformerParams".equals(fieldName)) { Map> transformerParams = reader.readMap(reader1 -> reader1.readArray(reader2 -> ColumnTransformer.fromJson(reader2))); deserializedTableVerticalFeaturizationSettings.transformerParams = transformerParams; - } else if ("enableDnnFeaturization".equals(fieldName)) { - deserializedTableVerticalFeaturizationSettings.enableDnnFeaturization - = reader.getNullable(JsonReader::getBoolean); } else { reader.skipChildren(); } 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 16b8c9d6cce31..a0e2cac0c12f6 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 @@ -19,19 +19,15 @@ @Fluent public final class TableVerticalLimitSettings implements JsonSerializable { /* - * Number of iterations. - */ - private Integer maxTrials; - - /* - * Iteration timeout. + * Enable early termination, determines whether or not if AutoMLJob will terminate early if there is no score + * improvement in last 20 iterations. */ - private Duration trialTimeout; + private Boolean enableEarlyTermination; /* - * AutoML job timeout. + * Exit score for the AutoML job. */ - private Duration timeout; + private Double exitScore; /* * Maximum Concurrent iterations. @@ -44,79 +40,65 @@ public final class TableVerticalLimitSettings implements JsonSerializable Duration.parse(nonNullReader.getString())); - } else if ("timeout".equals(fieldName)) { - deserializedTableVerticalLimitSettings.timeout - = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); + if ("enableEarlyTermination".equals(fieldName)) { + deserializedTableVerticalLimitSettings.enableEarlyTermination + = reader.getNullable(JsonReader::getBoolean); + } else if ("exitScore".equals(fieldName)) { + deserializedTableVerticalLimitSettings.exitScore = reader.getNullable(JsonReader::getDouble); } else if ("maxConcurrentTrials".equals(fieldName)) { deserializedTableVerticalLimitSettings.maxConcurrentTrials = reader.getNullable(JsonReader::getInt); } else if ("maxCoresPerTrial".equals(fieldName)) { deserializedTableVerticalLimitSettings.maxCoresPerTrial = reader.getNullable(JsonReader::getInt); - } else if ("exitScore".equals(fieldName)) { - deserializedTableVerticalLimitSettings.exitScore = reader.getNullable(JsonReader::getDouble); - } else if ("enableEarlyTermination".equals(fieldName)) { - deserializedTableVerticalLimitSettings.enableEarlyTermination - = reader.getNullable(JsonReader::getBoolean); + } else if ("maxTrials".equals(fieldName)) { + deserializedTableVerticalLimitSettings.maxTrials = reader.getNullable(JsonReader::getInt); + } else if ("timeout".equals(fieldName)) { + deserializedTableVerticalLimitSettings.timeout + = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); + } else if ("trialTimeout".equals(fieldName)) { + deserializedTableVerticalLimitSettings.trialTimeout + = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); } else { reader.skipChildren(); } 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 2297d0f1da3db..4be61b14d1514 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 @@ -23,24 +23,24 @@ public final class TargetUtilizationScaleSettings extends OnlineScaleSettings { private ScaleType scaleType = ScaleType.TARGET_UTILIZATION; /* - * The polling interval in ISO 8691 format. Only supports duration with precision as low as Seconds. + * The maximum number of instances that the deployment can scale to. The quota will be reserved for max_instances. */ - private Duration pollingInterval; + private Integer maxInstances; /* - * Target CPU usage for the autoscaler. + * The minimum number of instances to always be present. */ - private Integer targetUtilizationPercentage; + private Integer minInstances; /* - * The minimum number of instances to always be present. + * The polling interval in ISO 8691 format. Only supports duration with precision as low as Seconds. */ - private Integer minInstances; + private Duration pollingInterval; /* - * The maximum number of instances that the deployment can scale to. The quota will be reserved for max_instances. + * Target CPU usage for the autoscaler. */ - private Integer maxInstances; + private Integer targetUtilizationPercentage; /** * Creates an instance of TargetUtilizationScaleSettings class. @@ -59,86 +59,86 @@ public ScaleType scaleType() { } /** - * Get the pollingInterval property: The polling interval in ISO 8691 format. Only supports duration with precision - * as low as Seconds. + * 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 pollingInterval value. + * @return the maxInstances value. */ - public Duration pollingInterval() { - return this.pollingInterval; + public Integer maxInstances() { + return this.maxInstances; } /** - * Set the pollingInterval property: The polling interval in ISO 8691 format. Only supports duration with precision - * as low as Seconds. + * Set the maxInstances property: The maximum number of instances that the deployment can scale to. The quota will + * be reserved for max_instances. * - * @param pollingInterval the pollingInterval value to set. + * @param maxInstances the maxInstances value to set. * @return the TargetUtilizationScaleSettings object itself. */ - public TargetUtilizationScaleSettings withPollingInterval(Duration pollingInterval) { - this.pollingInterval = pollingInterval; + public TargetUtilizationScaleSettings withMaxInstances(Integer maxInstances) { + this.maxInstances = maxInstances; return this; } /** - * Get the targetUtilizationPercentage property: Target CPU usage for the autoscaler. + * Get the minInstances property: The minimum number of instances to always be present. * - * @return the targetUtilizationPercentage value. + * @return the minInstances value. */ - public Integer targetUtilizationPercentage() { - return this.targetUtilizationPercentage; + public Integer minInstances() { + return this.minInstances; } /** - * Set the targetUtilizationPercentage property: Target CPU usage for the autoscaler. + * Set the minInstances property: The minimum number of instances to always be present. * - * @param targetUtilizationPercentage the targetUtilizationPercentage value to set. + * @param minInstances the minInstances value to set. * @return the TargetUtilizationScaleSettings object itself. */ - public TargetUtilizationScaleSettings withTargetUtilizationPercentage(Integer targetUtilizationPercentage) { - this.targetUtilizationPercentage = targetUtilizationPercentage; + public TargetUtilizationScaleSettings withMinInstances(Integer minInstances) { + this.minInstances = minInstances; return this; } /** - * Get the minInstances property: The minimum number of instances to always be present. + * Get the pollingInterval property: The polling interval in ISO 8691 format. Only supports duration with precision + * as low as Seconds. * - * @return the minInstances value. + * @return the pollingInterval value. */ - public Integer minInstances() { - return this.minInstances; + public Duration pollingInterval() { + return this.pollingInterval; } /** - * Set the minInstances property: The minimum number of instances to always be present. + * Set the pollingInterval property: The polling interval in ISO 8691 format. Only supports duration with precision + * as low as Seconds. * - * @param minInstances the minInstances value to set. + * @param pollingInterval the pollingInterval value to set. * @return the TargetUtilizationScaleSettings object itself. */ - public TargetUtilizationScaleSettings withMinInstances(Integer minInstances) { - this.minInstances = minInstances; + public TargetUtilizationScaleSettings withPollingInterval(Duration pollingInterval) { + this.pollingInterval = pollingInterval; return this; } /** - * Get the maxInstances property: The maximum number of instances that the deployment can scale to. The quota will - * be reserved for max_instances. + * Get the targetUtilizationPercentage property: Target CPU usage for the autoscaler. * - * @return the maxInstances value. + * @return the targetUtilizationPercentage value. */ - public Integer maxInstances() { - return this.maxInstances; + public Integer targetUtilizationPercentage() { + return this.targetUtilizationPercentage; } /** - * Set the maxInstances property: The maximum number of instances that the deployment can scale to. The quota will - * be reserved for max_instances. + * Set the targetUtilizationPercentage property: Target CPU usage for the autoscaler. * - * @param maxInstances the maxInstances value to set. + * @param targetUtilizationPercentage the targetUtilizationPercentage value to set. * @return the TargetUtilizationScaleSettings object itself. */ - public TargetUtilizationScaleSettings withMaxInstances(Integer maxInstances) { - this.maxInstances = maxInstances; + public TargetUtilizationScaleSettings withTargetUtilizationPercentage(Integer targetUtilizationPercentage) { + this.targetUtilizationPercentage = targetUtilizationPercentage; return this; } @@ -149,7 +149,6 @@ public TargetUtilizationScaleSettings withMaxInstances(Integer maxInstances) { */ @Override public void validate() { - super.validate(); } /** @@ -159,10 +158,10 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("scaleType", this.scaleType == null ? null : this.scaleType.toString()); + jsonWriter.writeNumberField("maxInstances", this.maxInstances); + jsonWriter.writeNumberField("minInstances", this.minInstances); jsonWriter.writeStringField("pollingInterval", CoreUtils.durationToStringWithDays(this.pollingInterval)); jsonWriter.writeNumberField("targetUtilizationPercentage", this.targetUtilizationPercentage); - jsonWriter.writeNumberField("minInstances", this.minInstances); - jsonWriter.writeNumberField("maxInstances", this.maxInstances); return jsonWriter.writeEndObject(); } @@ -184,16 +183,16 @@ public static TargetUtilizationScaleSettings fromJson(JsonReader jsonReader) thr if ("scaleType".equals(fieldName)) { deserializedTargetUtilizationScaleSettings.scaleType = ScaleType.fromString(reader.getString()); + } else if ("maxInstances".equals(fieldName)) { + deserializedTargetUtilizationScaleSettings.maxInstances = reader.getNullable(JsonReader::getInt); + } else if ("minInstances".equals(fieldName)) { + deserializedTargetUtilizationScaleSettings.minInstances = reader.getNullable(JsonReader::getInt); } else if ("pollingInterval".equals(fieldName)) { deserializedTargetUtilizationScaleSettings.pollingInterval = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); } else if ("targetUtilizationPercentage".equals(fieldName)) { deserializedTargetUtilizationScaleSettings.targetUtilizationPercentage = reader.getNullable(JsonReader::getInt); - } else if ("minInstances".equals(fieldName)) { - deserializedTargetUtilizationScaleSettings.minInstances = reader.getNullable(JsonReader::getInt); - } else if ("maxInstances".equals(fieldName)) { - deserializedTargetUtilizationScaleSettings.maxInstances = reader.getNullable(JsonReader::getInt); } else { reader.skipChildren(); } 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 8771142e65226..8709924ba0dcf 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 @@ -21,14 +21,14 @@ public final class TensorFlow extends DistributionConfiguration { private DistributionType distributionType = DistributionType.TENSOR_FLOW; /* - * Number of workers. If not specified, will default to the instance count. + * Number of parameter server tasks. */ - private Integer workerCount; + private Integer parameterServerCount; /* - * Number of parameter server tasks. + * Number of workers. If not specified, will default to the instance count. */ - private Integer parameterServerCount; + private Integer workerCount; /** * Creates an instance of TensorFlow class. @@ -47,42 +47,42 @@ public DistributionType distributionType() { } /** - * Get the workerCount property: Number of workers. If not specified, will default to the instance count. + * Get the parameterServerCount property: Number of parameter server tasks. * - * @return the workerCount value. + * @return the parameterServerCount value. */ - public Integer workerCount() { - return this.workerCount; + public Integer parameterServerCount() { + return this.parameterServerCount; } /** - * Set the workerCount property: Number of workers. If not specified, will default to the instance count. + * Set the parameterServerCount property: Number of parameter server tasks. * - * @param workerCount the workerCount value to set. + * @param parameterServerCount the parameterServerCount value to set. * @return the TensorFlow object itself. */ - public TensorFlow withWorkerCount(Integer workerCount) { - this.workerCount = workerCount; + public TensorFlow withParameterServerCount(Integer parameterServerCount) { + this.parameterServerCount = parameterServerCount; return this; } /** - * Get the parameterServerCount property: Number of parameter server tasks. + * Get the workerCount property: Number of workers. If not specified, will default to the instance count. * - * @return the parameterServerCount value. + * @return the workerCount value. */ - public Integer parameterServerCount() { - return this.parameterServerCount; + public Integer workerCount() { + return this.workerCount; } /** - * Set the parameterServerCount property: Number of parameter server tasks. + * Set the workerCount property: Number of workers. If not specified, will default to the instance count. * - * @param parameterServerCount the parameterServerCount value to set. + * @param workerCount the workerCount value to set. * @return the TensorFlow object itself. */ - public TensorFlow withParameterServerCount(Integer parameterServerCount) { - this.parameterServerCount = parameterServerCount; + public TensorFlow withWorkerCount(Integer workerCount) { + this.workerCount = workerCount; return this; } @@ -93,7 +93,6 @@ public TensorFlow withParameterServerCount(Integer parameterServerCount) { */ @Override public void validate() { - super.validate(); } /** @@ -104,8 +103,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("distributionType", this.distributionType == null ? null : this.distributionType.toString()); - jsonWriter.writeNumberField("workerCount", this.workerCount); jsonWriter.writeNumberField("parameterServerCount", this.parameterServerCount); + jsonWriter.writeNumberField("workerCount", this.workerCount); return jsonWriter.writeEndObject(); } @@ -126,10 +125,10 @@ public static TensorFlow fromJson(JsonReader jsonReader) throws IOException { if ("distributionType".equals(fieldName)) { deserializedTensorFlow.distributionType = DistributionType.fromString(reader.getString()); - } else if ("workerCount".equals(fieldName)) { - deserializedTensorFlow.workerCount = reader.getNullable(JsonReader::getInt); } else if ("parameterServerCount".equals(fieldName)) { deserializedTensorFlow.parameterServerCount = reader.getNullable(JsonReader::getInt); + } else if ("workerCount".equals(fieldName)) { + deserializedTensorFlow.workerCount = reader.getNullable(JsonReader::getInt); } else { reader.skipChildren(); } 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 a5237d3783d92..1450ce79fd0d0 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 @@ -5,6 +5,7 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -27,14 +28,14 @@ public final class TextClassification extends AutoMLVertical { private ClassificationPrimaryMetrics primaryMetric; /* - * Execution constraints for AutoMLJob. + * Featurization inputs needed for AutoML job. */ - private NlpVerticalLimitSettings limitSettings; + private NlpVerticalFeaturizationSettings featurizationSettings; /* - * Featurization inputs needed for AutoML job. + * Execution constraints for AutoMLJob. */ - private NlpVerticalFeaturizationSettings featurizationSettings; + private NlpVerticalLimitSettings limitSettings; /* * Validation data inputs. @@ -78,42 +79,42 @@ public TextClassification withPrimaryMetric(ClassificationPrimaryMetrics primary } /** - * Get the limitSettings property: Execution constraints for AutoMLJob. + * Get the featurizationSettings property: Featurization inputs needed for AutoML job. * - * @return the limitSettings value. + * @return the featurizationSettings value. */ - public NlpVerticalLimitSettings limitSettings() { - return this.limitSettings; + public NlpVerticalFeaturizationSettings featurizationSettings() { + return this.featurizationSettings; } /** - * Set the limitSettings property: Execution constraints for AutoMLJob. + * Set the featurizationSettings property: Featurization inputs needed for AutoML job. * - * @param limitSettings the limitSettings value to set. + * @param featurizationSettings the featurizationSettings value to set. * @return the TextClassification object itself. */ - public TextClassification withLimitSettings(NlpVerticalLimitSettings limitSettings) { - this.limitSettings = limitSettings; + public TextClassification withFeaturizationSettings(NlpVerticalFeaturizationSettings featurizationSettings) { + this.featurizationSettings = featurizationSettings; return this; } /** - * Get the featurizationSettings property: Featurization inputs needed for AutoML job. + * Get the limitSettings property: Execution constraints for AutoMLJob. * - * @return the featurizationSettings value. + * @return the limitSettings value. */ - public NlpVerticalFeaturizationSettings featurizationSettings() { - return this.featurizationSettings; + public NlpVerticalLimitSettings limitSettings() { + return this.limitSettings; } /** - * Set the featurizationSettings property: Featurization inputs needed for AutoML job. + * Set the limitSettings property: Execution constraints for AutoMLJob. * - * @param featurizationSettings the featurizationSettings value to set. + * @param limitSettings the limitSettings value to set. * @return the TextClassification object itself. */ - public TextClassification withFeaturizationSettings(NlpVerticalFeaturizationSettings featurizationSettings) { - this.featurizationSettings = featurizationSettings; + public TextClassification withLimitSettings(NlpVerticalLimitSettings limitSettings) { + this.limitSettings = limitSettings; return this; } @@ -150,8 +151,8 @@ public TextClassification withLogVerbosity(LogVerbosity logVerbosity) { * {@inheritDoc} */ @Override - public TextClassification withTrainingData(MLTableJobInput trainingData) { - super.withTrainingData(trainingData); + public TextClassification withTargetColumnName(String targetColumnName) { + super.withTargetColumnName(targetColumnName); return this; } @@ -159,8 +160,8 @@ public TextClassification withTrainingData(MLTableJobInput trainingData) { * {@inheritDoc} */ @Override - public TextClassification withTargetColumnName(String targetColumnName) { - super.withTargetColumnName(targetColumnName); + public TextClassification withTrainingData(MLTableJobInput trainingData) { + super.withTrainingData(trainingData); return this; } @@ -171,18 +172,26 @@ public TextClassification withTargetColumnName(String targetColumnName) { */ @Override public void validate() { - super.validate(); - if (limitSettings() != null) { - limitSettings().validate(); - } if (featurizationSettings() != null) { featurizationSettings().validate(); } + if (limitSettings() != null) { + limitSettings().validate(); + } if (validationData() != null) { validationData().validate(); } + if (trainingData() == null) { + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property trainingData in model TextClassification")); + } else { + trainingData().validate(); + } } + private static final ClientLogger LOGGER = new ClientLogger(TextClassification.class); + /** * {@inheritDoc} */ @@ -194,8 +203,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("targetColumnName", targetColumnName()); jsonWriter.writeStringField("taskType", this.taskType == null ? null : this.taskType.toString()); jsonWriter.writeStringField("primaryMetric", this.primaryMetric == null ? null : this.primaryMetric.toString()); - jsonWriter.writeJsonField("limitSettings", this.limitSettings); jsonWriter.writeJsonField("featurizationSettings", this.featurizationSettings); + jsonWriter.writeJsonField("limitSettings", this.limitSettings); jsonWriter.writeJsonField("validationData", this.validationData); return jsonWriter.writeEndObject(); } @@ -227,11 +236,11 @@ public static TextClassification fromJson(JsonReader jsonReader) throws IOExcept } else if ("primaryMetric".equals(fieldName)) { deserializedTextClassification.primaryMetric = ClassificationPrimaryMetrics.fromString(reader.getString()); - } else if ("limitSettings".equals(fieldName)) { - deserializedTextClassification.limitSettings = NlpVerticalLimitSettings.fromJson(reader); } else if ("featurizationSettings".equals(fieldName)) { deserializedTextClassification.featurizationSettings = NlpVerticalFeaturizationSettings.fromJson(reader); + } else if ("limitSettings".equals(fieldName)) { + deserializedTextClassification.limitSettings = NlpVerticalLimitSettings.fromJson(reader); } else if ("validationData".equals(fieldName)) { deserializedTextClassification.validationData = MLTableJobInput.fromJson(reader); } else { 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 325e4926c573c..d6b66fbe08c06 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 @@ -5,6 +5,7 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -28,14 +29,14 @@ public final class TextClassificationMultilabel extends AutoMLVertical { private ClassificationMultilabelPrimaryMetrics primaryMetric; /* - * Execution constraints for AutoMLJob. + * Featurization inputs needed for AutoML job. */ - private NlpVerticalLimitSettings limitSettings; + private NlpVerticalFeaturizationSettings featurizationSettings; /* - * Featurization inputs needed for AutoML job. + * Execution constraints for AutoMLJob. */ - private NlpVerticalFeaturizationSettings featurizationSettings; + private NlpVerticalLimitSettings limitSettings; /* * Validation data inputs. @@ -69,43 +70,43 @@ public ClassificationMultilabelPrimaryMetrics primaryMetric() { } /** - * Get the limitSettings property: Execution constraints for AutoMLJob. + * Get the featurizationSettings property: Featurization inputs needed for AutoML job. * - * @return the limitSettings value. + * @return the featurizationSettings value. */ - public NlpVerticalLimitSettings limitSettings() { - return this.limitSettings; + public NlpVerticalFeaturizationSettings featurizationSettings() { + return this.featurizationSettings; } /** - * Set the limitSettings property: Execution constraints for AutoMLJob. + * Set the featurizationSettings property: Featurization inputs needed for AutoML job. * - * @param limitSettings the limitSettings value to set. + * @param featurizationSettings the featurizationSettings value to set. * @return the TextClassificationMultilabel object itself. */ - public TextClassificationMultilabel withLimitSettings(NlpVerticalLimitSettings limitSettings) { - this.limitSettings = limitSettings; + public TextClassificationMultilabel + withFeaturizationSettings(NlpVerticalFeaturizationSettings featurizationSettings) { + this.featurizationSettings = featurizationSettings; return this; } /** - * Get the featurizationSettings property: Featurization inputs needed for AutoML job. + * Get the limitSettings property: Execution constraints for AutoMLJob. * - * @return the featurizationSettings value. + * @return the limitSettings value. */ - public NlpVerticalFeaturizationSettings featurizationSettings() { - return this.featurizationSettings; + public NlpVerticalLimitSettings limitSettings() { + return this.limitSettings; } /** - * Set the featurizationSettings property: Featurization inputs needed for AutoML job. + * Set the limitSettings property: Execution constraints for AutoMLJob. * - * @param featurizationSettings the featurizationSettings value to set. + * @param limitSettings the limitSettings value to set. * @return the TextClassificationMultilabel object itself. */ - public TextClassificationMultilabel - withFeaturizationSettings(NlpVerticalFeaturizationSettings featurizationSettings) { - this.featurizationSettings = featurizationSettings; + public TextClassificationMultilabel withLimitSettings(NlpVerticalLimitSettings limitSettings) { + this.limitSettings = limitSettings; return this; } @@ -142,8 +143,8 @@ public TextClassificationMultilabel withLogVerbosity(LogVerbosity logVerbosity) * {@inheritDoc} */ @Override - public TextClassificationMultilabel withTrainingData(MLTableJobInput trainingData) { - super.withTrainingData(trainingData); + public TextClassificationMultilabel withTargetColumnName(String targetColumnName) { + super.withTargetColumnName(targetColumnName); return this; } @@ -151,8 +152,8 @@ public TextClassificationMultilabel withTrainingData(MLTableJobInput trainingDat * {@inheritDoc} */ @Override - public TextClassificationMultilabel withTargetColumnName(String targetColumnName) { - super.withTargetColumnName(targetColumnName); + public TextClassificationMultilabel withTrainingData(MLTableJobInput trainingData) { + super.withTrainingData(trainingData); return this; } @@ -163,18 +164,26 @@ public TextClassificationMultilabel withTargetColumnName(String targetColumnName */ @Override public void validate() { - super.validate(); - if (limitSettings() != null) { - limitSettings().validate(); - } if (featurizationSettings() != null) { featurizationSettings().validate(); } + if (limitSettings() != null) { + limitSettings().validate(); + } if (validationData() != null) { validationData().validate(); } + if (trainingData() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property trainingData in model TextClassificationMultilabel")); + } else { + trainingData().validate(); + } } + private static final ClientLogger LOGGER = new ClientLogger(TextClassificationMultilabel.class); + /** * {@inheritDoc} */ @@ -185,8 +194,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("logVerbosity", logVerbosity() == null ? null : logVerbosity().toString()); jsonWriter.writeStringField("targetColumnName", targetColumnName()); jsonWriter.writeStringField("taskType", this.taskType == null ? null : this.taskType.toString()); - jsonWriter.writeJsonField("limitSettings", this.limitSettings); jsonWriter.writeJsonField("featurizationSettings", this.featurizationSettings); + jsonWriter.writeJsonField("limitSettings", this.limitSettings); jsonWriter.writeJsonField("validationData", this.validationData); return jsonWriter.writeEndObject(); } @@ -219,11 +228,11 @@ public static TextClassificationMultilabel fromJson(JsonReader jsonReader) throw } else if ("primaryMetric".equals(fieldName)) { deserializedTextClassificationMultilabel.primaryMetric = ClassificationMultilabelPrimaryMetrics.fromString(reader.getString()); - } else if ("limitSettings".equals(fieldName)) { - deserializedTextClassificationMultilabel.limitSettings = NlpVerticalLimitSettings.fromJson(reader); } else if ("featurizationSettings".equals(fieldName)) { deserializedTextClassificationMultilabel.featurizationSettings = NlpVerticalFeaturizationSettings.fromJson(reader); + } else if ("limitSettings".equals(fieldName)) { + deserializedTextClassificationMultilabel.limitSettings = NlpVerticalLimitSettings.fromJson(reader); } else if ("validationData".equals(fieldName)) { deserializedTextClassificationMultilabel.validationData = MLTableJobInput.fromJson(reader); } else { 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 2c6d58ad2ffc3..02173bf2ef576 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 @@ -5,6 +5,7 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -29,14 +30,14 @@ public final class TextNer extends AutoMLVertical { private ClassificationPrimaryMetrics primaryMetric; /* - * Execution constraints for AutoMLJob. + * Featurization inputs needed for AutoML job. */ - private NlpVerticalLimitSettings limitSettings; + private NlpVerticalFeaturizationSettings featurizationSettings; /* - * Featurization inputs needed for AutoML job. + * Execution constraints for AutoMLJob. */ - private NlpVerticalFeaturizationSettings featurizationSettings; + private NlpVerticalLimitSettings limitSettings; /* * Validation data inputs. @@ -70,42 +71,42 @@ public ClassificationPrimaryMetrics primaryMetric() { } /** - * Get the limitSettings property: Execution constraints for AutoMLJob. + * Get the featurizationSettings property: Featurization inputs needed for AutoML job. * - * @return the limitSettings value. + * @return the featurizationSettings value. */ - public NlpVerticalLimitSettings limitSettings() { - return this.limitSettings; + public NlpVerticalFeaturizationSettings featurizationSettings() { + return this.featurizationSettings; } /** - * Set the limitSettings property: Execution constraints for AutoMLJob. + * Set the featurizationSettings property: Featurization inputs needed for AutoML job. * - * @param limitSettings the limitSettings value to set. + * @param featurizationSettings the featurizationSettings value to set. * @return the TextNer object itself. */ - public TextNer withLimitSettings(NlpVerticalLimitSettings limitSettings) { - this.limitSettings = limitSettings; + public TextNer withFeaturizationSettings(NlpVerticalFeaturizationSettings featurizationSettings) { + this.featurizationSettings = featurizationSettings; return this; } /** - * Get the featurizationSettings property: Featurization inputs needed for AutoML job. + * Get the limitSettings property: Execution constraints for AutoMLJob. * - * @return the featurizationSettings value. + * @return the limitSettings value. */ - public NlpVerticalFeaturizationSettings featurizationSettings() { - return this.featurizationSettings; + public NlpVerticalLimitSettings limitSettings() { + return this.limitSettings; } /** - * Set the featurizationSettings property: Featurization inputs needed for AutoML job. + * Set the limitSettings property: Execution constraints for AutoMLJob. * - * @param featurizationSettings the featurizationSettings value to set. + * @param limitSettings the limitSettings value to set. * @return the TextNer object itself. */ - public TextNer withFeaturizationSettings(NlpVerticalFeaturizationSettings featurizationSettings) { - this.featurizationSettings = featurizationSettings; + public TextNer withLimitSettings(NlpVerticalLimitSettings limitSettings) { + this.limitSettings = limitSettings; return this; } @@ -142,8 +143,8 @@ public TextNer withLogVerbosity(LogVerbosity logVerbosity) { * {@inheritDoc} */ @Override - public TextNer withTrainingData(MLTableJobInput trainingData) { - super.withTrainingData(trainingData); + public TextNer withTargetColumnName(String targetColumnName) { + super.withTargetColumnName(targetColumnName); return this; } @@ -151,8 +152,8 @@ public TextNer withTrainingData(MLTableJobInput trainingData) { * {@inheritDoc} */ @Override - public TextNer withTargetColumnName(String targetColumnName) { - super.withTargetColumnName(targetColumnName); + public TextNer withTrainingData(MLTableJobInput trainingData) { + super.withTrainingData(trainingData); return this; } @@ -163,18 +164,25 @@ public TextNer withTargetColumnName(String targetColumnName) { */ @Override public void validate() { - super.validate(); - if (limitSettings() != null) { - limitSettings().validate(); - } if (featurizationSettings() != null) { featurizationSettings().validate(); } + if (limitSettings() != null) { + limitSettings().validate(); + } if (validationData() != null) { validationData().validate(); } + if (trainingData() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property trainingData in model TextNer")); + } else { + trainingData().validate(); + } } + private static final ClientLogger LOGGER = new ClientLogger(TextNer.class); + /** * {@inheritDoc} */ @@ -185,8 +193,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("logVerbosity", logVerbosity() == null ? null : logVerbosity().toString()); jsonWriter.writeStringField("targetColumnName", targetColumnName()); jsonWriter.writeStringField("taskType", this.taskType == null ? null : this.taskType.toString()); - jsonWriter.writeJsonField("limitSettings", this.limitSettings); jsonWriter.writeJsonField("featurizationSettings", this.featurizationSettings); + jsonWriter.writeJsonField("limitSettings", this.limitSettings); jsonWriter.writeJsonField("validationData", this.validationData); return jsonWriter.writeEndObject(); } @@ -217,10 +225,10 @@ public static TextNer fromJson(JsonReader jsonReader) throws IOException { deserializedTextNer.taskType = TaskType.fromString(reader.getString()); } else if ("primaryMetric".equals(fieldName)) { deserializedTextNer.primaryMetric = ClassificationPrimaryMetrics.fromString(reader.getString()); - } else if ("limitSettings".equals(fieldName)) { - deserializedTextNer.limitSettings = NlpVerticalLimitSettings.fromJson(reader); } else if ("featurizationSettings".equals(fieldName)) { deserializedTextNer.featurizationSettings = NlpVerticalFeaturizationSettings.fromJson(reader); + } else if ("limitSettings".equals(fieldName)) { + deserializedTextNer.limitSettings = NlpVerticalLimitSettings.fromJson(reader); } else if ("validationData".equals(fieldName)) { deserializedTextNer.validationData = MLTableJobInput.fromJson(reader); } else { 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 index 2a9d74fb5bbd8..074d81458ba8a 100644 --- 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 @@ -12,7 +12,7 @@ import java.io.IOException; /** - * Describes the tmpfs options for the container. + * The TmpfsOptions model. */ @Fluent public final class TmpfsOptions implements JsonSerializable { 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 index 8aa049e6d9a2d..2f50a45f36aeb 100644 --- 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 @@ -69,7 +69,6 @@ public TopNFeaturesByAttribution withTop(Integer top) { */ @Override public void validate() { - super.validate(); } /** 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 3f8ac294cd041..f18dd25733f0a 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 @@ -19,14 +19,19 @@ @Fluent public class TrainingSettings implements JsonSerializable { /* - * Flag for enabling onnx compatible models. + * Enable recommendation of DNN models. */ - private Boolean enableOnnxCompatibleModels; + private Boolean enableDnnTraining; /* - * Stack ensemble settings for stack ensemble run. + * Flag to turn on explainability on best model. */ - private StackEnsembleSettings stackEnsembleSettings; + private Boolean enableModelExplainability; + + /* + * Flag for enabling onnx compatible models. + */ + private Boolean enableOnnxCompatibleModels; /* * Enable stack ensemble run. @@ -46,14 +51,9 @@ public class TrainingSettings implements JsonSerializable { private Duration ensembleModelDownloadTimeout; /* - * Flag to turn on explainability on best model. - */ - private Boolean enableModelExplainability; - - /* - * Enable recommendation of DNN models. + * Stack ensemble settings for stack ensemble run. */ - private Boolean enableDnnTraining; + private StackEnsembleSettings stackEnsembleSettings; /** * Creates an instance of TrainingSettings class. @@ -62,42 +62,62 @@ public TrainingSettings() { } /** - * Get the enableOnnxCompatibleModels property: Flag for enabling onnx compatible models. + * Get the enableDnnTraining property: Enable recommendation of DNN models. * - * @return the enableOnnxCompatibleModels value. + * @return the enableDnnTraining value. */ - public Boolean enableOnnxCompatibleModels() { - return this.enableOnnxCompatibleModels; + public Boolean enableDnnTraining() { + return this.enableDnnTraining; } /** - * Set the enableOnnxCompatibleModels property: Flag for enabling onnx compatible models. + * Set the enableDnnTraining property: Enable recommendation of DNN models. * - * @param enableOnnxCompatibleModels the enableOnnxCompatibleModels value to set. + * @param enableDnnTraining the enableDnnTraining value to set. * @return the TrainingSettings object itself. */ - public TrainingSettings withEnableOnnxCompatibleModels(Boolean enableOnnxCompatibleModels) { - this.enableOnnxCompatibleModels = enableOnnxCompatibleModels; + public TrainingSettings withEnableDnnTraining(Boolean enableDnnTraining) { + this.enableDnnTraining = enableDnnTraining; return this; } /** - * Get the stackEnsembleSettings property: Stack ensemble settings for stack ensemble run. + * Get the enableModelExplainability property: Flag to turn on explainability on best model. * - * @return the stackEnsembleSettings value. + * @return the enableModelExplainability value. */ - public StackEnsembleSettings stackEnsembleSettings() { - return this.stackEnsembleSettings; + public Boolean enableModelExplainability() { + return this.enableModelExplainability; } /** - * Set the stackEnsembleSettings property: Stack ensemble settings for stack ensemble run. + * Set the enableModelExplainability property: Flag to turn on explainability on best model. * - * @param stackEnsembleSettings the stackEnsembleSettings value to set. + * @param enableModelExplainability the enableModelExplainability value to set. * @return the TrainingSettings object itself. */ - public TrainingSettings withStackEnsembleSettings(StackEnsembleSettings stackEnsembleSettings) { - this.stackEnsembleSettings = stackEnsembleSettings; + public TrainingSettings withEnableModelExplainability(Boolean enableModelExplainability) { + this.enableModelExplainability = enableModelExplainability; + return this; + } + + /** + * Get the enableOnnxCompatibleModels property: Flag for enabling onnx compatible models. + * + * @return the enableOnnxCompatibleModels value. + */ + public Boolean enableOnnxCompatibleModels() { + return this.enableOnnxCompatibleModels; + } + + /** + * Set the enableOnnxCompatibleModels property: Flag for enabling onnx compatible models. + * + * @param enableOnnxCompatibleModels the enableOnnxCompatibleModels value to set. + * @return the TrainingSettings object itself. + */ + public TrainingSettings withEnableOnnxCompatibleModels(Boolean enableOnnxCompatibleModels) { + this.enableOnnxCompatibleModels = enableOnnxCompatibleModels; return this; } @@ -166,42 +186,22 @@ public TrainingSettings withEnsembleModelDownloadTimeout(Duration ensembleModelD } /** - * Get the enableModelExplainability property: Flag to turn on explainability on best model. - * - * @return the enableModelExplainability value. - */ - public Boolean enableModelExplainability() { - return this.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. - */ - public TrainingSettings withEnableModelExplainability(Boolean enableModelExplainability) { - this.enableModelExplainability = enableModelExplainability; - return this; - } - - /** - * Get the enableDnnTraining property: Enable recommendation of DNN models. + * Get the stackEnsembleSettings property: Stack ensemble settings for stack ensemble run. * - * @return the enableDnnTraining value. + * @return the stackEnsembleSettings value. */ - public Boolean enableDnnTraining() { - return this.enableDnnTraining; + public StackEnsembleSettings stackEnsembleSettings() { + return this.stackEnsembleSettings; } /** - * Set the enableDnnTraining property: Enable recommendation of DNN models. + * Set the stackEnsembleSettings property: Stack ensemble settings for stack ensemble run. * - * @param enableDnnTraining the enableDnnTraining value to set. + * @param stackEnsembleSettings the stackEnsembleSettings value to set. * @return the TrainingSettings object itself. */ - public TrainingSettings withEnableDnnTraining(Boolean enableDnnTraining) { - this.enableDnnTraining = enableDnnTraining; + public TrainingSettings withStackEnsembleSettings(StackEnsembleSettings stackEnsembleSettings) { + this.stackEnsembleSettings = stackEnsembleSettings; return this; } @@ -222,14 +222,14 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enableDnnTraining", this.enableDnnTraining); + jsonWriter.writeBooleanField("enableModelExplainability", this.enableModelExplainability); jsonWriter.writeBooleanField("enableOnnxCompatibleModels", this.enableOnnxCompatibleModels); - jsonWriter.writeJsonField("stackEnsembleSettings", this.stackEnsembleSettings); jsonWriter.writeBooleanField("enableStackEnsemble", this.enableStackEnsemble); jsonWriter.writeBooleanField("enableVoteEnsemble", this.enableVoteEnsemble); jsonWriter.writeStringField("ensembleModelDownloadTimeout", CoreUtils.durationToStringWithDays(this.ensembleModelDownloadTimeout)); - jsonWriter.writeBooleanField("enableModelExplainability", this.enableModelExplainability); - jsonWriter.writeBooleanField("enableDnnTraining", this.enableDnnTraining); + jsonWriter.writeJsonField("stackEnsembleSettings", this.stackEnsembleSettings); return jsonWriter.writeEndObject(); } @@ -248,11 +248,13 @@ public static TrainingSettings fromJson(JsonReader jsonReader) throws IOExceptio String fieldName = reader.getFieldName(); reader.nextToken(); - if ("enableOnnxCompatibleModels".equals(fieldName)) { + if ("enableDnnTraining".equals(fieldName)) { + deserializedTrainingSettings.enableDnnTraining = reader.getNullable(JsonReader::getBoolean); + } else if ("enableModelExplainability".equals(fieldName)) { + deserializedTrainingSettings.enableModelExplainability = reader.getNullable(JsonReader::getBoolean); + } else if ("enableOnnxCompatibleModels".equals(fieldName)) { deserializedTrainingSettings.enableOnnxCompatibleModels = reader.getNullable(JsonReader::getBoolean); - } else if ("stackEnsembleSettings".equals(fieldName)) { - deserializedTrainingSettings.stackEnsembleSettings = StackEnsembleSettings.fromJson(reader); } else if ("enableStackEnsemble".equals(fieldName)) { deserializedTrainingSettings.enableStackEnsemble = reader.getNullable(JsonReader::getBoolean); } else if ("enableVoteEnsemble".equals(fieldName)) { @@ -260,10 +262,8 @@ public static TrainingSettings fromJson(JsonReader jsonReader) throws IOExceptio } else if ("ensembleModelDownloadTimeout".equals(fieldName)) { deserializedTrainingSettings.ensembleModelDownloadTimeout = reader.getNullable(nonNullReader -> Duration.parse(nonNullReader.getString())); - } else if ("enableModelExplainability".equals(fieldName)) { - deserializedTrainingSettings.enableModelExplainability = reader.getNullable(JsonReader::getBoolean); - } else if ("enableDnnTraining".equals(fieldName)) { - deserializedTrainingSettings.enableDnnTraining = reader.getNullable(JsonReader::getBoolean); + } else if ("stackEnsembleSettings".equals(fieldName)) { + deserializedTrainingSettings.stackEnsembleSettings = StackEnsembleSettings.fromJson(reader); } else { reader.skipChildren(); } 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 f95ef9e2e99fe..eb17893e0e600 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 @@ -28,6 +28,11 @@ public final class TrialComponent implements JsonSerializable { */ private String command; + /* + * Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. + */ + private DistributionConfiguration distribution; + /* * [Required] The ARM resource ID of the Environment specification for the job. */ @@ -38,11 +43,6 @@ public final class TrialComponent implements JsonSerializable { */ private Map environmentVariables; - /* - * Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. - */ - private DistributionConfiguration distribution; - /* * Compute Resource configuration for the job. */ @@ -94,6 +94,28 @@ public TrialComponent withCommand(String command) { return this; } + /** + * 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() { + return this.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. + */ + public TrialComponent withDistribution(DistributionConfiguration distribution) { + this.distribution = distribution; + return this; + } + /** * Get the environmentId property: [Required] The ARM resource ID of the Environment specification for the job. * @@ -134,28 +156,6 @@ public TrialComponent withEnvironmentVariables(Map environmentVa return this; } - /** - * 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() { - return this.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. - */ - public TrialComponent withDistribution(DistributionConfiguration distribution) { - this.distribution = distribution; - return this; - } - /** * Get the resources property: Compute Resource configuration for the job. * @@ -186,13 +186,13 @@ public void validate() { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property command in model TrialComponent")); } + if (distribution() != null) { + distribution().validate(); + } if (environmentId() == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property environmentId in model TrialComponent")); } - if (distribution() != null) { - distribution().validate(); - } if (resources() != null) { resources().validate(); } @@ -209,9 +209,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("command", this.command); jsonWriter.writeStringField("environmentId", this.environmentId); jsonWriter.writeStringField("codeId", this.codeId); + jsonWriter.writeJsonField("distribution", this.distribution); jsonWriter.writeMapField("environmentVariables", this.environmentVariables, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("distribution", this.distribution); jsonWriter.writeJsonField("resources", this.resources); return jsonWriter.writeEndObject(); } @@ -238,11 +238,11 @@ public static TrialComponent fromJson(JsonReader jsonReader) throws IOException deserializedTrialComponent.environmentId = reader.getString(); } else if ("codeId".equals(fieldName)) { deserializedTrialComponent.codeId = reader.getString(); + } else if ("distribution".equals(fieldName)) { + deserializedTrialComponent.distribution = DistributionConfiguration.fromJson(reader); } else if ("environmentVariables".equals(fieldName)) { Map environmentVariables = reader.readMap(reader1 -> reader1.getString()); deserializedTrialComponent.environmentVariables = environmentVariables; - } else if ("distribution".equals(fieldName)) { - deserializedTrialComponent.distribution = DistributionConfiguration.fromJson(reader); } else if ("resources".equals(fieldName)) { deserializedTrialComponent.resources = JobResourceConfiguration.fromJson(reader); } else { 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 27ce7c891231d..927bfc41347f0 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 @@ -22,14 +22,14 @@ public final class TritonModelJobInput extends JobInput { private JobInputType jobInputType = JobInputType.TRITON_MODEL; /* - * [Required] Input Asset URI. + * Input Asset Delivery Mode. */ - private String uri; + private InputDeliveryMode mode; /* - * Input Asset Delivery Mode. + * [Required] Input Asset URI. */ - private InputDeliveryMode mode; + private String uri; /** * Creates an instance of TritonModelJobInput class. @@ -48,42 +48,42 @@ public JobInputType jobInputType() { } /** - * Get the uri property: [Required] Input Asset URI. + * Get the mode property: Input Asset Delivery Mode. * - * @return the uri value. + * @return the mode value. */ - public String uri() { - return this.uri; + public InputDeliveryMode mode() { + return this.mode; } /** - * Set the uri property: [Required] Input Asset URI. + * Set the mode property: Input Asset Delivery Mode. * - * @param uri the uri value to set. + * @param mode the mode value to set. * @return the TritonModelJobInput object itself. */ - public TritonModelJobInput withUri(String uri) { - this.uri = uri; + public TritonModelJobInput withMode(InputDeliveryMode mode) { + this.mode = mode; return this; } /** - * Get the mode property: Input Asset Delivery Mode. + * Get the uri property: [Required] Input Asset URI. * - * @return the mode value. + * @return the uri value. */ - public InputDeliveryMode mode() { - return this.mode; + public String uri() { + return this.uri; } /** - * Set the mode property: Input Asset Delivery Mode. + * Set the uri property: [Required] Input Asset URI. * - * @param mode the mode value to set. + * @param uri the uri value to set. * @return the TritonModelJobInput object itself. */ - public TritonModelJobInput withMode(InputDeliveryMode mode) { - this.mode = mode; + public TritonModelJobInput withUri(String uri) { + this.uri = uri; return this; } @@ -103,7 +103,6 @@ public TritonModelJobInput withDescription(String description) { */ @Override public void validate() { - super.validate(); if (uri() == null) { throw LOGGER.atError() .log(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 33028b9187556..89656ba598df7 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 @@ -21,15 +21,20 @@ public final class TritonModelJobOutput extends JobOutput { private JobOutputType jobOutputType = JobOutputType.TRITON_MODEL; /* - * Output Asset URI. + * Output Asset Name. */ - private String uri; + private String assetName; /* * Output Asset Delivery Mode. */ private OutputDeliveryMode mode; + /* + * Output Asset URI. + */ + private String uri; + /** * Creates an instance of TritonModelJobOutput class. */ @@ -47,22 +52,22 @@ public JobOutputType jobOutputType() { } /** - * Get the uri property: Output Asset URI. + * Get the assetName property: Output Asset Name. * - * @return the uri value. + * @return the assetName value. */ - public String uri() { - return this.uri; + public String assetName() { + return this.assetName; } /** - * Set the uri property: Output Asset URI. + * Set the assetName property: Output Asset Name. * - * @param uri the uri value to set. + * @param assetName the assetName value to set. * @return the TritonModelJobOutput object itself. */ - public TritonModelJobOutput withUri(String uri) { - this.uri = uri; + public TritonModelJobOutput withAssetName(String assetName) { + this.assetName = assetName; return this; } @@ -86,6 +91,26 @@ public TritonModelJobOutput withMode(OutputDeliveryMode mode) { return this; } + /** + * Get the uri property: Output Asset URI. + * + * @return the uri value. + */ + public String uri() { + return this.uri; + } + + /** + * Set the uri property: Output Asset URI. + * + * @param uri the uri value to set. + * @return the TritonModelJobOutput object itself. + */ + public TritonModelJobOutput withUri(String uri) { + this.uri = uri; + return this; + } + /** * {@inheritDoc} */ @@ -102,7 +127,6 @@ public TritonModelJobOutput withDescription(String description) { */ @Override public void validate() { - super.validate(); } /** @@ -113,8 +137,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); jsonWriter.writeStringField("jobOutputType", this.jobOutputType == null ? null : this.jobOutputType.toString()); - jsonWriter.writeStringField("uri", this.uri); + jsonWriter.writeStringField("assetName", this.assetName); jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + jsonWriter.writeStringField("uri", this.uri); return jsonWriter.writeEndObject(); } @@ -137,10 +162,12 @@ public static TritonModelJobOutput fromJson(JsonReader jsonReader) throws IOExce deserializedTritonModelJobOutput.withDescription(reader.getString()); } else if ("jobOutputType".equals(fieldName)) { deserializedTritonModelJobOutput.jobOutputType = JobOutputType.fromString(reader.getString()); - } else if ("uri".equals(fieldName)) { - deserializedTritonModelJobOutput.uri = reader.getString(); + } else if ("assetName".equals(fieldName)) { + deserializedTritonModelJobOutput.assetName = reader.getString(); } else if ("mode".equals(fieldName)) { deserializedTritonModelJobOutput.mode = OutputDeliveryMode.fromString(reader.getString()); + } else if ("uri".equals(fieldName)) { + deserializedTritonModelJobOutput.uri = reader.getString(); } else { reader.skipChildren(); } 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 916847f745a19..604a446918b7b 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 @@ -65,8 +65,8 @@ public TruncationSelectionPolicy withTruncationPercentage(Integer truncationPerc * {@inheritDoc} */ @Override - public TruncationSelectionPolicy withEvaluationInterval(Integer evaluationInterval) { - super.withEvaluationInterval(evaluationInterval); + public TruncationSelectionPolicy withDelayEvaluation(Integer delayEvaluation) { + super.withDelayEvaluation(delayEvaluation); return this; } @@ -74,8 +74,8 @@ public TruncationSelectionPolicy withEvaluationInterval(Integer evaluationInterv * {@inheritDoc} */ @Override - public TruncationSelectionPolicy withDelayEvaluation(Integer delayEvaluation) { - super.withDelayEvaluation(delayEvaluation); + public TruncationSelectionPolicy withEvaluationInterval(Integer evaluationInterval) { + super.withEvaluationInterval(evaluationInterval); return this; } @@ -86,7 +86,6 @@ public TruncationSelectionPolicy withDelayEvaluation(Integer delayEvaluation) { */ @Override public void validate() { - super.validate(); } /** @@ -95,8 +94,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("evaluationInterval", evaluationInterval()); jsonWriter.writeNumberField("delayEvaluation", delayEvaluation()); + jsonWriter.writeNumberField("evaluationInterval", evaluationInterval()); jsonWriter.writeStringField("policyType", this.policyType == null ? null : this.policyType.toString()); jsonWriter.writeNumberField("truncationPercentage", this.truncationPercentage); return jsonWriter.writeEndObject(); @@ -117,11 +116,11 @@ public static TruncationSelectionPolicy fromJson(JsonReader jsonReader) throws I String fieldName = reader.getFieldName(); reader.nextToken(); - if ("evaluationInterval".equals(fieldName)) { + if ("delayEvaluation".equals(fieldName)) { + deserializedTruncationSelectionPolicy.withDelayEvaluation(reader.getNullable(JsonReader::getInt)); + } else if ("evaluationInterval".equals(fieldName)) { deserializedTruncationSelectionPolicy .withEvaluationInterval(reader.getNullable(JsonReader::getInt)); - } else if ("delayEvaluation".equals(fieldName)) { - deserializedTruncationSelectionPolicy.withDelayEvaluation(reader.getNullable(JsonReader::getInt)); } else if ("policyType".equals(fieldName)) { deserializedTruncationSelectionPolicy.policyType = EarlyTerminationPolicyType.fromString(reader.getString()); 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 febb0811f85ae..16f5ce3c88627 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 @@ -5,6 +5,7 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -50,8 +51,8 @@ public UriFileDataVersion withDataUri(String dataUri) { * {@inheritDoc} */ @Override - public UriFileDataVersion withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); + public UriFileDataVersion withIsAnonymous(Boolean isAnonymous) { + super.withIsAnonymous(isAnonymous); return this; } @@ -59,8 +60,8 @@ public UriFileDataVersion withIsArchived(Boolean isArchived) { * {@inheritDoc} */ @Override - public UriFileDataVersion withIsAnonymous(Boolean isAnonymous) { - super.withIsAnonymous(isAnonymous); + public UriFileDataVersion withIsArchived(Boolean isArchived) { + super.withIsArchived(isArchived); return this; } @@ -77,8 +78,8 @@ public UriFileDataVersion withDescription(String description) { * {@inheritDoc} */ @Override - public UriFileDataVersion withTags(Map tags) { - super.withTags(tags); + public UriFileDataVersion withProperties(Map properties) { + super.withProperties(properties); return this; } @@ -86,8 +87,8 @@ public UriFileDataVersion withTags(Map tags) { * {@inheritDoc} */ @Override - public UriFileDataVersion withProperties(Map properties) { - super.withProperties(properties); + public UriFileDataVersion withTags(Map tags) { + super.withTags(tags); return this; } @@ -98,9 +99,14 @@ public UriFileDataVersion withProperties(Map properties) { */ @Override public void validate() { - super.validate(); + if (dataUri() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property dataUri in model UriFileDataVersion")); + } } + private static final ClientLogger LOGGER = new ClientLogger(UriFileDataVersion.class); + /** * {@inheritDoc} */ @@ -109,10 +115,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("dataUri", dataUri()); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", isArchived()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isAnonymous", isAnonymous()); + jsonWriter.writeBooleanField("isArchived", isArchived()); jsonWriter.writeStringField("dataType", this.dataType == null ? null : this.dataType.toString()); return jsonWriter.writeEndObject(); } @@ -137,16 +143,16 @@ public static UriFileDataVersion fromJson(JsonReader jsonReader) throws IOExcept deserializedUriFileDataVersion.withDataUri(reader.getString()); } else if ("description".equals(fieldName)) { deserializedUriFileDataVersion.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedUriFileDataVersion.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedUriFileDataVersion.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedUriFileDataVersion.withIsArchived(reader.getNullable(JsonReader::getBoolean)); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedUriFileDataVersion.withTags(tags); } else if ("isAnonymous".equals(fieldName)) { deserializedUriFileDataVersion.withIsAnonymous(reader.getNullable(JsonReader::getBoolean)); + } else if ("isArchived".equals(fieldName)) { + deserializedUriFileDataVersion.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("dataType".equals(fieldName)) { deserializedUriFileDataVersion.dataType = DataType.fromString(reader.getString()); } else { 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 e78e095795f9b..81c2c6b4f1b7a 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 @@ -22,14 +22,14 @@ public final class UriFileJobInput extends JobInput { private JobInputType jobInputType = JobInputType.URI_FILE; /* - * [Required] Input Asset URI. + * Input Asset Delivery Mode. */ - private String uri; + private InputDeliveryMode mode; /* - * Input Asset Delivery Mode. + * [Required] Input Asset URI. */ - private InputDeliveryMode mode; + private String uri; /** * Creates an instance of UriFileJobInput class. @@ -48,42 +48,42 @@ public JobInputType jobInputType() { } /** - * Get the uri property: [Required] Input Asset URI. + * Get the mode property: Input Asset Delivery Mode. * - * @return the uri value. + * @return the mode value. */ - public String uri() { - return this.uri; + public InputDeliveryMode mode() { + return this.mode; } /** - * Set the uri property: [Required] Input Asset URI. + * Set the mode property: Input Asset Delivery Mode. * - * @param uri the uri value to set. + * @param mode the mode value to set. * @return the UriFileJobInput object itself. */ - public UriFileJobInput withUri(String uri) { - this.uri = uri; + public UriFileJobInput withMode(InputDeliveryMode mode) { + this.mode = mode; return this; } /** - * Get the mode property: Input Asset Delivery Mode. + * Get the uri property: [Required] Input Asset URI. * - * @return the mode value. + * @return the uri value. */ - public InputDeliveryMode mode() { - return this.mode; + public String uri() { + return this.uri; } /** - * Set the mode property: Input Asset Delivery Mode. + * Set the uri property: [Required] Input Asset URI. * - * @param mode the mode value to set. + * @param uri the uri value to set. * @return the UriFileJobInput object itself. */ - public UriFileJobInput withMode(InputDeliveryMode mode) { - this.mode = mode; + public UriFileJobInput withUri(String uri) { + this.uri = uri; return this; } @@ -103,7 +103,6 @@ public UriFileJobInput withDescription(String description) { */ @Override public void validate() { - super.validate(); if (uri() == null) { throw LOGGER.atError() .log(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 c041cc90a3646..01b0bc7a02630 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 @@ -21,15 +21,20 @@ public final class UriFileJobOutput extends JobOutput { private JobOutputType jobOutputType = JobOutputType.URI_FILE; /* - * Output Asset URI. + * Output Asset Name. */ - private String uri; + private String assetName; /* * Output Asset Delivery Mode. */ private OutputDeliveryMode mode; + /* + * Output Asset URI. + */ + private String uri; + /** * Creates an instance of UriFileJobOutput class. */ @@ -47,22 +52,22 @@ public JobOutputType jobOutputType() { } /** - * Get the uri property: Output Asset URI. + * Get the assetName property: Output Asset Name. * - * @return the uri value. + * @return the assetName value. */ - public String uri() { - return this.uri; + public String assetName() { + return this.assetName; } /** - * Set the uri property: Output Asset URI. + * Set the assetName property: Output Asset Name. * - * @param uri the uri value to set. + * @param assetName the assetName value to set. * @return the UriFileJobOutput object itself. */ - public UriFileJobOutput withUri(String uri) { - this.uri = uri; + public UriFileJobOutput withAssetName(String assetName) { + this.assetName = assetName; return this; } @@ -86,6 +91,26 @@ public UriFileJobOutput withMode(OutputDeliveryMode mode) { return this; } + /** + * Get the uri property: Output Asset URI. + * + * @return the uri value. + */ + public String uri() { + return this.uri; + } + + /** + * Set the uri property: Output Asset URI. + * + * @param uri the uri value to set. + * @return the UriFileJobOutput object itself. + */ + public UriFileJobOutput withUri(String uri) { + this.uri = uri; + return this; + } + /** * {@inheritDoc} */ @@ -102,7 +127,6 @@ public UriFileJobOutput withDescription(String description) { */ @Override public void validate() { - super.validate(); } /** @@ -113,8 +137,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); jsonWriter.writeStringField("jobOutputType", this.jobOutputType == null ? null : this.jobOutputType.toString()); - jsonWriter.writeStringField("uri", this.uri); + jsonWriter.writeStringField("assetName", this.assetName); jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + jsonWriter.writeStringField("uri", this.uri); return jsonWriter.writeEndObject(); } @@ -137,10 +162,12 @@ public static UriFileJobOutput fromJson(JsonReader jsonReader) throws IOExceptio deserializedUriFileJobOutput.withDescription(reader.getString()); } else if ("jobOutputType".equals(fieldName)) { deserializedUriFileJobOutput.jobOutputType = JobOutputType.fromString(reader.getString()); - } else if ("uri".equals(fieldName)) { - deserializedUriFileJobOutput.uri = reader.getString(); + } else if ("assetName".equals(fieldName)) { + deserializedUriFileJobOutput.assetName = reader.getString(); } else if ("mode".equals(fieldName)) { deserializedUriFileJobOutput.mode = OutputDeliveryMode.fromString(reader.getString()); + } else if ("uri".equals(fieldName)) { + deserializedUriFileJobOutput.uri = reader.getString(); } else { reader.skipChildren(); } 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 0eb6c53ff5cb6..cddf99a77e0b4 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 @@ -5,6 +5,7 @@ package com.azure.resourcemanager.machinelearning.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -50,8 +51,8 @@ public UriFolderDataVersion withDataUri(String dataUri) { * {@inheritDoc} */ @Override - public UriFolderDataVersion withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); + public UriFolderDataVersion withIsAnonymous(Boolean isAnonymous) { + super.withIsAnonymous(isAnonymous); return this; } @@ -59,8 +60,8 @@ public UriFolderDataVersion withIsArchived(Boolean isArchived) { * {@inheritDoc} */ @Override - public UriFolderDataVersion withIsAnonymous(Boolean isAnonymous) { - super.withIsAnonymous(isAnonymous); + public UriFolderDataVersion withIsArchived(Boolean isArchived) { + super.withIsArchived(isArchived); return this; } @@ -77,8 +78,8 @@ public UriFolderDataVersion withDescription(String description) { * {@inheritDoc} */ @Override - public UriFolderDataVersion withTags(Map tags) { - super.withTags(tags); + public UriFolderDataVersion withProperties(Map properties) { + super.withProperties(properties); return this; } @@ -86,8 +87,8 @@ public UriFolderDataVersion withTags(Map tags) { * {@inheritDoc} */ @Override - public UriFolderDataVersion withProperties(Map properties) { - super.withProperties(properties); + public UriFolderDataVersion withTags(Map tags) { + super.withTags(tags); return this; } @@ -98,9 +99,14 @@ public UriFolderDataVersion withProperties(Map properties) { */ @Override public void validate() { - super.validate(); + if (dataUri() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property dataUri in model UriFolderDataVersion")); + } } + private static final ClientLogger LOGGER = new ClientLogger(UriFolderDataVersion.class); + /** * {@inheritDoc} */ @@ -109,10 +115,10 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("dataUri", dataUri()); jsonWriter.writeStringField("description", description()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("properties", properties(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("isArchived", isArchived()); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeBooleanField("isAnonymous", isAnonymous()); + jsonWriter.writeBooleanField("isArchived", isArchived()); jsonWriter.writeStringField("dataType", this.dataType == null ? null : this.dataType.toString()); return jsonWriter.writeEndObject(); } @@ -137,16 +143,16 @@ public static UriFolderDataVersion fromJson(JsonReader jsonReader) throws IOExce deserializedUriFolderDataVersion.withDataUri(reader.getString()); } else if ("description".equals(fieldName)) { deserializedUriFolderDataVersion.withDescription(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedUriFolderDataVersion.withTags(tags); } else if ("properties".equals(fieldName)) { Map properties = reader.readMap(reader1 -> reader1.getString()); deserializedUriFolderDataVersion.withProperties(properties); - } else if ("isArchived".equals(fieldName)) { - deserializedUriFolderDataVersion.withIsArchived(reader.getNullable(JsonReader::getBoolean)); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedUriFolderDataVersion.withTags(tags); } else if ("isAnonymous".equals(fieldName)) { deserializedUriFolderDataVersion.withIsAnonymous(reader.getNullable(JsonReader::getBoolean)); + } else if ("isArchived".equals(fieldName)) { + deserializedUriFolderDataVersion.withIsArchived(reader.getNullable(JsonReader::getBoolean)); } else if ("dataType".equals(fieldName)) { deserializedUriFolderDataVersion.dataType = DataType.fromString(reader.getString()); } else { 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 c206211b1d17c..ea2d91a9cf60d 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 @@ -22,14 +22,14 @@ public final class UriFolderJobInput extends JobInput { private JobInputType jobInputType = JobInputType.URI_FOLDER; /* - * [Required] Input Asset URI. + * Input Asset Delivery Mode. */ - private String uri; + private InputDeliveryMode mode; /* - * Input Asset Delivery Mode. + * [Required] Input Asset URI. */ - private InputDeliveryMode mode; + private String uri; /** * Creates an instance of UriFolderJobInput class. @@ -48,42 +48,42 @@ public JobInputType jobInputType() { } /** - * Get the uri property: [Required] Input Asset URI. + * Get the mode property: Input Asset Delivery Mode. * - * @return the uri value. + * @return the mode value. */ - public String uri() { - return this.uri; + public InputDeliveryMode mode() { + return this.mode; } /** - * Set the uri property: [Required] Input Asset URI. + * Set the mode property: Input Asset Delivery Mode. * - * @param uri the uri value to set. + * @param mode the mode value to set. * @return the UriFolderJobInput object itself. */ - public UriFolderJobInput withUri(String uri) { - this.uri = uri; + public UriFolderJobInput withMode(InputDeliveryMode mode) { + this.mode = mode; return this; } /** - * Get the mode property: Input Asset Delivery Mode. + * Get the uri property: [Required] Input Asset URI. * - * @return the mode value. + * @return the uri value. */ - public InputDeliveryMode mode() { - return this.mode; + public String uri() { + return this.uri; } /** - * Set the mode property: Input Asset Delivery Mode. + * Set the uri property: [Required] Input Asset URI. * - * @param mode the mode value to set. + * @param uri the uri value to set. * @return the UriFolderJobInput object itself. */ - public UriFolderJobInput withMode(InputDeliveryMode mode) { - this.mode = mode; + public UriFolderJobInput withUri(String uri) { + this.uri = uri; return this; } @@ -103,7 +103,6 @@ public UriFolderJobInput withDescription(String description) { */ @Override public void validate() { - super.validate(); if (uri() == null) { throw LOGGER.atError() .log(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 1a9474aec429d..8548e583d5b8d 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 @@ -21,15 +21,20 @@ public final class UriFolderJobOutput extends JobOutput { private JobOutputType jobOutputType = JobOutputType.URI_FOLDER; /* - * Output Asset URI. + * Output Asset Name. */ - private String uri; + private String assetName; /* * Output Asset Delivery Mode. */ private OutputDeliveryMode mode; + /* + * Output Asset URI. + */ + private String uri; + /** * Creates an instance of UriFolderJobOutput class. */ @@ -47,22 +52,22 @@ public JobOutputType jobOutputType() { } /** - * Get the uri property: Output Asset URI. + * Get the assetName property: Output Asset Name. * - * @return the uri value. + * @return the assetName value. */ - public String uri() { - return this.uri; + public String assetName() { + return this.assetName; } /** - * Set the uri property: Output Asset URI. + * Set the assetName property: Output Asset Name. * - * @param uri the uri value to set. + * @param assetName the assetName value to set. * @return the UriFolderJobOutput object itself. */ - public UriFolderJobOutput withUri(String uri) { - this.uri = uri; + public UriFolderJobOutput withAssetName(String assetName) { + this.assetName = assetName; return this; } @@ -86,6 +91,26 @@ public UriFolderJobOutput withMode(OutputDeliveryMode mode) { return this; } + /** + * Get the uri property: Output Asset URI. + * + * @return the uri value. + */ + public String uri() { + return this.uri; + } + + /** + * Set the uri property: Output Asset URI. + * + * @param uri the uri value to set. + * @return the UriFolderJobOutput object itself. + */ + public UriFolderJobOutput withUri(String uri) { + this.uri = uri; + return this; + } + /** * {@inheritDoc} */ @@ -102,7 +127,6 @@ public UriFolderJobOutput withDescription(String description) { */ @Override public void validate() { - super.validate(); } /** @@ -113,8 +137,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("description", description()); jsonWriter.writeStringField("jobOutputType", this.jobOutputType == null ? null : this.jobOutputType.toString()); - jsonWriter.writeStringField("uri", this.uri); + jsonWriter.writeStringField("assetName", this.assetName); jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + jsonWriter.writeStringField("uri", this.uri); return jsonWriter.writeEndObject(); } @@ -137,10 +162,12 @@ public static UriFolderJobOutput fromJson(JsonReader jsonReader) throws IOExcept deserializedUriFolderJobOutput.withDescription(reader.getString()); } else if ("jobOutputType".equals(fieldName)) { deserializedUriFolderJobOutput.jobOutputType = JobOutputType.fromString(reader.getString()); - } else if ("uri".equals(fieldName)) { - deserializedUriFolderJobOutput.uri = reader.getString(); + } else if ("assetName".equals(fieldName)) { + deserializedUriFolderJobOutput.assetName = reader.getString(); } else if ("mode".equals(fieldName)) { deserializedUriFolderJobOutput.mode = OutputDeliveryMode.fromString(reader.getString()); + } else if ("uri".equals(fieldName)) { + deserializedUriFolderJobOutput.uri = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageAndQuotaDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageAndQuotaDetails.java new file mode 100644 index 0000000000000..69fb6e3a9dcf4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageAndQuotaDetails.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.resourcemanager.machinelearning.fluent.models.UsageAndQuotaDetailsInner; +import java.util.List; + +/** + * An immutable client-side representation of UsageAndQuotaDetails. + */ +public interface UsageAndQuotaDetails { + /** + * Gets the modelCollection property: Model collection name. + * + * @return the modelCollection value. + */ + String modelCollection(); + + /** + * Gets the quota property: The total number of quota. + * + * @return the quota value. + */ + Long quota(); + + /** + * Gets the usageDetails property: Usage details for each deployment. + * + * @return the usageDetails value. + */ + List usageDetails(); + + /** + * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.UsageAndQuotaDetailsInner object. + * + * @return the inner object. + */ + UsageAndQuotaDetailsInner innerModel(); +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageAndQuotaDetailsArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageAndQuotaDetailsArmPaginatedResult.java new file mode 100644 index 0000000000000..2dcf7b817745b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageAndQuotaDetailsArmPaginatedResult.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.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.machinelearning.fluent.models.UsageAndQuotaDetailsInner; +import java.io.IOException; +import java.util.List; + +/** + * A paginated list of UsageAndQuotaDetails entities. + */ +@Fluent +public final class UsageAndQuotaDetailsArmPaginatedResult + implements JsonSerializable { + /* + * The link to the next page of UsageAndQuotaDetails objects. If null, there are no additional pages. + */ + private String nextLink; + + /* + * An array of objects of type UsageAndQuotaDetails. + */ + private List value; + + /** + * Creates an instance of UsageAndQuotaDetailsArmPaginatedResult class. + */ + public UsageAndQuotaDetailsArmPaginatedResult() { + } + + /** + * Get the nextLink property: The link to the next page of UsageAndQuotaDetails 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 UsageAndQuotaDetails objects. If null, there are no + * additional pages. + * + * @param nextLink the nextLink value to set. + * @return the UsageAndQuotaDetailsArmPaginatedResult object itself. + */ + public UsageAndQuotaDetailsArmPaginatedResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Get the value property: An array of objects of type UsageAndQuotaDetails. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: An array of objects of type UsageAndQuotaDetails. + * + * @param value the value value to set. + * @return the UsageAndQuotaDetailsArmPaginatedResult object itself. + */ + public UsageAndQuotaDetailsArmPaginatedResult 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()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UsageAndQuotaDetailsArmPaginatedResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UsageAndQuotaDetailsArmPaginatedResult if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the UsageAndQuotaDetailsArmPaginatedResult. + */ + public static UsageAndQuotaDetailsArmPaginatedResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + UsageAndQuotaDetailsArmPaginatedResult deserializedUsageAndQuotaDetailsArmPaginatedResult + = new UsageAndQuotaDetailsArmPaginatedResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("nextLink".equals(fieldName)) { + deserializedUsageAndQuotaDetailsArmPaginatedResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> UsageAndQuotaDetailsInner.fromJson(reader1)); + deserializedUsageAndQuotaDetailsArmPaginatedResult.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedUsageAndQuotaDetailsArmPaginatedResult; + }); + } +} 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 ea36d31e153e0..79186864d1f62 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 @@ -43,7 +43,6 @@ public IdentityConfigurationType identityType() { */ @Override public void validate() { - super.validate(); } /** 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 8877b608e63ca..8d4d368968740 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 @@ -30,16 +30,6 @@ public final class UsernamePasswordAuthTypeWorkspaceConnectionProperties extends */ private WorkspaceConnectionUsernamePassword credentials; - /* - * The createdByWorkspaceArmId property. - */ - private String createdByWorkspaceArmId; - - /* - * Group based on connection category - */ - private ConnectionGroup group; - /** * Creates an instance of UsernamePasswordAuthTypeWorkspaceConnectionProperties class. */ @@ -78,31 +68,29 @@ public WorkspaceConnectionUsernamePassword credentials() { } /** - * Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property. - * - * @return the createdByWorkspaceArmId value. + * {@inheritDoc} */ @Override - public String createdByWorkspaceArmId() { - return this.createdByWorkspaceArmId; + public UsernamePasswordAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { + super.withCategory(category); + return this; } /** - * Get the group property: Group based on connection category. - * - * @return the group value. + * {@inheritDoc} */ @Override - public ConnectionGroup group() { - return this.group; + public UsernamePasswordAuthTypeWorkspaceConnectionProperties withError(String error) { + super.withError(error); + return this; } /** * {@inheritDoc} */ @Override - public UsernamePasswordAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); + public UsernamePasswordAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { + super.withExpiryTime(expiryTime); return this; } @@ -110,8 +98,8 @@ public UsernamePasswordAuthTypeWorkspaceConnectionProperties withCategory(Connec * {@inheritDoc} */ @Override - public UsernamePasswordAuthTypeWorkspaceConnectionProperties withExpiryTime(OffsetDateTime expiryTime) { - super.withExpiryTime(expiryTime); + public UsernamePasswordAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { + super.withIsSharedToAll(isSharedToAll); return this; } @@ -119,8 +107,8 @@ public UsernamePasswordAuthTypeWorkspaceConnectionProperties withExpiryTime(Offs * {@inheritDoc} */ @Override - public UsernamePasswordAuthTypeWorkspaceConnectionProperties withIsSharedToAll(Boolean isSharedToAll) { - super.withIsSharedToAll(isSharedToAll); + public UsernamePasswordAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { + super.withMetadata(metadata); return this; } @@ -128,8 +116,8 @@ public UsernamePasswordAuthTypeWorkspaceConnectionProperties withIsSharedToAll(B * {@inheritDoc} */ @Override - public UsernamePasswordAuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); + public UsernamePasswordAuthTypeWorkspaceConnectionProperties withPeRequirement(ManagedPERequirement peRequirement) { + super.withPeRequirement(peRequirement); return this; } @@ -137,8 +125,8 @@ public UsernamePasswordAuthTypeWorkspaceConnectionProperties withTarget(String t * {@inheritDoc} */ @Override - public UsernamePasswordAuthTypeWorkspaceConnectionProperties withMetadata(Map metadata) { - super.withMetadata(metadata); + public UsernamePasswordAuthTypeWorkspaceConnectionProperties withPeStatus(ManagedPEStatus peStatus) { + super.withPeStatus(peStatus); return this; } @@ -155,8 +143,8 @@ public UsernamePasswordAuthTypeWorkspaceConnectionProperties withSharedUserList( * {@inheritDoc} */ @Override - public UsernamePasswordAuthTypeWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); + public UsernamePasswordAuthTypeWorkspaceConnectionProperties withTarget(String target) { + super.withTarget(target); return this; } @@ -164,8 +152,9 @@ public UsernamePasswordAuthTypeWorkspaceConnectionProperties withValue(String va * {@inheritDoc} */ @Override - public UsernamePasswordAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); + public UsernamePasswordAuthTypeWorkspaceConnectionProperties + withUseWorkspaceManagedIdentity(Boolean useWorkspaceManagedIdentity) { + super.withUseWorkspaceManagedIdentity(useWorkspaceManagedIdentity); return this; } @@ -176,7 +165,6 @@ public UsernamePasswordAuthTypeWorkspaceConnectionProperties withValueFormat(Val */ @Override public void validate() { - super.validate(); if (credentials() != null) { credentials().validate(); } @@ -189,15 +177,17 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("category", category() == null ? null : category().toString()); + jsonWriter.writeStringField("error", error()); jsonWriter.writeStringField("expiryTime", expiryTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(expiryTime())); jsonWriter.writeBooleanField("isSharedToAll", isSharedToAll()); - jsonWriter.writeStringField("target", target()); jsonWriter.writeMapField("metadata", metadata(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("peRequirement", peRequirement() == null ? null : peRequirement().toString()); + jsonWriter.writeStringField("peStatus", peStatus() == null ? null : peStatus().toString()); jsonWriter.writeArrayField("sharedUserList", sharedUserList(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", value()); - jsonWriter.writeStringField("valueFormat", valueFormat() == null ? null : valueFormat().toString()); + jsonWriter.writeStringField("target", target()); + jsonWriter.writeBooleanField("useWorkspaceManagedIdentity", useWorkspaceManagedIdentity()); jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); jsonWriter.writeJsonField("credentials", this.credentials); return jsonWriter.writeEndObject(); @@ -224,31 +214,37 @@ public static UsernamePasswordAuthTypeWorkspaceConnectionProperties fromJson(Jso deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties .withCategory(ConnectionCategory.fromString(reader.getString())); } else if ("createdByWorkspaceArmId".equals(fieldName)) { - deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties.createdByWorkspaceArmId - = reader.getString(); + deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties + .withCreatedByWorkspaceArmId(reader.getString()); + } else if ("error".equals(fieldName)) { + deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties.withError(reader.getString()); } else if ("expiryTime".equals(fieldName)) { deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties.withExpiryTime(reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("group".equals(fieldName)) { - deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties.group - = ConnectionGroup.fromString(reader.getString()); + deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties + .withGroup(ConnectionGroup.fromString(reader.getString())); } else if ("isSharedToAll".equals(fieldName)) { deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties .withIsSharedToAll(reader.getNullable(JsonReader::getBoolean)); - } else if ("target".equals(fieldName)) { - deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); } else if ("metadata".equals(fieldName)) { Map metadata = reader.readMap(reader1 -> reader1.getString()); deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties.withMetadata(metadata); + } else if ("peRequirement".equals(fieldName)) { + deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties + .withPeRequirement(ManagedPERequirement.fromString(reader.getString())); + } else if ("peStatus".equals(fieldName)) { + deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties + .withPeStatus(ManagedPEStatus.fromString(reader.getString())); } else if ("sharedUserList".equals(fieldName)) { List sharedUserList = reader.readArray(reader1 -> reader1.getString()); deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties .withSharedUserList(sharedUserList); - } else if ("value".equals(fieldName)) { - deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties.withValue(reader.getString()); - } else if ("valueFormat".equals(fieldName)) { + } else if ("target".equals(fieldName)) { + deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties.withTarget(reader.getString()); + } else if ("useWorkspaceManagedIdentity".equals(fieldName)) { deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties - .withValueFormat(ValueFormat.fromString(reader.getString())); + .withUseWorkspaceManagedIdentity(reader.getNullable(JsonReader::getBoolean)); } else if ("authType".equals(fieldName)) { deserializedUsernamePasswordAuthTypeWorkspaceConnectionProperties.authType = ConnectionAuthType.fromString(reader.getString()); 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 38e4b67e45df8..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValueFormat.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.models; - -import com.azure.core.util.ExpandableStringEnum; -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. - */ - 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 976a0b7576b7b..66fdb8b17176c 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 @@ -11,7 +11,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.time.OffsetDateTime; import java.util.List; /** @@ -29,32 +28,6 @@ public final class VirtualMachine extends Compute { */ private VirtualMachineSchemaProperties properties; - /* - * The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - */ - private ProvisioningState provisioningState; - - /* - * The time at which the compute was created. - */ - private OffsetDateTime createdOn; - - /* - * The time at which the compute was last modified. - */ - private OffsetDateTime modifiedOn; - - /* - * Errors during provisioning - */ - private List provisioningErrors; - - /* - * Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning - * service provisioned it if false. - */ - private Boolean isAttachedCompute; - /** * Creates an instance of VirtualMachine class. */ @@ -91,58 +64,6 @@ public VirtualMachine withProperties(VirtualMachineSchemaProperties properties) return this; } - /** - * Get the provisioningState property: The provision state of the cluster. Valid values are Unknown, Updating, - * Provisioning, Succeeded, and Failed. - * - * @return the provisioningState value. - */ - @Override - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the createdOn property: The time at which the compute was created. - * - * @return the createdOn value. - */ - @Override - public OffsetDateTime createdOn() { - return this.createdOn; - } - - /** - * Get the modifiedOn property: The time at which the compute was last modified. - * - * @return the modifiedOn value. - */ - @Override - public OffsetDateTime modifiedOn() { - return this.modifiedOn; - } - - /** - * Get the provisioningErrors property: Errors during provisioning. - * - * @return the provisioningErrors value. - */ - @Override - public List provisioningErrors() { - return this.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. - */ - @Override - public Boolean isAttachedCompute() { - return this.isAttachedCompute; - } - /** * {@inheritDoc} */ @@ -186,7 +107,6 @@ public VirtualMachine withDisableLocalAuth(Boolean disableLocalAuth) { */ @Override public void validate() { - super.validate(); if (properties() != null) { properties().validate(); } @@ -225,23 +145,23 @@ public static VirtualMachine fromJson(JsonReader jsonReader) throws IOException if ("computeLocation".equals(fieldName)) { deserializedVirtualMachine.withComputeLocation(reader.getString()); } else if ("provisioningState".equals(fieldName)) { - deserializedVirtualMachine.provisioningState = ProvisioningState.fromString(reader.getString()); + deserializedVirtualMachine.withProvisioningState(ProvisioningState.fromString(reader.getString())); } else if ("description".equals(fieldName)) { deserializedVirtualMachine.withDescription(reader.getString()); } else if ("createdOn".equals(fieldName)) { - deserializedVirtualMachine.createdOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedVirtualMachine.withCreatedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("modifiedOn".equals(fieldName)) { - deserializedVirtualMachine.modifiedOn = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedVirtualMachine.withModifiedOn(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("resourceId".equals(fieldName)) { deserializedVirtualMachine.withResourceId(reader.getString()); } else if ("provisioningErrors".equals(fieldName)) { List provisioningErrors = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); - deserializedVirtualMachine.provisioningErrors = provisioningErrors; + deserializedVirtualMachine.withProvisioningErrors(provisioningErrors); } else if ("isAttachedCompute".equals(fieldName)) { - deserializedVirtualMachine.isAttachedCompute = reader.getNullable(JsonReader::getBoolean); + deserializedVirtualMachine.withIsAttachedCompute(reader.getNullable(JsonReader::getBoolean)); } else if ("disableLocalAuth".equals(fieldName)) { deserializedVirtualMachine.withDisableLocalAuth(reader.getNullable(JsonReader::getBoolean)); } else if ("computeType".equals(fieldName)) { 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 a83c8ed0eb09f..1dada5b297a05 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 @@ -69,7 +69,6 @@ public VirtualMachineSecrets withAdministratorAccount(VirtualMachineSshCredentia */ @Override public void validate() { - super.validate(); if (administratorAccount() != null) { administratorAccount().validate(); } 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 index feb8f9f5cb4cb..c53f804ff6da4 100644 --- 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 @@ -12,7 +12,7 @@ import java.io.IOException; /** - * Describes the volume configuration for the container. + * The VolumeDefinition model. */ @Fluent public final class VolumeDefinition implements JsonSerializable { 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 index 3dd898251bce8..cb950a9fa3d99 100644 --- 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 @@ -12,7 +12,7 @@ import java.io.IOException; /** - * Describes the volume options for the container. + * The VolumeOptions model. */ @Fluent public final class VolumeOptions implements JsonSerializable { diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VulnerabilityDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VulnerabilityDetails.java new file mode 100644 index 0000000000000..d8a79ffc947b9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VulnerabilityDetails.java @@ -0,0 +1,430 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the 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.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The VulnerabilityDetails model. + */ +@Fluent +public final class VulnerabilityDetails implements JsonSerializable { + /* + * CVE id. + */ + private String cve; + + /* + * CVE url. + */ + private String cveUrl; + + /* + * DueDate for vulnerability. Provider data or PublishDate + 30 days. + */ + private OffsetDateTime dueDate; + + /* + * Vulnerability ID. + */ + private String id; + + /* + * Dependency details. + */ + private List packageDetails; + + /* + * Indicates if there is a known patch for vulnerability. + */ + private Boolean patchable; + + /* + * Vulnerability ID from provider. + */ + private String providerId; + + /* + * Vulnerability publish date. + */ + private OffsetDateTime publishDate; + + /* + * Vulnerability Risk value. + */ + private VulnerabilityRisk risk; + + /* + * Vulnerability description. + */ + private String solution; + + /* + * Vulnerability name. + */ + private String title; + + /* + * Vendor vulnerability ID (USN, GH Advisory, etc). + */ + private String vendorId; + + /* + * Vendor vulnerability url. + */ + private String vendorUrl; + + /** + * Creates an instance of VulnerabilityDetails class. + */ + public VulnerabilityDetails() { + } + + /** + * Get the cve property: CVE id. + * + * @return the cve value. + */ + public String cve() { + return this.cve; + } + + /** + * Set the cve property: CVE id. + * + * @param cve the cve value to set. + * @return the VulnerabilityDetails object itself. + */ + public VulnerabilityDetails withCve(String cve) { + this.cve = cve; + return this; + } + + /** + * Get the cveUrl property: CVE url. + * + * @return the cveUrl value. + */ + public String cveUrl() { + return this.cveUrl; + } + + /** + * Set the cveUrl property: CVE url. + * + * @param cveUrl the cveUrl value to set. + * @return the VulnerabilityDetails object itself. + */ + public VulnerabilityDetails withCveUrl(String cveUrl) { + this.cveUrl = cveUrl; + return this; + } + + /** + * Get the dueDate property: DueDate for vulnerability. Provider data or PublishDate + 30 days. + * + * @return the dueDate value. + */ + public OffsetDateTime dueDate() { + return this.dueDate; + } + + /** + * Set the dueDate property: DueDate for vulnerability. Provider data or PublishDate + 30 days. + * + * @param dueDate the dueDate value to set. + * @return the VulnerabilityDetails object itself. + */ + public VulnerabilityDetails withDueDate(OffsetDateTime dueDate) { + this.dueDate = dueDate; + return this; + } + + /** + * Get the id property: Vulnerability ID. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the packageDetails property: Dependency details. + * + * @return the packageDetails value. + */ + public List packageDetails() { + return this.packageDetails; + } + + /** + * Set the packageDetails property: Dependency details. + * + * @param packageDetails the packageDetails value to set. + * @return the VulnerabilityDetails object itself. + */ + public VulnerabilityDetails withPackageDetails(List packageDetails) { + this.packageDetails = packageDetails; + return this; + } + + /** + * Get the patchable property: Indicates if there is a known patch for vulnerability. + * + * @return the patchable value. + */ + public Boolean patchable() { + return this.patchable; + } + + /** + * Set the patchable property: Indicates if there is a known patch for vulnerability. + * + * @param patchable the patchable value to set. + * @return the VulnerabilityDetails object itself. + */ + public VulnerabilityDetails withPatchable(Boolean patchable) { + this.patchable = patchable; + return this; + } + + /** + * Get the providerId property: Vulnerability ID from provider. + * + * @return the providerId value. + */ + public String providerId() { + return this.providerId; + } + + /** + * Set the providerId property: Vulnerability ID from provider. + * + * @param providerId the providerId value to set. + * @return the VulnerabilityDetails object itself. + */ + public VulnerabilityDetails withProviderId(String providerId) { + this.providerId = providerId; + return this; + } + + /** + * Get the publishDate property: Vulnerability publish date. + * + * @return the publishDate value. + */ + public OffsetDateTime publishDate() { + return this.publishDate; + } + + /** + * Set the publishDate property: Vulnerability publish date. + * + * @param publishDate the publishDate value to set. + * @return the VulnerabilityDetails object itself. + */ + public VulnerabilityDetails withPublishDate(OffsetDateTime publishDate) { + this.publishDate = publishDate; + return this; + } + + /** + * Get the risk property: Vulnerability Risk value. + * + * @return the risk value. + */ + public VulnerabilityRisk risk() { + return this.risk; + } + + /** + * Set the risk property: Vulnerability Risk value. + * + * @param risk the risk value to set. + * @return the VulnerabilityDetails object itself. + */ + public VulnerabilityDetails withRisk(VulnerabilityRisk risk) { + this.risk = risk; + return this; + } + + /** + * Get the solution property: Vulnerability description. + * + * @return the solution value. + */ + public String solution() { + return this.solution; + } + + /** + * Set the solution property: Vulnerability description. + * + * @param solution the solution value to set. + * @return the VulnerabilityDetails object itself. + */ + public VulnerabilityDetails withSolution(String solution) { + this.solution = solution; + return this; + } + + /** + * Get the title property: Vulnerability name. + * + * @return the title value. + */ + public String title() { + return this.title; + } + + /** + * Set the title property: Vulnerability name. + * + * @param title the title value to set. + * @return the VulnerabilityDetails object itself. + */ + public VulnerabilityDetails withTitle(String title) { + this.title = title; + return this; + } + + /** + * Get the vendorId property: Vendor vulnerability ID (USN, GH Advisory, etc). + * + * @return the vendorId value. + */ + public String vendorId() { + return this.vendorId; + } + + /** + * Set the vendorId property: Vendor vulnerability ID (USN, GH Advisory, etc). + * + * @param vendorId the vendorId value to set. + * @return the VulnerabilityDetails object itself. + */ + public VulnerabilityDetails withVendorId(String vendorId) { + this.vendorId = vendorId; + return this; + } + + /** + * Get the vendorUrl property: Vendor vulnerability url. + * + * @return the vendorUrl value. + */ + public String vendorUrl() { + return this.vendorUrl; + } + + /** + * Set the vendorUrl property: Vendor vulnerability url. + * + * @param vendorUrl the vendorUrl value to set. + * @return the VulnerabilityDetails object itself. + */ + public VulnerabilityDetails withVendorUrl(String vendorUrl) { + this.vendorUrl = vendorUrl; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (packageDetails() != null) { + packageDetails().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("cve", this.cve); + jsonWriter.writeStringField("cveUrl", this.cveUrl); + jsonWriter.writeStringField("dueDate", + this.dueDate == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.dueDate)); + jsonWriter.writeArrayField("packageDetails", this.packageDetails, + (writer, element) -> writer.writeJson(element)); + jsonWriter.writeBooleanField("patchable", this.patchable); + jsonWriter.writeStringField("providerId", this.providerId); + jsonWriter.writeStringField("publishDate", + this.publishDate == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.publishDate)); + jsonWriter.writeStringField("risk", this.risk == null ? null : this.risk.toString()); + jsonWriter.writeStringField("solution", this.solution); + jsonWriter.writeStringField("title", this.title); + jsonWriter.writeStringField("vendorId", this.vendorId); + jsonWriter.writeStringField("vendorUrl", this.vendorUrl); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VulnerabilityDetails from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VulnerabilityDetails if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the VulnerabilityDetails. + */ + public static VulnerabilityDetails fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VulnerabilityDetails deserializedVulnerabilityDetails = new VulnerabilityDetails(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("cve".equals(fieldName)) { + deserializedVulnerabilityDetails.cve = reader.getString(); + } else if ("cveUrl".equals(fieldName)) { + deserializedVulnerabilityDetails.cveUrl = reader.getString(); + } else if ("dueDate".equals(fieldName)) { + deserializedVulnerabilityDetails.dueDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("id".equals(fieldName)) { + deserializedVulnerabilityDetails.id = reader.getString(); + } else if ("packageDetails".equals(fieldName)) { + List packageDetails = reader.readArray(reader1 -> PackageDetails.fromJson(reader1)); + deserializedVulnerabilityDetails.packageDetails = packageDetails; + } else if ("patchable".equals(fieldName)) { + deserializedVulnerabilityDetails.patchable = reader.getNullable(JsonReader::getBoolean); + } else if ("providerId".equals(fieldName)) { + deserializedVulnerabilityDetails.providerId = reader.getString(); + } else if ("publishDate".equals(fieldName)) { + deserializedVulnerabilityDetails.publishDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("risk".equals(fieldName)) { + deserializedVulnerabilityDetails.risk = VulnerabilityRisk.fromString(reader.getString()); + } else if ("solution".equals(fieldName)) { + deserializedVulnerabilityDetails.solution = reader.getString(); + } else if ("title".equals(fieldName)) { + deserializedVulnerabilityDetails.title = reader.getString(); + } else if ("vendorId".equals(fieldName)) { + deserializedVulnerabilityDetails.vendorId = reader.getString(); + } else if ("vendorUrl".equals(fieldName)) { + deserializedVulnerabilityDetails.vendorUrl = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVulnerabilityDetails; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VulnerabilityFindings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VulnerabilityFindings.java new file mode 100644 index 0000000000000..a682a1711bf6b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VulnerabilityFindings.java @@ -0,0 +1,294 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the 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.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * The VulnerabilityFindings model. + */ +@Fluent +public final class VulnerabilityFindings implements JsonSerializable { + /* + * AssetId (Image digest). + */ + private String assetId; + + /* + * Number of critical findings. + */ + private Integer criticalFindingsCount; + + /* + * List of vulnerability findings. + */ + private List data; + + /* + * Time the report was generated. + */ + private OffsetDateTime generatedTime; + + /* + * Number of high findings. + */ + private Integer highFindingsCount; + + /* + * Scan result date. + */ + private OffsetDateTime lastScanDate; + + /* + * Vulnerability scanner name. + */ + private String scanner; + + /* + * Data source (internal). + */ + private String source; + + /* + * Total findings count. + */ + private Integer totalFindingsCount; + + /** + * Creates an instance of VulnerabilityFindings class. + */ + public VulnerabilityFindings() { + } + + /** + * Get the assetId property: AssetId (Image digest). + * + * @return the assetId value. + */ + public String assetId() { + return this.assetId; + } + + /** + * Set the assetId property: AssetId (Image digest). + * + * @param assetId the assetId value to set. + * @return the VulnerabilityFindings object itself. + */ + public VulnerabilityFindings withAssetId(String assetId) { + this.assetId = assetId; + return this; + } + + /** + * Get the criticalFindingsCount property: Number of critical findings. + * + * @return the criticalFindingsCount value. + */ + public Integer criticalFindingsCount() { + return this.criticalFindingsCount; + } + + /** + * Get the data property: List of vulnerability findings. + * + * @return the data value. + */ + public List data() { + return this.data; + } + + /** + * Set the data property: List of vulnerability findings. + * + * @param data the data value to set. + * @return the VulnerabilityFindings object itself. + */ + public VulnerabilityFindings withData(List data) { + this.data = data; + return this; + } + + /** + * Get the generatedTime property: Time the report was generated. + * + * @return the generatedTime value. + */ + public OffsetDateTime generatedTime() { + return this.generatedTime; + } + + /** + * Set the generatedTime property: Time the report was generated. + * + * @param generatedTime the generatedTime value to set. + * @return the VulnerabilityFindings object itself. + */ + public VulnerabilityFindings withGeneratedTime(OffsetDateTime generatedTime) { + this.generatedTime = generatedTime; + return this; + } + + /** + * Get the highFindingsCount property: Number of high findings. + * + * @return the highFindingsCount value. + */ + public Integer highFindingsCount() { + return this.highFindingsCount; + } + + /** + * Get the lastScanDate property: Scan result date. + * + * @return the lastScanDate value. + */ + public OffsetDateTime lastScanDate() { + return this.lastScanDate; + } + + /** + * Set the lastScanDate property: Scan result date. + * + * @param lastScanDate the lastScanDate value to set. + * @return the VulnerabilityFindings object itself. + */ + public VulnerabilityFindings withLastScanDate(OffsetDateTime lastScanDate) { + this.lastScanDate = lastScanDate; + return this; + } + + /** + * Get the scanner property: Vulnerability scanner name. + * + * @return the scanner value. + */ + public String scanner() { + return this.scanner; + } + + /** + * Set the scanner property: Vulnerability scanner name. + * + * @param scanner the scanner value to set. + * @return the VulnerabilityFindings object itself. + */ + public VulnerabilityFindings withScanner(String scanner) { + this.scanner = scanner; + return this; + } + + /** + * Get the source property: Data source (internal). + * + * @return the source value. + */ + public String source() { + return this.source; + } + + /** + * Set the source property: Data source (internal). + * + * @param source the source value to set. + * @return the VulnerabilityFindings object itself. + */ + public VulnerabilityFindings withSource(String source) { + this.source = source; + return this; + } + + /** + * Get the totalFindingsCount property: Total findings count. + * + * @return the totalFindingsCount value. + */ + public Integer totalFindingsCount() { + return this.totalFindingsCount; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (data() != null) { + data().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("assetId", this.assetId); + jsonWriter.writeArrayField("data", this.data, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("generatedTime", + this.generatedTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.generatedTime)); + jsonWriter.writeStringField("lastScanDate", + this.lastScanDate == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.lastScanDate)); + jsonWriter.writeStringField("scanner", this.scanner); + jsonWriter.writeStringField("source", this.source); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VulnerabilityFindings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VulnerabilityFindings if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the VulnerabilityFindings. + */ + public static VulnerabilityFindings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VulnerabilityFindings deserializedVulnerabilityFindings = new VulnerabilityFindings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("assetId".equals(fieldName)) { + deserializedVulnerabilityFindings.assetId = reader.getString(); + } else if ("criticalFindingsCount".equals(fieldName)) { + deserializedVulnerabilityFindings.criticalFindingsCount = reader.getNullable(JsonReader::getInt); + } else if ("data".equals(fieldName)) { + List data + = reader.readArray(reader1 -> VulnerabilityDetails.fromJson(reader1)); + deserializedVulnerabilityFindings.data = data; + } else if ("generatedTime".equals(fieldName)) { + deserializedVulnerabilityFindings.generatedTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("highFindingsCount".equals(fieldName)) { + deserializedVulnerabilityFindings.highFindingsCount = reader.getNullable(JsonReader::getInt); + } else if ("lastScanDate".equals(fieldName)) { + deserializedVulnerabilityFindings.lastScanDate = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("scanner".equals(fieldName)) { + deserializedVulnerabilityFindings.scanner = reader.getString(); + } else if ("source".equals(fieldName)) { + deserializedVulnerabilityFindings.source = reader.getString(); + } else if ("totalFindingsCount".equals(fieldName)) { + deserializedVulnerabilityFindings.totalFindingsCount = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedVulnerabilityFindings; + }); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VulnerabilityRisk.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VulnerabilityRisk.java new file mode 100644 index 0000000000000..ca62d192b46e6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VulnerabilityRisk.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 java.util.Collection; + +/** + * Defines values for VulnerabilityRisk. + */ +public final class VulnerabilityRisk extends ExpandableStringEnum { + /** + * Static value UNKNOWN for VulnerabilityRisk. + */ + public static final VulnerabilityRisk UNKNOWN = fromString("UNKNOWN"); + + /** + * Static value CRITICAL for VulnerabilityRisk. + */ + public static final VulnerabilityRisk CRITICAL = fromString("CRITICAL"); + + /** + * Static value HIGH for VulnerabilityRisk. + */ + public static final VulnerabilityRisk HIGH = fromString("HIGH"); + + /** + * Static value MEDIUM for VulnerabilityRisk. + */ + public static final VulnerabilityRisk MEDIUM = fromString("MEDIUM"); + + /** + * Static value LOW for VulnerabilityRisk. + */ + public static final VulnerabilityRisk LOW = fromString("LOW"); + + /** + * Creates a new instance of VulnerabilityRisk value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public VulnerabilityRisk() { + } + + /** + * Creates or finds a VulnerabilityRisk from its string representation. + * + * @param name a name to look for. + * @return the corresponding VulnerabilityRisk. + */ + public static VulnerabilityRisk fromString(String name) { + return fromString(name, VulnerabilityRisk.class); + } + + /** + * Gets known VulnerabilityRisk values. + * + * @return known VulnerabilityRisk values. + */ + public static Collection values() { + return values(VulnerabilityRisk.class); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Workspace.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Workspace.java index 6b1658e955b33..a8781a5fc3650 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 @@ -39,7 +39,7 @@ public interface Workspace { 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. */ @@ -53,25 +53,26 @@ public interface Workspace { String kind(); /** - * Gets the location property: Specifies the location of the resource. + * Gets the location property: The location property. * * @return the location value. */ String location(); /** - * Gets the tags property: Contains resource tags defined as key/value pairs. + * 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 tags value. + * @return the sku value. */ - Map tags(); + Sku sku(); /** - * Gets the sku property: The sku of the workspace. + * Gets the tags property: Dictionary of <string>. * - * @return the sku value. + * @return the tags value. */ - Sku sku(); + Map tags(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -81,40 +82,48 @@ public interface Workspace { SystemData systemData(); /** - * Gets the workspaceId property: The immutable id associated with this workspace. + * Gets the agentsEndpointUri property: The URI of agents endpoint associated with this workspace. * - * @return the workspaceId value. + * @return the agentsEndpointUri value. */ - String workspaceId(); + String agentsEndpointUri(); /** - * Gets the description property: The description of this workspace. + * Gets the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when + * behind VNet. * - * @return the description value. + * @return the allowPublicAccessWhenBehindVnet value. */ - String description(); + Boolean allowPublicAccessWhenBehindVnet(); /** - * Gets the friendlyName property: The friendly name for this workspace. This name in mutable. + * Gets the allowRoleAssignmentOnRG property: The flag to indicate whether we will do role assignment for the + * workspace MSI on resource group level. * - * @return the friendlyName value. + * @return the allowRoleAssignmentOnRG value. */ - String friendlyName(); + Boolean allowRoleAssignmentOnRG(); /** - * Gets the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once - * the workspace has been created. + * Gets the applicationInsights property: ARM id of the application insights associated with this workspace. * - * @return the keyVault value. + * @return the applicationInsights value. */ - String keyVault(); + String applicationInsights(); /** - * Gets the applicationInsights property: ARM id of the application insights associated with this workspace. + * Gets the associatedWorkspaces property: The associatedWorkspaces property. * - * @return the applicationInsights value. + * @return the associatedWorkspaces value. */ - String applicationInsights(); + List associatedWorkspaces(); + + /** + * Gets the containerRegistries property: The containerRegistries property. + * + * @return the containerRegistries value. + */ + List containerRegistries(); /** * Gets the containerRegistry property: ARM id of the container registry associated with this workspace. @@ -124,12 +133,11 @@ public interface Workspace { 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. + * Gets the description property: The description of this workspace. * - * @return the storageAccount value. + * @return the description value. */ - String storageAccount(); + String description(); /** * Gets the discoveryUrl property: Url for the discovery service to identify regional endpoints for machine learning @@ -140,42 +148,76 @@ public interface Workspace { String discoveryUrl(); /** - * Gets the provisioningState property: The current deployment state of workspace resource. The provisioningState is - * to indicate states for resource provisioning. + * Gets the enableDataIsolation property: The enableDataIsolation property. * - * @return the provisioningState value. + * @return the enableDataIsolation value. */ - ProvisioningState provisioningState(); + Boolean enableDataIsolation(); /** - * Gets the encryption property: The encryption settings of Azure ML workspace. + * Gets the enableServiceSideCmkEncryption property: The enableServiceSideCMKEncryption property. + * + * @return the enableServiceSideCmkEncryption value. + */ + Boolean enableServiceSideCmkEncryption(); + + /** + * Gets the enableSimplifiedCmk property: Flag to tell if simplified CMK should be enabled for this workspace. + * + * @return the enableSimplifiedCmk value. + */ + Boolean enableSimplifiedCmk(); + + /** + * Gets the enableSoftwareBillOfMaterials property: Flag to tell if SoftwareBillOfMaterials 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 hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected - * by the service. + * Gets the existingWorkspaces property: The existingWorkspaces property. * - * @return the hbiWorkspace value. + * @return the existingWorkspaces value. */ - Boolean hbiWorkspace(); + List existingWorkspaces(); /** - * Gets the serviceProvisionedResourceGroup property: The name of the managed resource group created by workspace RP - * in customer subscription if the workspace is CMK workspace. + * Gets the featureStoreSettings property: Settings for feature store type workspace. * - * @return the serviceProvisionedResourceGroup value. + * @return the featureStoreSettings value. */ - String serviceProvisionedResourceGroup(); + FeatureStoreSettings featureStoreSettings(); /** - * Gets the privateLinkCount property: Count of private connections in the workspace. + * Gets the friendlyName property: The friendly name for this workspace. This name in mutable. * - * @return the privateLinkCount value. + * @return the friendlyName value. */ - Integer privateLinkCount(); + 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 hubResourceId property: The hubResourceId property. + * + * @return the hubResourceId value. + */ + String hubResourceId(); /** * Gets the imageBuildCompute property: The compute name for image build. @@ -185,54 +227,55 @@ public interface Workspace { String imageBuildCompute(); /** - * Gets the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when - * behind VNet. + * Gets the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace. * - * @return the allowPublicAccessWhenBehindVnet value. + * @return the ipAllowlist value. */ - Boolean allowPublicAccessWhenBehindVnet(); + List ipAllowlist(); /** - * Gets the publicNetworkAccess property: Whether requests from Public Network are allowed. + * 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 publicNetworkAccess value. + * @return the keyVault value. */ - PublicNetworkAccess publicNetworkAccess(); + String keyVault(); /** - * Gets the privateEndpointConnections property: The list of private endpoint connections in the workspace. + * Gets the keyVaults property: The keyVaults property. * - * @return the privateEndpointConnections value. + * @return the keyVaults value. */ - List privateEndpointConnections(); + List keyVaults(); /** - * Gets the serverlessComputeSettings property: Settings for serverless compute created in the workspace. + * Gets the managedNetwork property: Managed Network settings for a machine learning workspace. * - * @return the serverlessComputeSettings value. + * @return the managedNetwork value. */ - ServerlessComputeSettings serverlessComputeSettings(); + ManagedNetworkSettings managedNetwork(); /** - * Gets the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. + * Gets the mlFlowTrackingUri property: The URI associated with this workspace that machine learning flow must point + * at to set up tracking. * - * @return the sharedPrivateLinkResources value. + * @return the mlFlowTrackingUri value. */ - List sharedPrivateLinkResources(); + String mlFlowTrackingUri(); /** - * Gets the notebookInfo property: The notebook info of Azure ML workspace. + * Gets the networkAcls property: A set of rules governing the network accessibility of the workspace. * - * @return the notebookInfo value. + * @return the networkAcls value. */ - NotebookResourceInfo notebookInfo(); + NetworkAcls networkAcls(); /** - * Gets the serviceManagedResourcesSettings property: The service managed resource settings. + * Gets the notebookInfo property: The notebook info of Azure ML workspace. * - * @return the serviceManagedResourcesSettings value. + * @return the notebookInfo value. */ - ServiceManagedResourcesSettings serviceManagedResourcesSettings(); + NotebookResourceInfo notebookInfo(); /** * Gets the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the @@ -243,70 +286,123 @@ public interface Workspace { String primaryUserAssignedIdentity(); /** - * Gets the tenantId property: The tenant id associated with this workspace. + * Gets the privateEndpointConnections property: The list of private endpoint connections in the workspace. * - * @return the tenantId value. + * @return the privateEndpointConnections value. */ - String tenantId(); + List privateEndpointConnections(); /** - * Gets the storageHnsEnabled property: If the storage associated with the workspace has hierarchical namespace(HNS) - * enabled. + * Gets the privateLinkCount property: Count of private connections in the workspace. * - * @return the storageHnsEnabled value. + * @return the privateLinkCount value. */ - Boolean storageHnsEnabled(); + Integer privateLinkCount(); /** - * Gets the mlFlowTrackingUri property: The URI associated with this workspace that machine learning flow must point - * at to set up tracking. + * Gets the provisionNetworkNow property: Set to trigger the provisioning of the managed VNet with the default + * Options when creating a Workspace with the managed VNet enabled, or else it does nothing. * - * @return the mlFlowTrackingUri value. + * @return the provisionNetworkNow value. */ - String mlFlowTrackingUri(); + Boolean provisionNetworkNow(); /** - * Gets the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 - * API. + * Gets the provisioningState property: The current deployment state of workspace resource. The provisioningState is + * to indicate states for resource provisioning. * - * @return the v1LegacyMode value. + * @return the provisioningState value. */ - Boolean v1LegacyMode(); + ProvisioningState provisioningState(); /** - * Gets the managedNetwork property: Managed Network settings for a machine learning workspace. + * Gets the publicNetworkAccess property: Whether requests from Public Network are allowed. * - * @return the managedNetwork value. + * @return the publicNetworkAccess value. */ - ManagedNetworkSettings managedNetwork(); + PublicNetworkAccessType publicNetworkAccess(); /** - * Gets the featureStoreSettings property: Settings for feature store type workspace. + * Gets the serverlessComputeSettings property: Settings for serverless compute in a workspace. * - * @return the featureStoreSettings value. + * @return the serverlessComputeSettings value. */ - FeatureStoreSettings featureStoreSettings(); + ServerlessComputeSettings serverlessComputeSettings(); /** - * Gets the associatedWorkspaces property: The associatedWorkspaces property. + * Gets the serviceManagedResourcesSettings property: The service managed resource settings. * - * @return the associatedWorkspaces value. + * @return the serviceManagedResourcesSettings value. */ - List associatedWorkspaces(); + ServiceManagedResourcesSettings serviceManagedResourcesSettings(); /** - * Gets the enableDataIsolation property: The enableDataIsolation property. + * 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 enableDataIsolation value. + * @return the serviceProvisionedResourceGroup value. */ - Boolean enableDataIsolation(); + String serviceProvisionedResourceGroup(); /** - * Gets the hubResourceId property: The hubResourceId property. + * Gets the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. * - * @return the hubResourceId value. + * @return the sharedPrivateLinkResources value. */ - String hubResourceId(); + 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 systemDatastoresAuthMode property: The auth mode used for accessing the system datastores of the + * workspace. + * + * @return the systemDatastoresAuthMode value. + */ + SystemDatastoresAuthMode 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. @@ -315,6 +411,13 @@ public interface Workspace { */ 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. * @@ -379,17 +482,23 @@ interface WithResourceGroup { */ interface WithCreate extends DefinitionStages.WithLocation, DefinitionStages.WithTags, DefinitionStages.WithIdentity, - DefinitionStages.WithKind, 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.WithKind, DefinitionStages.WithSku, DefinitionStages.WithAllowPublicAccessWhenBehindVnet, + DefinitionStages.WithAllowRoleAssignmentOnRG, DefinitionStages.WithApplicationInsights, + DefinitionStages.WithAssociatedWorkspaces, DefinitionStages.WithContainerRegistries, + DefinitionStages.WithContainerRegistry, DefinitionStages.WithDescription, DefinitionStages.WithDiscoveryUrl, + DefinitionStages.WithEnableDataIsolation, DefinitionStages.WithEnableServiceSideCmkEncryption, + DefinitionStages.WithEnableSimplifiedCmk, 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.WithNetworkAcls, + DefinitionStages.WithPrimaryUserAssignedIdentity, DefinitionStages.WithProvisionNetworkNow, DefinitionStages.WithPublicNetworkAccess, DefinitionStages.WithServerlessComputeSettings, - DefinitionStages.WithSharedPrivateLinkResources, DefinitionStages.WithServiceManagedResourcesSettings, - DefinitionStages.WithPrimaryUserAssignedIdentity, DefinitionStages.WithV1LegacyMode, - DefinitionStages.WithManagedNetwork, DefinitionStages.WithFeatureStoreSettings, - DefinitionStages.WithAssociatedWorkspaces, DefinitionStages.WithEnableDataIsolation, - DefinitionStages.WithHubResourceId, DefinitionStages.WithWorkspaceHubConfig { + DefinitionStages.WithServiceManagedResourcesSettings, DefinitionStages.WithSharedPrivateLinkResources, + DefinitionStages.WithSoftDeleteRetentionInDays, DefinitionStages.WithStorageAccount, + DefinitionStages.WithStorageAccounts, DefinitionStages.WithSystemDatastoresAuthMode, + DefinitionStages.WithV1LegacyMode, DefinitionStages.WithWorkspaceHubConfig { /** * Executes the create request. * @@ -413,7 +522,7 @@ 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); @@ -421,7 +530,7 @@ 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(String location); @@ -432,9 +541,9 @@ interface WithLocation { */ interface WithTags { /** - * Specifies the tags property: Contains resource tags defined as key/value pairs.. + * Specifies the tags property: Dictionary of <string>. * - * @param tags Contains resource tags defined as key/value pairs. + * @param tags Dictionary of <string>. * @return the next definition stage. */ WithCreate withTags(Map tags); @@ -445,9 +554,10 @@ interface WithTags { */ interface WithIdentity { /** - * Specifies the identity property: The identity of the resource.. + * Specifies the identity property: Managed service identity (system assigned and/or user assigned + * identities). * - * @param identity The identity of the resource. + * @param identity Managed service identity (system assigned and/or user assigned identities). * @return the next definition stage. */ WithCreate withIdentity(ManagedServiceIdentity identity); @@ -471,67 +581,84 @@ interface WithKind { */ interface WithSku { /** - * Specifies the sku property: 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 The sku of the workspace. + * @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. + * The stage of the Workspace definition allowing to specify allowPublicAccessWhenBehindVnet. */ - interface WithDescription { + interface WithAllowPublicAccessWhenBehindVnet { /** - * Specifies the description property: The description of this workspace.. + * Specifies the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public + * access when behind VNet.. * - * @param description The description of this workspace. + * @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. + * The stage of the Workspace definition allowing to specify allowRoleAssignmentOnRG. */ - interface WithFriendlyName { + interface WithAllowRoleAssignmentOnRG { /** - * Specifies the friendlyName property: The friendly name for this workspace. This name in mutable. + * Specifies the allowRoleAssignmentOnRG property: The flag to indicate whether we will do role assignment + * for the workspace MSI on resource group level.. * - * @param friendlyName The friendly name for this workspace. This name in mutable. + * @param allowRoleAssignmentOnRG The flag to indicate whether we will do role assignment for the workspace + * MSI on resource group level. * @return the next definition stage. */ - WithCreate withFriendlyName(String friendlyName); + WithCreate withAllowRoleAssignmentOnRG(Boolean allowRoleAssignmentOnRG); } /** - * The stage of the Workspace definition allowing to specify keyVault. + * The stage of the Workspace definition allowing to specify applicationInsights. */ - interface WithKeyVault { + interface WithApplicationInsights { /** - * Specifies the keyVault property: ARM id of the key vault associated with this workspace. This cannot be - * changed once the workspace has been created. + * Specifies the applicationInsights property: ARM id of the application insights associated with this + * workspace.. * - * @param keyVault ARM id of the key vault associated with this workspace. This cannot be changed once the - * workspace has been created. + * @param applicationInsights ARM id of the application insights associated with this workspace. * @return the next definition stage. */ - WithCreate withKeyVault(String keyVault); + WithCreate withApplicationInsights(String applicationInsights); } /** - * The stage of the Workspace definition allowing to specify applicationInsights. + * The stage of the Workspace definition allowing to specify associatedWorkspaces. */ - interface WithApplicationInsights { + interface WithAssociatedWorkspaces { /** - * Specifies the applicationInsights property: ARM id of the application insights associated with this - * workspace.. + * Specifies the associatedWorkspaces property: The associatedWorkspaces property.. * - * @param applicationInsights ARM id of the application insights associated with this workspace. + * @param associatedWorkspaces The associatedWorkspaces property. * @return the next definition stage. */ - WithCreate withApplicationInsights(String applicationInsights); + WithCreate withAssociatedWorkspaces(List associatedWorkspaces); + } + + /** + * The stage of the Workspace definition allowing to specify containerRegistries. + */ + interface WithContainerRegistries { + /** + * Specifies the containerRegistries property: The containerRegistries property.. + * + * @param containerRegistries The containerRegistries property. + * @return the next definition stage. + */ + WithCreate withContainerRegistries(List containerRegistries); } /** @@ -549,18 +676,16 @@ interface WithContainerRegistry { } /** - * The stage of the Workspace definition allowing to specify storageAccount. + * The stage of the Workspace definition allowing to specify description. */ - interface WithStorageAccount { + 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. + * Specifies the description property: The description of this workspace.. * - * @param storageAccount ARM id of the storage account associated with this workspace. This cannot be - * changed once the workspace has been created. + * @param description The description of this workspace. * @return the next definition stage. */ - WithCreate withStorageAccount(String storageAccount); + WithCreate withDescription(String description); } /** @@ -578,19 +703,113 @@ interface WithDiscoveryUrl { WithCreate withDiscoveryUrl(String discoveryUrl); } + /** + * 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 enableServiceSideCmkEncryption. + */ + interface WithEnableServiceSideCmkEncryption { + /** + * Specifies the enableServiceSideCmkEncryption property: The enableServiceSideCMKEncryption property.. + * + * @param enableServiceSideCmkEncryption The enableServiceSideCMKEncryption property. + * @return the next definition stage. + */ + WithCreate withEnableServiceSideCmkEncryption(Boolean enableServiceSideCmkEncryption); + } + + /** + * The stage of the Workspace definition allowing to specify enableSimplifiedCmk. + */ + interface WithEnableSimplifiedCmk { + /** + * Specifies the enableSimplifiedCmk property: Flag to tell if simplified CMK should be enabled for this + * workspace.. + * + * @param enableSimplifiedCmk Flag to tell if simplified CMK should be enabled for this workspace. + * @return the next definition stage. + */ + WithCreate withEnableSimplifiedCmk(Boolean enableSimplifiedCmk); + } + + /** + * The stage of the Workspace definition allowing to specify enableSoftwareBillOfMaterials. + */ + interface WithEnableSoftwareBillOfMaterials { + /** + * Specifies the enableSoftwareBillOfMaterials property: Flag to tell if SoftwareBillOfMaterials should be + * enabled for this workspace.. + * + * @param enableSoftwareBillOfMaterials Flag to tell if SoftwareBillOfMaterials 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.. + * Specifies the encryption property: The encryption property.. * - * @param encryption The encryption settings of Azure ML workspace. + * @param encryption The encryption property. * @return the next definition stage. */ WithCreate withEncryption(EncryptionProperty encryption); } + /** + * 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. */ @@ -606,6 +825,19 @@ interface WithHbiWorkspace { WithCreate withHbiWorkspace(Boolean hbiWorkspace); } + /** + * 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. */ @@ -620,73 +852,70 @@ interface WithImageBuildCompute { } /** - * The stage of the Workspace definition allowing to specify allowPublicAccessWhenBehindVnet. + * The stage of the Workspace definition allowing to specify ipAllowlist. */ - interface WithAllowPublicAccessWhenBehindVnet { + interface WithIpAllowlist { /** - * Specifies the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public - * access when behind VNet.. + * Specifies the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace.. * - * @param allowPublicAccessWhenBehindVnet The flag to indicate whether to allow public access when behind - * VNet. + * @param ipAllowlist The list of IPv4 addresses that are allowed to access the workspace. * @return the next definition stage. */ - WithCreate withAllowPublicAccessWhenBehindVnet(Boolean allowPublicAccessWhenBehindVnet); + WithCreate withIpAllowlist(List ipAllowlist); } /** - * The stage of the Workspace definition allowing to specify publicNetworkAccess. + * The stage of the Workspace definition allowing to specify keyVault. */ - interface WithPublicNetworkAccess { + interface WithKeyVault { /** - * Specifies the publicNetworkAccess property: Whether requests from Public Network are allowed.. + * 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 publicNetworkAccess Whether requests from Public Network are allowed. + * @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 withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess); + WithCreate withKeyVault(String keyVault); } /** - * The stage of the Workspace definition allowing to specify serverlessComputeSettings. + * The stage of the Workspace definition allowing to specify keyVaults. */ - interface WithServerlessComputeSettings { + interface WithKeyVaults { /** - * Specifies the serverlessComputeSettings property: Settings for serverless compute created in the - * workspace. + * Specifies the keyVaults property: The keyVaults property.. * - * @param serverlessComputeSettings Settings for serverless compute created in the workspace. + * @param keyVaults The keyVaults property. * @return the next definition stage. */ - WithCreate withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings); + WithCreate withKeyVaults(List keyVaults); } /** - * The stage of the Workspace definition allowing to specify sharedPrivateLinkResources. + * The stage of the Workspace definition allowing to specify managedNetwork. */ - interface WithSharedPrivateLinkResources { + interface WithManagedNetwork { /** - * Specifies the sharedPrivateLinkResources property: The list of shared private link resources in this - * workspace.. + * Specifies the managedNetwork property: Managed Network settings for a machine learning workspace.. * - * @param sharedPrivateLinkResources The list of shared private link resources in this workspace. + * @param managedNetwork Managed Network settings for a machine learning workspace. * @return the next definition stage. */ - WithCreate withSharedPrivateLinkResources(List sharedPrivateLinkResources); + WithCreate withManagedNetwork(ManagedNetworkSettingsInner managedNetwork); } /** - * The stage of the Workspace definition allowing to specify serviceManagedResourcesSettings. + * The stage of the Workspace definition allowing to specify networkAcls. */ - interface WithServiceManagedResourcesSettings { + interface WithNetworkAcls { /** - * Specifies the serviceManagedResourcesSettings property: The service managed resource settings.. + * Specifies the networkAcls property: A set of rules governing the network accessibility of the workspace.. * - * @param serviceManagedResourcesSettings The service managed resource settings. + * @param networkAcls A set of rules governing the network accessibility of the workspace. * @return the next definition stage. */ - WithCreate - withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings); + WithCreate withNetworkAcls(NetworkAcls networkAcls); } /** @@ -705,82 +934,142 @@ interface WithPrimaryUserAssignedIdentity { } /** - * The stage of the Workspace definition allowing to specify v1LegacyMode. + * The stage of the Workspace definition allowing to specify provisionNetworkNow. */ - interface WithV1LegacyMode { + interface WithProvisionNetworkNow { /** - * Specifies the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided - * by the v2 API.. + * Specifies the provisionNetworkNow property: Set to trigger the provisioning of the managed VNet with the + * default Options when creating a Workspace with the managed VNet enabled, or else it does nothing.. * - * @param v1LegacyMode Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. + * @param provisionNetworkNow Set to trigger the provisioning of the managed VNet with the default Options + * when creating a Workspace with the managed VNet enabled, or else it does nothing. * @return the next definition stage. */ - WithCreate withV1LegacyMode(Boolean v1LegacyMode); + WithCreate withProvisionNetworkNow(Boolean provisionNetworkNow); } /** - * The stage of the Workspace definition allowing to specify managedNetwork. + * The stage of the Workspace definition allowing to specify publicNetworkAccess. */ - interface WithManagedNetwork { + interface WithPublicNetworkAccess { /** - * Specifies the managedNetwork property: Managed Network settings for a machine learning workspace.. + * Specifies the publicNetworkAccess property: Whether requests from Public Network are allowed.. * - * @param managedNetwork Managed Network settings for a machine learning workspace. + * @param publicNetworkAccess Whether requests from Public Network are allowed. + * @return the next definition stage. + */ + WithCreate withPublicNetworkAccess(PublicNetworkAccessType publicNetworkAccess); + } + + /** + * The stage of the Workspace definition allowing to specify serverlessComputeSettings. + */ + interface WithServerlessComputeSettings { + /** + * 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 withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings); + } + + /** + * The stage of the Workspace definition allowing to specify serviceManagedResourcesSettings. + */ + interface WithServiceManagedResourcesSettings { + /** + * Specifies the serviceManagedResourcesSettings property: The service managed resource settings.. + * + * @param serviceManagedResourcesSettings The service managed resource settings. + * @return the next definition stage. + */ + WithCreate + withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings); + } + + /** + * 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 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. */ - WithCreate withManagedNetwork(ManagedNetworkSettingsInner managedNetwork); + WithCreate withSoftDeleteRetentionInDays(Integer softDeleteRetentionInDays); } /** - * The stage of the Workspace definition allowing to specify featureStoreSettings. + * The stage of the Workspace definition allowing to specify storageAccount. */ - interface WithFeatureStoreSettings { + interface WithStorageAccount { /** - * Specifies the featureStoreSettings property: Settings for feature store type workspace.. + * 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 featureStoreSettings Settings for feature store type workspace. + * @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 withFeatureStoreSettings(FeatureStoreSettings featureStoreSettings); + WithCreate withStorageAccount(String storageAccount); } /** - * The stage of the Workspace definition allowing to specify associatedWorkspaces. + * The stage of the Workspace definition allowing to specify storageAccounts. */ - interface WithAssociatedWorkspaces { + interface WithStorageAccounts { /** - * Specifies the associatedWorkspaces property: The associatedWorkspaces property.. + * Specifies the storageAccounts property: The storageAccounts property.. * - * @param associatedWorkspaces The associatedWorkspaces property. + * @param storageAccounts The storageAccounts property. * @return the next definition stage. */ - WithCreate withAssociatedWorkspaces(List associatedWorkspaces); + WithCreate withStorageAccounts(List storageAccounts); } /** - * The stage of the Workspace definition allowing to specify enableDataIsolation. + * The stage of the Workspace definition allowing to specify systemDatastoresAuthMode. */ - interface WithEnableDataIsolation { + interface WithSystemDatastoresAuthMode { /** - * Specifies the enableDataIsolation property: The enableDataIsolation property.. + * Specifies the systemDatastoresAuthMode property: The auth mode used for accessing the system datastores + * of the workspace.. * - * @param enableDataIsolation The enableDataIsolation property. + * @param systemDatastoresAuthMode The auth mode used for accessing the system datastores of the workspace. * @return the next definition stage. */ - WithCreate withEnableDataIsolation(Boolean enableDataIsolation); + WithCreate withSystemDatastoresAuthMode(SystemDatastoresAuthMode systemDatastoresAuthMode); } /** - * The stage of the Workspace definition allowing to specify hubResourceId. + * The stage of the Workspace definition allowing to specify v1LegacyMode. */ - interface WithHubResourceId { + interface WithV1LegacyMode { /** - * Specifies the hubResourceId property: The hubResourceId property.. + * Specifies the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided + * by the v2 API.. * - * @param hubResourceId The hubResourceId property. + * @param v1LegacyMode Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. * @return the next definition stage. */ - WithCreate withHubResourceId(String hubResourceId); + WithCreate withV1LegacyMode(Boolean v1LegacyMode); } /** @@ -807,13 +1096,16 @@ interface WithWorkspaceHubConfig { /** * 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.WithServerlessComputeSettings, UpdateStages.WithPublicNetworkAccess, - UpdateStages.WithApplicationInsights, UpdateStages.WithContainerRegistry, UpdateStages.WithFeatureStoreSettings, - UpdateStages.WithManagedNetwork, UpdateStages.WithEnableDataIsolation, UpdateStages.WithV1LegacyMode, - UpdateStages.WithEncryption { + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithSku, + UpdateStages.WithAllowRoleAssignmentOnRG, UpdateStages.WithApplicationInsights, + UpdateStages.WithContainerRegistry, UpdateStages.WithDescription, UpdateStages.WithEnableDataIsolation, + UpdateStages.WithEnableSoftwareBillOfMaterials, UpdateStages.WithEncryption, + UpdateStages.WithFeatureStoreSettings, UpdateStages.WithFriendlyName, UpdateStages.WithImageBuildCompute, + UpdateStages.WithIpAllowlist, UpdateStages.WithManagedNetwork, UpdateStages.WithNetworkAcls, + UpdateStages.WithPrimaryUserAssignedIdentity, UpdateStages.WithPublicNetworkAccess, + UpdateStages.WithServerlessComputeSettings, UpdateStages.WithServiceManagedResourcesSettings, + UpdateStages.WithSoftDeleteRetentionInDays, UpdateStages.WithSystemDatastoresAuthMode, + UpdateStages.WithV1LegacyMode { /** * Executes the update request. * @@ -847,30 +1139,74 @@ interface WithTags { Update withTags(Map tags); } + /** + * 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.. + * 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 The sku of the workspace. + * @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. + * The stage of the Workspace update allowing to specify allowRoleAssignmentOnRG. */ - interface WithIdentity { + interface WithAllowRoleAssignmentOnRG { /** - * Specifies the identity property: The identity of the resource.. + * Specifies the allowRoleAssignmentOnRG property: The allowRoleAssignmentOnRG property.. * - * @param identity The identity of the resource. + * @param allowRoleAssignmentOnRG The allowRoleAssignmentOnRG property. * @return the next definition stage. */ - Update withIdentity(ManagedServiceIdentity identity); + Update withAllowRoleAssignmentOnRG(Boolean allowRoleAssignmentOnRG); + } + + /** + * 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 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 withContainerRegistry(String containerRegistry); } /** @@ -886,14 +1222,68 @@ interface WithDescription { Update withDescription(String description); } + /** + * 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 SoftwareBillOfMaterials should be + * enabled for this workspace. + * + * @param enableSoftwareBillOfMaterials Flag to tell if SoftwareBillOfMaterials 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.. + * Specifies the friendlyName property: The friendly name for this workspace. This name in mutable. * - * @param friendlyName The friendly name for this workspace. + * @param friendlyName The friendly name for this workspace. This name in mutable. * @return the next definition stage. */ Update withFriendlyName(String friendlyName); @@ -913,125 +1303,124 @@ interface WithImageBuildCompute { } /** - * The stage of the Workspace update allowing to specify serviceManagedResourcesSettings. + * The stage of the Workspace update allowing to specify ipAllowlist. */ - interface WithServiceManagedResourcesSettings { + interface WithIpAllowlist { /** - * Specifies the serviceManagedResourcesSettings property: The service managed resource settings.. + * Specifies the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace.. * - * @param serviceManagedResourcesSettings The service managed resource settings. + * @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 primaryUserAssignedIdentity. + * The stage of the Workspace update allowing to specify managedNetwork. */ - interface WithPrimaryUserAssignedIdentity { + interface WithManagedNetwork { /** - * Specifies the primaryUserAssignedIdentity property: The user assigned identity resource id that - * represents the workspace identity.. + * Specifies the managedNetwork property: Managed Network settings for a machine learning workspace.. * - * @param primaryUserAssignedIdentity The user assigned identity resource id that represents the workspace - * identity. + * @param managedNetwork Managed Network settings for a machine learning workspace. * @return the next definition stage. */ - Update withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity); + Update withManagedNetwork(ManagedNetworkSettingsInner managedNetwork); } /** - * The stage of the Workspace update allowing to specify serverlessComputeSettings. + * The stage of the Workspace update allowing to specify networkAcls. */ - interface WithServerlessComputeSettings { + interface WithNetworkAcls { /** - * Specifies the serverlessComputeSettings property: Settings for serverless compute created in the - * workspace. + * Specifies the networkAcls property: A set of rules governing the network accessibility of the workspace.. * - * @param serverlessComputeSettings Settings for serverless compute created in the workspace. + * @param networkAcls A set of rules governing the network accessibility of the workspace. * @return the next definition stage. */ - Update withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings); + Update withNetworkAcls(NetworkAcls networkAcls); } /** - * The stage of the Workspace update allowing to specify publicNetworkAccess. + * The stage of the Workspace update allowing to specify primaryUserAssignedIdentity. */ - interface WithPublicNetworkAccess { + interface WithPrimaryUserAssignedIdentity { /** - * Specifies the publicNetworkAccess property: Whether requests from Public Network are allowed.. + * Specifies the primaryUserAssignedIdentity property: The user assigned identity resource id that + * represents the workspace identity.. * - * @param publicNetworkAccess Whether requests from Public Network are allowed. + * @param primaryUserAssignedIdentity The user assigned identity resource id that represents the workspace + * identity. * @return the next definition stage. */ - Update withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess); + Update withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity); } /** - * The stage of the Workspace update allowing to specify applicationInsights. + * The stage of the Workspace update allowing to specify publicNetworkAccess. */ - interface WithApplicationInsights { + interface WithPublicNetworkAccess { /** - * Specifies the applicationInsights property: ARM id of the application insights associated with this - * workspace.. + * Specifies the publicNetworkAccess property: Whether requests from Public Network are allowed.. * - * @param applicationInsights ARM id of the application insights associated with this workspace. + * @param publicNetworkAccess Whether requests from Public Network are allowed. * @return the next definition stage. */ - Update withApplicationInsights(String applicationInsights); + Update withPublicNetworkAccess(PublicNetworkAccessType publicNetworkAccess); } /** - * The stage of the Workspace update allowing to specify containerRegistry. + * The stage of the Workspace update allowing to specify serverlessComputeSettings. */ - interface WithContainerRegistry { + interface WithServerlessComputeSettings { /** - * Specifies the containerRegistry property: ARM id of the container registry associated with this - * workspace.. + * Specifies the serverlessComputeSettings property: Settings for serverless compute in a workspace. * - * @param containerRegistry ARM id of the container registry associated with this workspace. + * @param serverlessComputeSettings Settings for serverless compute in a workspace. * @return the next definition stage. */ - Update withContainerRegistry(String containerRegistry); + Update withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings); } /** - * The stage of the Workspace update allowing to specify featureStoreSettings. + * The stage of the Workspace update allowing to specify serviceManagedResourcesSettings. */ - interface WithFeatureStoreSettings { + interface WithServiceManagedResourcesSettings { /** - * Specifies the featureStoreSettings property: Settings for feature store type workspace.. + * Specifies the serviceManagedResourcesSettings property: The service managed resource settings.. * - * @param featureStoreSettings Settings for feature store type workspace. + * @param serviceManagedResourcesSettings The service managed resource settings. * @return the next definition stage. */ - Update withFeatureStoreSettings(FeatureStoreSettings featureStoreSettings); + Update withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings); } /** - * The stage of the Workspace update allowing to specify managedNetwork. + * The stage of the Workspace update allowing to specify softDeleteRetentionInDays. */ - interface WithManagedNetwork { + interface WithSoftDeleteRetentionInDays { /** - * Specifies the managedNetwork property: Managed Network settings for a machine learning workspace.. + * Specifies the softDeleteRetentionInDays property: Retention time in days after workspace get soft + * deleted.. * - * @param managedNetwork Managed Network settings for a machine learning workspace. + * @param softDeleteRetentionInDays Retention time in days after workspace get soft deleted. * @return the next definition stage. */ - Update withManagedNetwork(ManagedNetworkSettingsInner managedNetwork); + Update withSoftDeleteRetentionInDays(Integer softDeleteRetentionInDays); } /** - * The stage of the Workspace update allowing to specify enableDataIsolation. + * The stage of the Workspace update allowing to specify systemDatastoresAuthMode. */ - interface WithEnableDataIsolation { + interface WithSystemDatastoresAuthMode { /** - * Specifies the enableDataIsolation property: The enableDataIsolation property.. + * Specifies the systemDatastoresAuthMode property: The auth mode used for accessing the system datastores + * of the workspace.. * - * @param enableDataIsolation The enableDataIsolation property. + * @param systemDatastoresAuthMode The auth mode used for accessing the system datastores of the workspace. * @return the next definition stage. */ - Update withEnableDataIsolation(Boolean enableDataIsolation); + Update withSystemDatastoresAuthMode(SystemDatastoresAuthMode systemDatastoresAuthMode); } /** @@ -1047,19 +1436,6 @@ interface WithV1LegacyMode { */ Update withV1LegacyMode(Boolean v1LegacyMode); } - - /** - * 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); - } } /** @@ -1089,14 +1465,14 @@ interface WithEncryption { /** * 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 @@ -1121,27 +1497,27 @@ interface WithEncryption { 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. + * 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. */ - 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. @@ -1149,74 +1525,74 @@ interface WithEncryption { * @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. + * 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. */ - NotebookResourceInfo prepareNotebook(Context context); + ListStorageAccountKeysResult listStorageAccountKeys(); /** - * 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 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. + * 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 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/WorkspaceConnectionAccountKey.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionAccountKey.java index 8ef9051a71657..5a81c0b7ee880 100644 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionAccountKey.java +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionAccountKey.java @@ -12,7 +12,7 @@ import java.io.IOException; /** - * The WorkspaceConnectionAccountKey model. + * Account key object for workspace connection credential. */ @Fluent public final class WorkspaceConnectionAccountKey implements JsonSerializable { 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 8868888c833fc..eb0fed6a408d9 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 @@ -17,14 +17,14 @@ @Fluent public final class WorkspaceConnectionManagedIdentity implements JsonSerializable { /* - * The resourceId property. + * The clientId property. */ - private String resourceId; + private String clientId; /* - * The clientId property. + * The resourceId property. */ - private String clientId; + private String resourceId; /** * Creates an instance of WorkspaceConnectionManagedIdentity class. @@ -33,42 +33,42 @@ public WorkspaceConnectionManagedIdentity() { } /** - * Get the resourceId property: The resourceId property. + * Get the clientId property: The clientId property. * - * @return the resourceId value. + * @return the clientId value. */ - public String resourceId() { - return this.resourceId; + public String clientId() { + return this.clientId; } /** - * Set the resourceId property: The resourceId property. + * Set the clientId property: The clientId property. * - * @param resourceId the resourceId value to set. + * @param clientId the clientId value to set. * @return the WorkspaceConnectionManagedIdentity object itself. */ - public WorkspaceConnectionManagedIdentity withResourceId(String resourceId) { - this.resourceId = resourceId; + public WorkspaceConnectionManagedIdentity withClientId(String clientId) { + this.clientId = clientId; return this; } /** - * Get the clientId property: The clientId property. + * Get the resourceId property: The resourceId property. * - * @return the clientId value. + * @return the resourceId value. */ - public String clientId() { - return this.clientId; + public String resourceId() { + return this.resourceId; } /** - * Set the clientId property: The clientId property. + * Set the resourceId property: The resourceId property. * - * @param clientId the clientId value to set. + * @param resourceId the resourceId value to set. * @return the WorkspaceConnectionManagedIdentity object itself. */ - public WorkspaceConnectionManagedIdentity withClientId(String clientId) { - this.clientId = clientId; + public WorkspaceConnectionManagedIdentity withResourceId(String resourceId) { + this.resourceId = resourceId; return this; } @@ -86,8 +86,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("resourceId", this.resourceId); jsonWriter.writeStringField("clientId", this.clientId); + jsonWriter.writeStringField("resourceId", this.resourceId); return jsonWriter.writeEndObject(); } @@ -107,10 +107,10 @@ public static WorkspaceConnectionManagedIdentity fromJson(JsonReader jsonReader) String fieldName = reader.getFieldName(); reader.nextToken(); - if ("resourceId".equals(fieldName)) { - deserializedWorkspaceConnectionManagedIdentity.resourceId = reader.getString(); - } else if ("clientId".equals(fieldName)) { + if ("clientId".equals(fieldName)) { deserializedWorkspaceConnectionManagedIdentity.clientId = reader.getString(); + } else if ("resourceId".equals(fieldName)) { + deserializedWorkspaceConnectionManagedIdentity.resourceId = reader.getString(); } else { reader.skipChildren(); } 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 23ddc52564034..79438649b0289 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 @@ -36,6 +36,11 @@ public class WorkspaceConnectionPropertiesV2 implements JsonSerializable metadata; /* - * Store user metadata for this connection + * The peRequirement property. */ - private Map metadata; + private ManagedPERequirement peRequirement; + + /* + * The peStatus property. + */ + private ManagedPEStatus peStatus; /* * The sharedUserList property. @@ -67,14 +77,14 @@ public class WorkspaceConnectionPropertiesV2 implements JsonSerializable sharedUserList; /* - * Value details of the workspace connection. + * The target property. */ - private String value; + private String target; /* - * format for the workspace connection value + * The useWorkspaceManagedIdentity property. */ - private ValueFormat valueFormat; + private Boolean useWorkspaceManagedIdentity; /** * Creates an instance of WorkspaceConnectionPropertiesV2 class. @@ -131,6 +141,26 @@ WorkspaceConnectionPropertiesV2 withCreatedByWorkspaceArmId(String createdByWork return this; } + /** + * Get the error property: The error property. + * + * @return the error value. + */ + public String error() { + return this.error; + } + + /** + * Set the error property: The error property. + * + * @param error the error value to set. + * @return the WorkspaceConnectionPropertiesV2 object itself. + */ + public WorkspaceConnectionPropertiesV2 withError(String error) { + this.error = error; + return this; + } + /** * Get the expiryTime property: The expiryTime property. * @@ -192,42 +222,62 @@ public WorkspaceConnectionPropertiesV2 withIsSharedToAll(Boolean isSharedToAll) } /** - * Get the target property: The target property. + * Get the metadata property: Store user metadata for this connection. * - * @return the target value. + * @return the metadata value. */ - public String target() { - return this.target; + public Map metadata() { + return this.metadata; } /** - * Set the target property: The target property. + * Set the metadata property: Store user metadata for this connection. * - * @param target the target value to set. + * @param metadata the metadata value to set. * @return the WorkspaceConnectionPropertiesV2 object itself. */ - public WorkspaceConnectionPropertiesV2 withTarget(String target) { - this.target = target; + public WorkspaceConnectionPropertiesV2 withMetadata(Map metadata) { + this.metadata = metadata; return this; } /** - * Get the metadata property: Store user metadata for this connection. + * Get the peRequirement property: The peRequirement property. * - * @return the metadata value. + * @return the peRequirement value. */ - public Map metadata() { - return this.metadata; + public ManagedPERequirement peRequirement() { + return this.peRequirement; } /** - * Set the metadata property: Store user metadata for this connection. + * Set the peRequirement property: The peRequirement property. * - * @param metadata the metadata value to set. + * @param peRequirement the peRequirement value to set. * @return the WorkspaceConnectionPropertiesV2 object itself. */ - public WorkspaceConnectionPropertiesV2 withMetadata(Map metadata) { - this.metadata = metadata; + public WorkspaceConnectionPropertiesV2 withPeRequirement(ManagedPERequirement peRequirement) { + this.peRequirement = peRequirement; + return this; + } + + /** + * Get the peStatus property: The peStatus property. + * + * @return the peStatus value. + */ + public ManagedPEStatus peStatus() { + return this.peStatus; + } + + /** + * Set the peStatus property: The peStatus property. + * + * @param peStatus the peStatus value to set. + * @return the WorkspaceConnectionPropertiesV2 object itself. + */ + public WorkspaceConnectionPropertiesV2 withPeStatus(ManagedPEStatus peStatus) { + this.peStatus = peStatus; return this; } @@ -252,42 +302,42 @@ public WorkspaceConnectionPropertiesV2 withSharedUserList(List sharedUse } /** - * Get the value property: Value details of the workspace connection. + * Get the target property: The target property. * - * @return the value value. + * @return the target value. */ - public String value() { - return this.value; + public String target() { + return this.target; } /** - * Set the value property: Value details of the workspace connection. + * Set the target property: The target property. * - * @param value the value value to set. + * @param target the target value to set. * @return the WorkspaceConnectionPropertiesV2 object itself. */ - public WorkspaceConnectionPropertiesV2 withValue(String value) { - this.value = value; + public WorkspaceConnectionPropertiesV2 withTarget(String target) { + this.target = target; return this; } /** - * Get the valueFormat property: format for the workspace connection value. + * Get the useWorkspaceManagedIdentity property: The useWorkspaceManagedIdentity property. * - * @return the valueFormat value. + * @return the useWorkspaceManagedIdentity value. */ - public ValueFormat valueFormat() { - return this.valueFormat; + public Boolean useWorkspaceManagedIdentity() { + return this.useWorkspaceManagedIdentity; } /** - * Set the valueFormat property: format for the workspace connection value. + * Set the useWorkspaceManagedIdentity property: The useWorkspaceManagedIdentity property. * - * @param valueFormat the valueFormat value to set. + * @param useWorkspaceManagedIdentity the useWorkspaceManagedIdentity value to set. * @return the WorkspaceConnectionPropertiesV2 object itself. */ - public WorkspaceConnectionPropertiesV2 withValueFormat(ValueFormat valueFormat) { - this.valueFormat = valueFormat; + public WorkspaceConnectionPropertiesV2 withUseWorkspaceManagedIdentity(Boolean useWorkspaceManagedIdentity) { + this.useWorkspaceManagedIdentity = useWorkspaceManagedIdentity; return this; } @@ -307,15 +357,17 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); jsonWriter.writeStringField("category", this.category == null ? null : this.category.toString()); + jsonWriter.writeStringField("error", this.error); jsonWriter.writeStringField("expiryTime", this.expiryTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.expiryTime)); jsonWriter.writeBooleanField("isSharedToAll", this.isSharedToAll); - jsonWriter.writeStringField("target", this.target); jsonWriter.writeMapField("metadata", this.metadata, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("peRequirement", this.peRequirement == null ? null : this.peRequirement.toString()); + jsonWriter.writeStringField("peStatus", this.peStatus == null ? null : this.peStatus.toString()); jsonWriter.writeArrayField("sharedUserList", this.sharedUserList, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("value", this.value); - jsonWriter.writeStringField("valueFormat", this.valueFormat == null ? null : this.valueFormat.toString()); + jsonWriter.writeStringField("target", this.target); + jsonWriter.writeBooleanField("useWorkspaceManagedIdentity", this.useWorkspaceManagedIdentity); return jsonWriter.writeEndObject(); } @@ -343,17 +395,7 @@ public static WorkspaceConnectionPropertiesV2 fromJson(JsonReader jsonReader) th } } // Use the discriminator value to determine which subtype should be deserialized. - if ("PAT".equals(discriminatorValue)) { - return PatAuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); - } else if ("SAS".equals(discriminatorValue)) { - return SasAuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); - } else if ("UsernamePassword".equals(discriminatorValue)) { - return UsernamePasswordAuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); - } else if ("None".equals(discriminatorValue)) { - return NoneAuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); - } else if ("ManagedIdentity".equals(discriminatorValue)) { - return ManagedIdentityAuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); - } else if ("AAD".equals(discriminatorValue)) { + if ("AAD".equals(discriminatorValue)) { return AadAuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); } else if ("AccessKey".equals(discriminatorValue)) { return AccessKeyAuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); @@ -363,10 +405,20 @@ public static WorkspaceConnectionPropertiesV2 fromJson(JsonReader jsonReader) th return ApiKeyAuthWorkspaceConnectionProperties.fromJson(readerToUse.reset()); } else if ("CustomKeys".equals(discriminatorValue)) { return CustomKeysWorkspaceConnectionProperties.fromJson(readerToUse.reset()); + } else if ("ManagedIdentity".equals(discriminatorValue)) { + return ManagedIdentityAuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); + } else if ("None".equals(discriminatorValue)) { + return NoneAuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); } else if ("OAuth2".equals(discriminatorValue)) { return OAuth2AuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); + } else if ("PAT".equals(discriminatorValue)) { + return PatAuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); + } else if ("SAS".equals(discriminatorValue)) { + return SasAuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); } else if ("ServicePrincipal".equals(discriminatorValue)) { return ServicePrincipalAuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); + } else if ("UsernamePassword".equals(discriminatorValue)) { + return UsernamePasswordAuthTypeWorkspaceConnectionProperties.fromJson(readerToUse.reset()); } else { return fromJsonKnownDiscriminator(readerToUse.reset()); } @@ -390,6 +442,8 @@ static WorkspaceConnectionPropertiesV2 fromJsonKnownDiscriminator(JsonReader jso = ConnectionCategory.fromString(reader.getString()); } else if ("createdByWorkspaceArmId".equals(fieldName)) { deserializedWorkspaceConnectionPropertiesV2.createdByWorkspaceArmId = reader.getString(); + } else if ("error".equals(fieldName)) { + deserializedWorkspaceConnectionPropertiesV2.error = reader.getString(); } else if ("expiryTime".equals(fieldName)) { deserializedWorkspaceConnectionPropertiesV2.expiryTime = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); @@ -398,19 +452,23 @@ static WorkspaceConnectionPropertiesV2 fromJsonKnownDiscriminator(JsonReader jso } else if ("isSharedToAll".equals(fieldName)) { deserializedWorkspaceConnectionPropertiesV2.isSharedToAll = reader.getNullable(JsonReader::getBoolean); - } else if ("target".equals(fieldName)) { - deserializedWorkspaceConnectionPropertiesV2.target = reader.getString(); } else if ("metadata".equals(fieldName)) { Map metadata = reader.readMap(reader1 -> reader1.getString()); deserializedWorkspaceConnectionPropertiesV2.metadata = metadata; + } else if ("peRequirement".equals(fieldName)) { + deserializedWorkspaceConnectionPropertiesV2.peRequirement + = ManagedPERequirement.fromString(reader.getString()); + } else if ("peStatus".equals(fieldName)) { + deserializedWorkspaceConnectionPropertiesV2.peStatus + = ManagedPEStatus.fromString(reader.getString()); } else if ("sharedUserList".equals(fieldName)) { List sharedUserList = reader.readArray(reader1 -> reader1.getString()); deserializedWorkspaceConnectionPropertiesV2.sharedUserList = sharedUserList; - } else if ("value".equals(fieldName)) { - deserializedWorkspaceConnectionPropertiesV2.value = reader.getString(); - } else if ("valueFormat".equals(fieldName)) { - deserializedWorkspaceConnectionPropertiesV2.valueFormat - = ValueFormat.fromString(reader.getString()); + } else if ("target".equals(fieldName)) { + deserializedWorkspaceConnectionPropertiesV2.target = reader.getString(); + } else if ("useWorkspaceManagedIdentity".equals(fieldName)) { + deserializedWorkspaceConnectionPropertiesV2.useWorkspaceManagedIdentity + = reader.getNullable(JsonReader::getBoolean); } else { reader.skipChildren(); } 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 b5033785919a2..3a6b55e3ccf6a 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 @@ -48,6 +48,13 @@ public interface WorkspaceConnectionPropertiesV2BasicResource { */ 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. @@ -81,7 +88,7 @@ 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); @@ -123,6 +130,52 @@ interface WithCreate { } } + /** + * 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. * @@ -157,4 +210,23 @@ interface WithCreate { * @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 6b396ac6ae206..94b57105cf0bf 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 @@ -20,14 +20,14 @@ public final class WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult implements JsonSerializable { /* - * The value property. + * The nextLink property. */ - private List value; + private String nextLink; /* - * The nextLink property. + * The value property. */ - private String nextLink; + private List value; /** * Creates an instance of WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult class. @@ -35,6 +35,26 @@ public final class WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResul 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. * @@ -56,15 +76,6 @@ public List value() { return this; } - /** - * Get the nextLink property: The nextLink property. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - /** * Validates the instance. * @@ -82,6 +93,7 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -104,13 +116,13 @@ public static WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult fro String fieldName = reader.getFieldName(); reader.nextToken(); - if ("value".equals(fieldName)) { + if ("nextLink".equals(fieldName)) { + deserializedWorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.nextLink + = reader.getString(); + } else if ("value".equals(fieldName)) { List value = reader .readArray(reader1 -> WorkspaceConnectionPropertiesV2BasicResourceInner.fromJson(reader1)); deserializedWorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedWorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.nextLink - = reader.getString(); } else { reader.skipChildren(); } 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..00dcdd6e70ef5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionUpdateParameter.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.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The properties that the machine learning workspace connection will be updated with. + */ +@Fluent +public final class WorkspaceConnectionUpdateParameter implements JsonSerializable { + /* + * The properties that the machine learning workspace connection will be updated with. + */ + 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(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkspaceConnectionUpdateParameter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkspaceConnectionUpdateParameter if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the WorkspaceConnectionUpdateParameter. + */ + public static WorkspaceConnectionUpdateParameter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkspaceConnectionUpdateParameter deserializedWorkspaceConnectionUpdateParameter + = new WorkspaceConnectionUpdateParameter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("properties".equals(fieldName)) { + deserializedWorkspaceConnectionUpdateParameter.properties + = WorkspaceConnectionPropertiesV2.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkspaceConnectionUpdateParameter; + }); + } +} 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 6f9aa0d5ce367..2aeeb52e243be 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 @@ -17,11 +17,6 @@ @Fluent public final class WorkspaceConnectionUsernamePassword implements JsonSerializable { - /* - * The username property. - */ - private String username; - /* * The password property. */ @@ -32,30 +27,15 @@ public final class WorkspaceConnectionUsernamePassword */ private String securityToken; - /** - * Creates an instance of WorkspaceConnectionUsernamePassword class. - */ - public WorkspaceConnectionUsernamePassword() { - } - - /** - * Get the username property: The username property. - * - * @return the username value. + /* + * The username property. */ - public String username() { - return this.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() { } /** @@ -100,6 +80,26 @@ public WorkspaceConnectionUsernamePassword withSecurityToken(String securityToke 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. * @@ -114,9 +114,9 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("username", this.username); jsonWriter.writeStringField("password", this.password); jsonWriter.writeStringField("securityToken", this.securityToken); + jsonWriter.writeStringField("username", this.username); return jsonWriter.writeEndObject(); } @@ -136,12 +136,12 @@ public static WorkspaceConnectionUsernamePassword fromJson(JsonReader jsonReader String fieldName = reader.getFieldName(); reader.nextToken(); - if ("username".equals(fieldName)) { - deserializedWorkspaceConnectionUsernamePassword.username = reader.getString(); - } else if ("password".equals(fieldName)) { + if ("password".equals(fieldName)) { deserializedWorkspaceConnectionUsernamePassword.password = reader.getString(); } else if ("securityToken".equals(fieldName)) { deserializedWorkspaceConnectionUsernamePassword.securityToken = reader.getString(); + } else if ("username".equals(fieldName)) { + deserializedWorkspaceConnectionUsernamePassword.username = reader.getString(); } else { reader.skipChildren(); } 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 8cb1ea5814cbe..28dcdccd54f05 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,45 +7,47 @@ 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. */ 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 connectionName Friendly name of the workspace connection. - * @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 paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, - String workspaceName, String connectionName, Context context); + PagedIterable list(String resourceGroupName, String workspaceName); /** - * 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 connectionName Friendly name of the 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. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown 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 paginated response with {@link PagedIterable}. */ - WorkspaceConnectionPropertiesV2BasicResource get(String resourceGroupName, String workspaceName, - String connectionName); + PagedIterable list(String resourceGroupName, String workspaceName, + String target, String category, Boolean includeAll, Context context); /** - * The delete 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. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -57,10 +59,10 @@ Response deleteWithResponse(String resourceGroupName, String workspaceName Context context); /** - * The delete 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. @@ -69,38 +71,39 @@ Response deleteWithResponse(String resourceGroupName, String workspaceName void delete(String resourceGroupName, String workspaceName, String connectionName); /** - * The list 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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException 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}. */ - PagedIterable list(String resourceGroupName, String workspaceName); + Response getWithResponse(String resourceGroupName, + String workspaceName, String connectionName, Context context); /** - * The list 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 target Target of the workspace connection. - * @param category Category of the workspace connection. - * @param context The context to associate with this operation. + * @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}. + * @return the response. */ - PagedIterable list(String resourceGroupName, String workspaceName, - String target, String category, Context context); + WorkspaceConnectionPropertiesV2BasicResource get(String resourceGroupName, String workspaceName, + String connectionName); /** * 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 context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -115,7 +118,7 @@ Response listSecretsWithResponse(S * 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. @@ -126,7 +129,34 @@ WorkspaceConnectionPropertiesV2BasicResource listSecrets(String resourceGroupNam String connectionName); /** - * The get 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 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 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. + */ + void testConnection(String resourceGroupName, String workspaceName, String connectionName, + WorkspaceConnectionPropertiesV2BasicResourceInner body, Context context); + + /** + * Lists machine learning workspaces connections by name. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -137,7 +167,7 @@ WorkspaceConnectionPropertiesV2BasicResource listSecrets(String resourceGroupNam WorkspaceConnectionPropertiesV2BasicResource getById(String id); /** - * The get operation. + * Lists machine learning workspaces connections by name. * * @param id the resource ID. * @param context The context to associate with this operation. @@ -149,7 +179,7 @@ WorkspaceConnectionPropertiesV2BasicResource listSecrets(String resourceGroupNam Response getByIdWithResponse(String id, 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. @@ -159,7 +189,7 @@ WorkspaceConnectionPropertiesV2BasicResource listSecrets(String resourceGroupNam 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. 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 1969d8e6e869e..6079dbf229011 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 @@ -19,15 +19,15 @@ @Fluent public final class WorkspaceListResult implements JsonSerializable { /* - * 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. + * The link to the next page constructed using the continuationToken. If null, there are no additional pages. */ - private List value; + private String nextLink; /* - * The URI that can be used to request the next list of machine learning workspaces. + * 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. */ - private String nextLink; + private List value; /** * Creates an instance of WorkspaceListResult class. @@ -36,44 +36,46 @@ 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. + * Get the nextLink property: The link to the next page constructed using the continuationToken. If null, there are + * no additional pages. * - * @return the value value. + * @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. + * Set the nextLink property: The link to the next page constructed using the continuationToken. If null, there are + * no additional pages. * - * @param value the value value to set. + * @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. + * 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 nextLink value. + * @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. + * 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 nextLink the nextLink value to set. + * @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; } @@ -94,8 +96,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); jsonWriter.writeStringField("nextLink", this.nextLink); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -114,11 +116,11 @@ public static WorkspaceListResult fromJson(JsonReader jsonReader) throws IOExcep String fieldName = reader.getFieldName(); reader.nextToken(); - if ("value".equals(fieldName)) { + if ("nextLink".equals(fieldName)) { + deserializedWorkspaceListResult.nextLink = reader.getString(); + } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> WorkspaceInner.fromJson(reader1)); deserializedWorkspaceListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedWorkspaceListResult.nextLink = reader.getString(); } else { reader.skipChildren(); } 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..296d3968344b8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspacePrivateEndpointResource.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// 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.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The Private Endpoint resource. + */ +@Immutable +public final class WorkspacePrivateEndpointResource implements JsonSerializable { + /* + * e.g. + * /subscriptions/{networkSubscriptionId}/resourceGroups/{rgName}/providers/Microsoft.Network/privateEndpoints/{ + * privateEndpointName} + */ + private String id; + + /* + * The subnetId that the private endpoint is connected to. + */ + 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() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WorkspacePrivateEndpointResource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WorkspacePrivateEndpointResource if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the WorkspacePrivateEndpointResource. + */ + public static WorkspacePrivateEndpointResource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WorkspacePrivateEndpointResource deserializedWorkspacePrivateEndpointResource + = new WorkspacePrivateEndpointResource(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedWorkspacePrivateEndpointResource.id = reader.getString(); + } else if ("subnetArmId".equals(fieldName)) { + deserializedWorkspacePrivateEndpointResource.subnetArmId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedWorkspacePrivateEndpointResource; + }); + } +} 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 1bbaf7348fa1a..782feef550847 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 @@ -12,40 +12,48 @@ */ public interface WorkspaceProperties { /** - * Gets the workspaceId property: The immutable id associated with this workspace. + * Gets the agentsEndpointUri property: The URI of agents endpoint associated with this workspace. * - * @return the workspaceId value. + * @return the agentsEndpointUri value. */ - String workspaceId(); + String agentsEndpointUri(); /** - * Gets the description property: The description of this workspace. + * Gets the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when + * behind VNet. * - * @return the description value. + * @return the allowPublicAccessWhenBehindVnet value. */ - String description(); + Boolean allowPublicAccessWhenBehindVnet(); /** - * Gets the friendlyName property: The friendly name for this workspace. This name in mutable. + * Gets the allowRoleAssignmentOnRG property: The flag to indicate whether we will do role assignment for the + * workspace MSI on resource group level. * - * @return the friendlyName value. + * @return the allowRoleAssignmentOnRG value. */ - String friendlyName(); + Boolean allowRoleAssignmentOnRG(); /** - * Gets the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once - * the workspace has been created. + * Gets the applicationInsights property: ARM id of the application insights associated with this workspace. * - * @return the keyVault value. + * @return the applicationInsights value. */ - String keyVault(); + String applicationInsights(); /** - * Gets the applicationInsights property: ARM id of the application insights associated with this workspace. + * Gets the associatedWorkspaces property: The associatedWorkspaces property. * - * @return the applicationInsights value. + * @return the associatedWorkspaces value. */ - String applicationInsights(); + List associatedWorkspaces(); + + /** + * Gets the containerRegistries property: The containerRegistries property. + * + * @return the containerRegistries value. + */ + List containerRegistries(); /** * Gets the containerRegistry property: ARM id of the container registry associated with this workspace. @@ -55,12 +63,11 @@ public interface WorkspaceProperties { 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. + * Gets the description property: The description of this workspace. * - * @return the storageAccount value. + * @return the description value. */ - String storageAccount(); + String description(); /** * Gets the discoveryUrl property: Url for the discovery service to identify regional endpoints for machine learning @@ -71,42 +78,76 @@ public interface WorkspaceProperties { String discoveryUrl(); /** - * Gets the provisioningState property: The current deployment state of workspace resource. The provisioningState is - * to indicate states for resource provisioning. + * Gets the enableDataIsolation property: The enableDataIsolation property. * - * @return the provisioningState value. + * @return the enableDataIsolation value. */ - ProvisioningState provisioningState(); + Boolean enableDataIsolation(); + + /** + * Gets the enableServiceSideCmkEncryption property: The enableServiceSideCMKEncryption property. + * + * @return the enableServiceSideCmkEncryption value. + */ + Boolean enableServiceSideCmkEncryption(); + + /** + * Gets the enableSimplifiedCmk property: Flag to tell if simplified CMK should be enabled for this workspace. + * + * @return the enableSimplifiedCmk value. + */ + Boolean enableSimplifiedCmk(); /** - * Gets the encryption property: The encryption settings of Azure ML workspace. + * Gets the enableSoftwareBillOfMaterials property: Flag to tell if SoftwareBillOfMaterials 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 hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected - * by the service. + * Gets the existingWorkspaces property: The existingWorkspaces property. * - * @return the hbiWorkspace value. + * @return the existingWorkspaces value. */ - Boolean hbiWorkspace(); + List existingWorkspaces(); /** - * Gets the serviceProvisionedResourceGroup property: The name of the managed resource group created by workspace RP - * in customer subscription if the workspace is CMK workspace. + * Gets the featureStoreSettings property: Settings for feature store type workspace. * - * @return the serviceProvisionedResourceGroup value. + * @return the featureStoreSettings value. */ - String serviceProvisionedResourceGroup(); + FeatureStoreSettings featureStoreSettings(); /** - * Gets the privateLinkCount property: Count of private connections in the workspace. + * Gets the friendlyName property: The friendly name for this workspace. This name in mutable. * - * @return the privateLinkCount value. + * @return the friendlyName value. */ - Integer privateLinkCount(); + 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 hubResourceId property: The hubResourceId property. + * + * @return the hubResourceId value. + */ + String hubResourceId(); /** * Gets the imageBuildCompute property: The compute name for image build. @@ -116,54 +157,55 @@ public interface WorkspaceProperties { String imageBuildCompute(); /** - * Gets the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when - * behind VNet. + * Gets the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace. * - * @return the allowPublicAccessWhenBehindVnet value. + * @return the ipAllowlist value. */ - Boolean allowPublicAccessWhenBehindVnet(); + List ipAllowlist(); /** - * Gets the publicNetworkAccess property: Whether requests from Public Network are allowed. + * 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 publicNetworkAccess value. + * @return the keyVault value. */ - PublicNetworkAccess publicNetworkAccess(); + String keyVault(); /** - * Gets the privateEndpointConnections property: The list of private endpoint connections in the workspace. + * Gets the keyVaults property: The keyVaults property. * - * @return the privateEndpointConnections value. + * @return the keyVaults value. */ - List privateEndpointConnections(); + List keyVaults(); /** - * Gets the serverlessComputeSettings property: Settings for serverless compute created in the workspace. + * Gets the managedNetwork property: Managed Network settings for a machine learning workspace. * - * @return the serverlessComputeSettings value. + * @return the managedNetwork value. */ - ServerlessComputeSettings serverlessComputeSettings(); + ManagedNetworkSettings managedNetwork(); /** - * Gets the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. + * Gets the mlFlowTrackingUri property: The URI associated with this workspace that machine learning flow must point + * at to set up tracking. * - * @return the sharedPrivateLinkResources value. + * @return the mlFlowTrackingUri value. */ - List sharedPrivateLinkResources(); + String mlFlowTrackingUri(); /** - * Gets the notebookInfo property: The notebook info of Azure ML workspace. + * Gets the networkAcls property: A set of rules governing the network accessibility of the workspace. * - * @return the notebookInfo value. + * @return the networkAcls value. */ - NotebookResourceInfo notebookInfo(); + NetworkAcls networkAcls(); /** - * Gets the serviceManagedResourcesSettings property: The service managed resource settings. + * Gets the notebookInfo property: The notebook info of Azure ML workspace. * - * @return the serviceManagedResourcesSettings value. + * @return the notebookInfo value. */ - ServiceManagedResourcesSettings serviceManagedResourcesSettings(); + NotebookResourceInfo notebookInfo(); /** * Gets the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the @@ -174,70 +216,123 @@ public interface WorkspaceProperties { String primaryUserAssignedIdentity(); /** - * Gets the tenantId property: The tenant id associated with this workspace. + * Gets the privateEndpointConnections property: The list of private endpoint connections in the workspace. * - * @return the tenantId value. + * @return the privateEndpointConnections value. */ - String tenantId(); + List privateEndpointConnections(); /** - * Gets the storageHnsEnabled property: If the storage associated with the workspace has hierarchical namespace(HNS) - * enabled. + * Gets the privateLinkCount property: Count of private connections in the workspace. * - * @return the storageHnsEnabled value. + * @return the privateLinkCount value. */ - Boolean storageHnsEnabled(); + Integer privateLinkCount(); /** - * Gets the mlFlowTrackingUri property: The URI associated with this workspace that machine learning flow must point - * at to set up tracking. + * Gets the provisionNetworkNow property: Set to trigger the provisioning of the managed VNet with the default + * Options when creating a Workspace with the managed VNet enabled, or else it does nothing. * - * @return the mlFlowTrackingUri value. + * @return the provisionNetworkNow value. */ - String mlFlowTrackingUri(); + Boolean provisionNetworkNow(); /** - * Gets the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 - * API. + * Gets the provisioningState property: The current deployment state of workspace resource. The provisioningState is + * to indicate states for resource provisioning. * - * @return the v1LegacyMode value. + * @return the provisioningState value. */ - Boolean v1LegacyMode(); + ProvisioningState provisioningState(); /** - * Gets the managedNetwork property: Managed Network settings for a machine learning workspace. + * Gets the publicNetworkAccess property: Whether requests from Public Network are allowed. * - * @return the managedNetwork value. + * @return the publicNetworkAccess value. */ - ManagedNetworkSettings managedNetwork(); + PublicNetworkAccessType publicNetworkAccess(); /** - * Gets the featureStoreSettings property: Settings for feature store type workspace. + * Gets the serverlessComputeSettings property: Settings for serverless compute in a workspace. * - * @return the featureStoreSettings value. + * @return the serverlessComputeSettings value. */ - FeatureStoreSettings featureStoreSettings(); + ServerlessComputeSettings serverlessComputeSettings(); /** - * Gets the associatedWorkspaces property: The associatedWorkspaces property. + * Gets the serviceManagedResourcesSettings property: The service managed resource settings. * - * @return the associatedWorkspaces value. + * @return the serviceManagedResourcesSettings value. */ - List associatedWorkspaces(); + ServiceManagedResourcesSettings serviceManagedResourcesSettings(); /** - * Gets the enableDataIsolation property: The enableDataIsolation property. + * 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 enableDataIsolation value. + * @return the serviceProvisionedResourceGroup value. */ - Boolean enableDataIsolation(); + String serviceProvisionedResourceGroup(); /** - * Gets the hubResourceId property: The hubResourceId property. + * Gets the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. * - * @return the hubResourceId value. + * @return the sharedPrivateLinkResources value. */ - String hubResourceId(); + 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 systemDatastoresAuthMode property: The auth mode used for accessing the system datastores of the + * workspace. + * + * @return the systemDatastoresAuthMode value. + */ + SystemDatastoresAuthMode 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. @@ -246,6 +341,13 @@ public interface WorkspaceProperties { */ 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. * 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 index 08fc15798bd3d..691da1e9c9c43 100644 --- 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 @@ -5,11 +5,33 @@ 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 allowRoleAssignmentOnRG property: The allowRoleAssignmentOnRG property. + * + * @return the allowRoleAssignmentOnRG value. + */ + Boolean allowRoleAssignmentOnRG(); + + /** + * 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. * @@ -18,7 +40,36 @@ public interface WorkspacePropertiesUpdateParameters { String description(); /** - * Gets the friendlyName property: The friendly name for this workspace. + * Gets the enableDataIsolation property: The enableDataIsolation property. + * + * @return the enableDataIsolation value. + */ + Boolean enableDataIsolation(); + + /** + * Gets the enableSoftwareBillOfMaterials property: Flag to tell if SoftwareBillOfMaterials 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. */ @@ -32,68 +83,69 @@ public interface WorkspacePropertiesUpdateParameters { String imageBuildCompute(); /** - * Gets the serviceManagedResourcesSettings property: The service managed resource settings. + * Gets the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace. * - * @return the serviceManagedResourcesSettings value. + * @return the ipAllowlist value. */ - ServiceManagedResourcesSettings serviceManagedResourcesSettings(); + List ipAllowlist(); /** - * Gets the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. + * Gets the managedNetwork property: Managed Network settings for a machine learning workspace. * - * @return the primaryUserAssignedIdentity value. + * @return the managedNetwork value. */ - String primaryUserAssignedIdentity(); + ManagedNetworkSettings managedNetwork(); /** - * Gets the serverlessComputeSettings property: Settings for serverless compute created in the workspace. + * Gets the networkAcls property: A set of rules governing the network accessibility of the workspace. * - * @return the serverlessComputeSettings value. + * @return the networkAcls value. */ - ServerlessComputeSettings serverlessComputeSettings(); + NetworkAcls networkAcls(); /** - * Gets the publicNetworkAccess property: Whether requests from Public Network are allowed. + * Gets the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the + * workspace identity. * - * @return the publicNetworkAccess value. + * @return the primaryUserAssignedIdentity value. */ - PublicNetworkAccess publicNetworkAccess(); + String primaryUserAssignedIdentity(); /** - * Gets the applicationInsights property: ARM id of the application insights associated with this workspace. + * Gets the publicNetworkAccess property: Whether requests from Public Network are allowed. * - * @return the applicationInsights value. + * @return the publicNetworkAccess value. */ - String applicationInsights(); + PublicNetworkAccessType publicNetworkAccess(); /** - * Gets the containerRegistry property: ARM id of the container registry associated with this workspace. + * Gets the serverlessComputeSettings property: Settings for serverless compute in a workspace. * - * @return the containerRegistry value. + * @return the serverlessComputeSettings value. */ - String containerRegistry(); + ServerlessComputeSettings serverlessComputeSettings(); /** - * Gets the featureStoreSettings property: Settings for feature store type workspace. + * Gets the serviceManagedResourcesSettings property: The service managed resource settings. * - * @return the featureStoreSettings value. + * @return the serviceManagedResourcesSettings value. */ - FeatureStoreSettings featureStoreSettings(); + ServiceManagedResourcesSettings serviceManagedResourcesSettings(); /** - * Gets the managedNetwork property: Managed Network settings for a machine learning workspace. + * Gets the softDeleteRetentionInDays property: Retention time in days after workspace get soft deleted. * - * @return the managedNetwork value. + * @return the softDeleteRetentionInDays value. */ - ManagedNetworkSettings managedNetwork(); + Integer softDeleteRetentionInDays(); /** - * Gets the enableDataIsolation property: The enableDataIsolation property. + * Gets the systemDatastoresAuthMode property: The auth mode used for accessing the system datastores of the + * workspace. * - * @return the enableDataIsolation value. + * @return the systemDatastoresAuthMode value. */ - Boolean enableDataIsolation(); + SystemDatastoresAuthMode systemDatastoresAuthMode(); /** * Gets the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 @@ -103,13 +155,6 @@ public interface WorkspacePropertiesUpdateParameters { */ Boolean v1LegacyMode(); - /** - * Gets the encryption property: The encryption property. - * - * @return the encryption value. - */ - EncryptionUpdateProperties encryption(); - /** * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.WorkspacePropertiesUpdateParametersInner * object. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceUpdateParameters.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceUpdateParameters.java index ab58bf322a012..7d95e8d1823e4 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 @@ -12,6 +12,7 @@ import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsInner; import com.azure.resourcemanager.machinelearning.fluent.models.WorkspacePropertiesUpdateParametersInner; import java.io.IOException; +import java.util.List; import java.util.Map; /** @@ -20,24 +21,24 @@ @Fluent public final class WorkspaceUpdateParameters implements JsonSerializable { /* - * The resource tags for the machine learning workspace. + * Managed service identity (system assigned and/or user assigned identities) */ - private Map tags; + private ManagedServiceIdentity identity; /* - * The sku of the workspace. + * The properties that the machine learning workspace will be updated with. */ - private Sku sku; + private WorkspacePropertiesUpdateParametersInner innerProperties; /* - * The identity of the resource. + * Optional. This field is required to be implemented by the RP because AML is supporting more than one tier */ - private ManagedServiceIdentity identity; + private Sku sku; /* - * The properties that the machine learning workspace will be updated with. + * The resource tags for the machine learning workspace. */ - private WorkspacePropertiesUpdateParametersInner innerProperties; + private Map tags; /** * Creates an instance of WorkspaceUpdateParameters class. @@ -45,6 +46,57 @@ public final class WorkspaceUpdateParameters implements JsonSerializable tags) { } /** - * Get the sku property: The sku of the workspace. + * Get the allowRoleAssignmentOnRG property: The allowRoleAssignmentOnRG property. * - * @return the sku value. + * @return the allowRoleAssignmentOnRG value. */ - public Sku sku() { - return this.sku; + public Boolean allowRoleAssignmentOnRG() { + return this.innerProperties() == null ? null : this.innerProperties().allowRoleAssignmentOnRG(); } /** - * Set the sku property: The sku of the workspace. + * Set the allowRoleAssignmentOnRG property: The allowRoleAssignmentOnRG property. * - * @param sku the sku value to set. + * @param allowRoleAssignmentOnRG the allowRoleAssignmentOnRG value to set. * @return the WorkspaceUpdateParameters object itself. */ - public WorkspaceUpdateParameters withSku(Sku sku) { - this.sku = sku; + public WorkspaceUpdateParameters withAllowRoleAssignmentOnRG(Boolean allowRoleAssignmentOnRG) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withAllowRoleAssignmentOnRG(allowRoleAssignmentOnRG); return this; } /** - * Get the identity property: The identity of the resource. + * Get the applicationInsights property: ARM id of the application insights associated with this workspace. * - * @return the identity value. + * @return the applicationInsights value. */ - public ManagedServiceIdentity identity() { - return this.identity; + public String applicationInsights() { + return this.innerProperties() == null ? null : this.innerProperties().applicationInsights(); } /** - * Set the identity property: The identity of the resource. + * Set the applicationInsights property: ARM id of the application insights associated with this workspace. * - * @param identity the identity value to set. + * @param applicationInsights the applicationInsights value to set. * @return the WorkspaceUpdateParameters object itself. */ - public WorkspaceUpdateParameters withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; + public WorkspaceUpdateParameters withApplicationInsights(String applicationInsights) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withApplicationInsights(applicationInsights); return this; } /** - * Get the innerProperties property: The properties that the machine learning workspace will be updated with. + * Get the containerRegistry property: ARM id of the container registry associated with this workspace. * - * @return the innerProperties value. + * @return the containerRegistry value. */ - private WorkspacePropertiesUpdateParametersInner innerProperties() { - return this.innerProperties; + 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 WorkspaceUpdateParameters object itself. + */ + public WorkspaceUpdateParameters withContainerRegistry(String containerRegistry) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); + } + this.innerProperties().withContainerRegistry(containerRegistry); + return this; } /** @@ -138,7 +210,101 @@ public WorkspaceUpdateParameters withDescription(String description) { } /** - * Get the friendlyName property: The friendly name for this workspace. + * 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 WorkspaceUpdateParameters object itself. + */ + public WorkspaceUpdateParameters 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 SoftwareBillOfMaterials 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 SoftwareBillOfMaterials should be enabled for + * this workspace. + * + * @param enableSoftwareBillOfMaterials the enableSoftwareBillOfMaterials value to set. + * @return the WorkspaceUpdateParameters object itself. + */ + public WorkspaceUpdateParameters 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 WorkspaceUpdateParameters object itself. + */ + public WorkspaceUpdateParameters 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 WorkspaceUpdateParameters object itself. + */ + public WorkspaceUpdateParameters 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. */ @@ -147,7 +313,7 @@ public String friendlyName() { } /** - * Set the friendlyName property: The friendly name for this workspace. + * Set the friendlyName property: The friendly name for this workspace. This name in mutable. * * @param friendlyName the friendlyName value to set. * @return the WorkspaceUpdateParameters object itself. @@ -184,213 +350,215 @@ public WorkspaceUpdateParameters withImageBuildCompute(String imageBuildCompute) } /** - * Get the serviceManagedResourcesSettings property: The service managed resource settings. + * Get the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace. * - * @return the serviceManagedResourcesSettings value. + * @return the ipAllowlist value. */ - public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { - return this.innerProperties() == null ? null : this.innerProperties().serviceManagedResourcesSettings(); + public List ipAllowlist() { + return this.innerProperties() == null ? null : this.innerProperties().ipAllowlist(); } /** - * Set the serviceManagedResourcesSettings property: The service managed resource settings. + * Set the ipAllowlist property: The list of IPv4 addresses that are allowed to access the workspace. * - * @param serviceManagedResourcesSettings the serviceManagedResourcesSettings value to set. + * @param ipAllowlist the ipAllowlist value to set. * @return the WorkspaceUpdateParameters object itself. */ - public WorkspaceUpdateParameters - withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings) { + public WorkspaceUpdateParameters withIpAllowlist(List ipAllowlist) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); } - this.innerProperties().withServiceManagedResourcesSettings(serviceManagedResourcesSettings); + this.innerProperties().withIpAllowlist(ipAllowlist); return this; } /** - * Get the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. + * Get the managedNetwork property: Managed Network settings for a machine learning workspace. * - * @return the primaryUserAssignedIdentity value. + * @return the managedNetwork value. */ - public String primaryUserAssignedIdentity() { - return this.innerProperties() == null ? null : this.innerProperties().primaryUserAssignedIdentity(); + public ManagedNetworkSettingsInner managedNetwork() { + return this.innerProperties() == null ? null : this.innerProperties().managedNetwork(); } /** - * Set the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. + * Set the managedNetwork property: Managed Network settings for a machine learning workspace. * - * @param primaryUserAssignedIdentity the primaryUserAssignedIdentity value to set. + * @param managedNetwork the managedNetwork value to set. * @return the WorkspaceUpdateParameters object itself. */ - public WorkspaceUpdateParameters withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity) { + public WorkspaceUpdateParameters withManagedNetwork(ManagedNetworkSettingsInner managedNetwork) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); } - this.innerProperties().withPrimaryUserAssignedIdentity(primaryUserAssignedIdentity); + this.innerProperties().withManagedNetwork(managedNetwork); return this; } /** - * Get the serverlessComputeSettings property: Settings for serverless compute created in the workspace. + * Get the networkAcls property: A set of rules governing the network accessibility of the workspace. * - * @return the serverlessComputeSettings value. + * @return the networkAcls value. */ - public ServerlessComputeSettings serverlessComputeSettings() { - return this.innerProperties() == null ? null : this.innerProperties().serverlessComputeSettings(); + public NetworkAcls networkAcls() { + return this.innerProperties() == null ? null : this.innerProperties().networkAcls(); } /** - * Set the serverlessComputeSettings property: Settings for serverless compute created in the workspace. + * Set the networkAcls property: A set of rules governing the network accessibility of the workspace. * - * @param serverlessComputeSettings the serverlessComputeSettings value to set. + * @param networkAcls the networkAcls value to set. * @return the WorkspaceUpdateParameters object itself. */ - public WorkspaceUpdateParameters - withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings) { + public WorkspaceUpdateParameters withNetworkAcls(NetworkAcls networkAcls) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); } - this.innerProperties().withServerlessComputeSettings(serverlessComputeSettings); + this.innerProperties().withNetworkAcls(networkAcls); return this; } /** - * Get the publicNetworkAccess property: Whether requests from Public Network are allowed. + * Get the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the + * workspace identity. * - * @return the publicNetworkAccess value. + * @return the primaryUserAssignedIdentity value. */ - public PublicNetworkAccess publicNetworkAccess() { - return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); + public String primaryUserAssignedIdentity() { + return this.innerProperties() == null ? null : this.innerProperties().primaryUserAssignedIdentity(); } /** - * Set the publicNetworkAccess property: Whether requests from Public Network are allowed. + * Set the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the + * workspace identity. * - * @param publicNetworkAccess the publicNetworkAccess value to set. + * @param primaryUserAssignedIdentity the primaryUserAssignedIdentity value to set. * @return the WorkspaceUpdateParameters object itself. */ - public WorkspaceUpdateParameters withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { + public WorkspaceUpdateParameters withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); } - this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); + this.innerProperties().withPrimaryUserAssignedIdentity(primaryUserAssignedIdentity); return this; } /** - * Get the applicationInsights property: ARM id of the application insights associated with this workspace. + * Get the publicNetworkAccess property: Whether requests from Public Network are allowed. * - * @return the applicationInsights value. + * @return the publicNetworkAccess value. */ - public String applicationInsights() { - return this.innerProperties() == null ? null : this.innerProperties().applicationInsights(); + public PublicNetworkAccessType publicNetworkAccess() { + return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); } /** - * Set the applicationInsights property: ARM id of the application insights associated with this workspace. + * Set the publicNetworkAccess property: Whether requests from Public Network are allowed. * - * @param applicationInsights the applicationInsights value to set. + * @param publicNetworkAccess the publicNetworkAccess value to set. * @return the WorkspaceUpdateParameters object itself. */ - public WorkspaceUpdateParameters withApplicationInsights(String applicationInsights) { + public WorkspaceUpdateParameters withPublicNetworkAccess(PublicNetworkAccessType publicNetworkAccess) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); } - this.innerProperties().withApplicationInsights(applicationInsights); + this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); return this; } /** - * Get the containerRegistry property: ARM id of the container registry associated with this workspace. + * Get the serverlessComputeSettings property: Settings for serverless compute in a workspace. * - * @return the containerRegistry value. + * @return the serverlessComputeSettings value. */ - public String containerRegistry() { - return this.innerProperties() == null ? null : this.innerProperties().containerRegistry(); + public ServerlessComputeSettings serverlessComputeSettings() { + return this.innerProperties() == null ? null : this.innerProperties().serverlessComputeSettings(); } /** - * Set the containerRegistry property: ARM id of the container registry associated with this workspace. + * Set the serverlessComputeSettings property: Settings for serverless compute in a workspace. * - * @param containerRegistry the containerRegistry value to set. + * @param serverlessComputeSettings the serverlessComputeSettings value to set. * @return the WorkspaceUpdateParameters object itself. */ - public WorkspaceUpdateParameters withContainerRegistry(String containerRegistry) { + public WorkspaceUpdateParameters + withServerlessComputeSettings(ServerlessComputeSettings serverlessComputeSettings) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); } - this.innerProperties().withContainerRegistry(containerRegistry); + this.innerProperties().withServerlessComputeSettings(serverlessComputeSettings); return this; } /** - * Get the featureStoreSettings property: Settings for feature store type workspace. + * Get the serviceManagedResourcesSettings property: The service managed resource settings. * - * @return the featureStoreSettings value. + * @return the serviceManagedResourcesSettings value. */ - public FeatureStoreSettings featureStoreSettings() { - return this.innerProperties() == null ? null : this.innerProperties().featureStoreSettings(); + public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { + return this.innerProperties() == null ? null : this.innerProperties().serviceManagedResourcesSettings(); } /** - * Set the featureStoreSettings property: Settings for feature store type workspace. + * Set the serviceManagedResourcesSettings property: The service managed resource settings. * - * @param featureStoreSettings the featureStoreSettings value to set. + * @param serviceManagedResourcesSettings the serviceManagedResourcesSettings value to set. * @return the WorkspaceUpdateParameters object itself. */ - public WorkspaceUpdateParameters withFeatureStoreSettings(FeatureStoreSettings featureStoreSettings) { + public WorkspaceUpdateParameters + withServiceManagedResourcesSettings(ServiceManagedResourcesSettings serviceManagedResourcesSettings) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); } - this.innerProperties().withFeatureStoreSettings(featureStoreSettings); + this.innerProperties().withServiceManagedResourcesSettings(serviceManagedResourcesSettings); return this; } /** - * Get the managedNetwork property: Managed Network settings for a machine learning workspace. + * Get the softDeleteRetentionInDays property: Retention time in days after workspace get soft deleted. * - * @return the managedNetwork value. + * @return the softDeleteRetentionInDays value. */ - public ManagedNetworkSettingsInner managedNetwork() { - return this.innerProperties() == null ? null : this.innerProperties().managedNetwork(); + public Integer softDeleteRetentionInDays() { + return this.innerProperties() == null ? null : this.innerProperties().softDeleteRetentionInDays(); } /** - * Set the managedNetwork property: Managed Network settings for a machine learning workspace. + * Set the softDeleteRetentionInDays property: Retention time in days after workspace get soft deleted. * - * @param managedNetwork the managedNetwork value to set. + * @param softDeleteRetentionInDays the softDeleteRetentionInDays value to set. * @return the WorkspaceUpdateParameters object itself. */ - public WorkspaceUpdateParameters withManagedNetwork(ManagedNetworkSettingsInner managedNetwork) { + public WorkspaceUpdateParameters withSoftDeleteRetentionInDays(Integer softDeleteRetentionInDays) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); } - this.innerProperties().withManagedNetwork(managedNetwork); + this.innerProperties().withSoftDeleteRetentionInDays(softDeleteRetentionInDays); return this; } /** - * Get the enableDataIsolation property: The enableDataIsolation property. + * Get the systemDatastoresAuthMode property: The auth mode used for accessing the system datastores of the + * workspace. * - * @return the enableDataIsolation value. + * @return the systemDatastoresAuthMode value. */ - public Boolean enableDataIsolation() { - return this.innerProperties() == null ? null : this.innerProperties().enableDataIsolation(); + public SystemDatastoresAuthMode systemDatastoresAuthMode() { + return this.innerProperties() == null ? null : this.innerProperties().systemDatastoresAuthMode(); } /** - * Set the enableDataIsolation property: The enableDataIsolation property. + * Set the systemDatastoresAuthMode property: The auth mode used for accessing the system datastores of the + * workspace. * - * @param enableDataIsolation the enableDataIsolation value to set. + * @param systemDatastoresAuthMode the systemDatastoresAuthMode value to set. * @return the WorkspaceUpdateParameters object itself. */ - public WorkspaceUpdateParameters withEnableDataIsolation(Boolean enableDataIsolation) { + public WorkspaceUpdateParameters withSystemDatastoresAuthMode(SystemDatastoresAuthMode systemDatastoresAuthMode) { if (this.innerProperties() == null) { this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); } - this.innerProperties().withEnableDataIsolation(enableDataIsolation); + this.innerProperties().withSystemDatastoresAuthMode(systemDatastoresAuthMode); return this; } @@ -419,44 +587,21 @@ public WorkspaceUpdateParameters withV1LegacyMode(Boolean v1LegacyMode) { 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 WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters withEncryption(EncryptionUpdateProperties encryption) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesUpdateParametersInner(); - } - this.innerProperties().withEncryption(encryption); - return this; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (sku() != null) { - sku().validate(); - } if (identity() != null) { identity().validate(); } if (innerProperties() != null) { innerProperties().validate(); } + if (sku() != null) { + sku().validate(); + } } /** @@ -465,10 +610,10 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("sku", this.sku); jsonWriter.writeJsonField("identity", this.identity); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("sku", this.sku); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -487,16 +632,16 @@ public static WorkspaceUpdateParameters fromJson(JsonReader jsonReader) throws I String fieldName = reader.getFieldName(); reader.nextToken(); - if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedWorkspaceUpdateParameters.tags = tags; - } else if ("sku".equals(fieldName)) { - deserializedWorkspaceUpdateParameters.sku = Sku.fromJson(reader); - } else if ("identity".equals(fieldName)) { + if ("identity".equals(fieldName)) { deserializedWorkspaceUpdateParameters.identity = ManagedServiceIdentity.fromJson(reader); } else if ("properties".equals(fieldName)) { deserializedWorkspaceUpdateParameters.innerProperties = WorkspacePropertiesUpdateParametersInner.fromJson(reader); + } else if ("sku".equals(fieldName)) { + deserializedWorkspaceUpdateParameters.sku = Sku.fromJson(reader); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedWorkspaceUpdateParameters.tags = tags; } else { reader.skipChildren(); } 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 f80403ae6d760..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 @@ -13,35 +13,64 @@ */ public interface Workspaces { /** - * Gets the properties of the specified machine learning workspace. + * Lists all the available machine learning workspaces under the specified subscription. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning 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. + * @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. @@ -52,7 +81,7 @@ public interface Workspaces { * 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. @@ -62,36 +91,35 @@ public interface Workspaces { 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. @@ -103,23 +131,23 @@ 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. @@ -134,7 +162,7 @@ Response listKeysWithResponse(String resourceGroupName, * 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. @@ -143,181 +171,158 @@ Response listKeysWithResponse(String resourceGroupName, 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. + * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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. - * - * @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. + * Get Azure Machine Learning Workspace notebook access token. * - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. + * @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, + 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. 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 index 9b9cea98e6ae0..6be2505e05e1b 100644 --- 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 @@ -1 +1 @@ -[["com.azure.resourcemanager.machinelearning.implementation.BatchDeploymentsClientImpl$BatchDeploymentsService"],["com.azure.resourcemanager.machinelearning.implementation.BatchEndpointsClientImpl$BatchEndpointsService"],["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.ComputesClientImpl$ComputesService"],["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.FeaturesClientImpl$FeaturesService"],["com.azure.resourcemanager.machinelearning.implementation.FeaturesetContainersClientImpl$FeaturesetContainersService"],["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.JobsClientImpl$JobsService"],["com.azure.resourcemanager.machinelearning.implementation.ManagedNetworkProvisionsClientImpl$ManagedNetworkProvisionsService"],["com.azure.resourcemanager.machinelearning.implementation.ManagedNetworkSettingsRulesClientImpl$ManagedNetworkSettingsRulesService"],["com.azure.resourcemanager.machinelearning.implementation.MarketplaceSubscriptionsClientImpl$MarketplaceSubscriptionsService"],["com.azure.resourcemanager.machinelearning.implementation.ModelContainersClientImpl$ModelContainersService"],["com.azure.resourcemanager.machinelearning.implementation.ModelVersionsClientImpl$ModelVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.OnlineDeploymentsClientImpl$OnlineDeploymentsService"],["com.azure.resourcemanager.machinelearning.implementation.OnlineEndpointsClientImpl$OnlineEndpointsService"],["com.azure.resourcemanager.machinelearning.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.machinelearning.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.machinelearning.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"],["com.azure.resourcemanager.machinelearning.implementation.QuotasClientImpl$QuotasService"],["com.azure.resourcemanager.machinelearning.implementation.RegistriesClientImpl$RegistriesService"],["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.RegistryDataReferencesClientImpl$RegistryDataReferencesService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryDataVersionsClientImpl$RegistryDataVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryEnvironmentContainersClientImpl$RegistryEnvironmentContainersService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryEnvironmentVersionsClientImpl$RegistryEnvironmentVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryModelContainersClientImpl$RegistryModelContainersService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryModelVersionsClientImpl$RegistryModelVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.SchedulesClientImpl$SchedulesService"],["com.azure.resourcemanager.machinelearning.implementation.ServerlessEndpointsClientImpl$ServerlessEndpointsService"],["com.azure.resourcemanager.machinelearning.implementation.UsagesClientImpl$UsagesService"],["com.azure.resourcemanager.machinelearning.implementation.VirtualMachineSizesClientImpl$VirtualMachineSizesService"],["com.azure.resourcemanager.machinelearning.implementation.WorkspaceConnectionsClientImpl$WorkspaceConnectionsService"],["com.azure.resourcemanager.machinelearning.implementation.WorkspaceFeaturesClientImpl$WorkspaceFeaturesService"],["com.azure.resourcemanager.machinelearning.implementation.WorkspacesClientImpl$WorkspacesService"]] \ No newline at end of file +[["com.azure.resourcemanager.machinelearning.implementation.BatchDeploymentsClientImpl$BatchDeploymentsService"],["com.azure.resourcemanager.machinelearning.implementation.BatchEndpointsClientImpl$BatchEndpointsService"],["com.azure.resourcemanager.machinelearning.implementation.CapabilityHostsClientImpl$CapabilityHostsService"],["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.ComputesClientImpl$ComputesService"],["com.azure.resourcemanager.machinelearning.implementation.ConnectionRaiBlocklistItemsClientImpl$ConnectionRaiBlocklistItemsService"],["com.azure.resourcemanager.machinelearning.implementation.ConnectionRaiBlocklistItemsOperationsClientImpl$ConnectionRaiBlocklistItemsOperationsService"],["com.azure.resourcemanager.machinelearning.implementation.ConnectionRaiBlocklistOperationsClientImpl$ConnectionRaiBlocklistOperationsService"],["com.azure.resourcemanager.machinelearning.implementation.ConnectionRaiBlocklistsClientImpl$ConnectionRaiBlocklistsService"],["com.azure.resourcemanager.machinelearning.implementation.ConnectionRaiPoliciesClientImpl$ConnectionRaiPoliciesService"],["com.azure.resourcemanager.machinelearning.implementation.ConnectionRaiPolicyOperationsClientImpl$ConnectionRaiPolicyOperationsService"],["com.azure.resourcemanager.machinelearning.implementation.ConnectionsClientImpl$ConnectionsService"],["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.EndpointDeploymentsClientImpl$EndpointDeploymentsService"],["com.azure.resourcemanager.machinelearning.implementation.EndpointsClientImpl$EndpointsService"],["com.azure.resourcemanager.machinelearning.implementation.EnvironmentContainersClientImpl$EnvironmentContainersService"],["com.azure.resourcemanager.machinelearning.implementation.EnvironmentVersionsClientImpl$EnvironmentVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.FeaturesClientImpl$FeaturesService"],["com.azure.resourcemanager.machinelearning.implementation.FeaturesetContainersClientImpl$FeaturesetContainersService"],["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.InferenceEndpointsClientImpl$InferenceEndpointsService"],["com.azure.resourcemanager.machinelearning.implementation.InferenceGroupsClientImpl$InferenceGroupsService"],["com.azure.resourcemanager.machinelearning.implementation.InferencePoolsClientImpl$InferencePoolsService"],["com.azure.resourcemanager.machinelearning.implementation.JobsClientImpl$JobsService"],["com.azure.resourcemanager.machinelearning.implementation.ManagedNetworkProvisionsClientImpl$ManagedNetworkProvisionsService"],["com.azure.resourcemanager.machinelearning.implementation.ManagedNetworkSettingsRulesClientImpl$ManagedNetworkSettingsRulesService"],["com.azure.resourcemanager.machinelearning.implementation.MarketplaceSubscriptionsClientImpl$MarketplaceSubscriptionsService"],["com.azure.resourcemanager.machinelearning.implementation.ModelContainersClientImpl$ModelContainersService"],["com.azure.resourcemanager.machinelearning.implementation.ModelVersionsClientImpl$ModelVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.OnlineDeploymentsClientImpl$OnlineDeploymentsService"],["com.azure.resourcemanager.machinelearning.implementation.OnlineEndpointsClientImpl$OnlineEndpointsService"],["com.azure.resourcemanager.machinelearning.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.machinelearning.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.machinelearning.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"],["com.azure.resourcemanager.machinelearning.implementation.PtuQuotasClientImpl$PtuQuotasService"],["com.azure.resourcemanager.machinelearning.implementation.QuotasClientImpl$QuotasService"],["com.azure.resourcemanager.machinelearning.implementation.RaiPoliciesClientImpl$RaiPoliciesService"],["com.azure.resourcemanager.machinelearning.implementation.RaiPolicyOperationsClientImpl$RaiPolicyOperationsService"],["com.azure.resourcemanager.machinelearning.implementation.RegistriesClientImpl$RegistriesService"],["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.RegistryDataReferencesClientImpl$RegistryDataReferencesService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryDataVersionsClientImpl$RegistryDataVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryEnvironmentContainersClientImpl$RegistryEnvironmentContainersService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryEnvironmentVersionsClientImpl$RegistryEnvironmentVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryModelContainersClientImpl$RegistryModelContainersService"],["com.azure.resourcemanager.machinelearning.implementation.RegistryModelVersionsClientImpl$RegistryModelVersionsService"],["com.azure.resourcemanager.machinelearning.implementation.SchedulesClientImpl$SchedulesService"],["com.azure.resourcemanager.machinelearning.implementation.ServerlessEndpointsClientImpl$ServerlessEndpointsService"],["com.azure.resourcemanager.machinelearning.implementation.UsagesClientImpl$UsagesService"],["com.azure.resourcemanager.machinelearning.implementation.VirtualMachineSizesClientImpl$VirtualMachineSizesService"],["com.azure.resourcemanager.machinelearning.implementation.WorkspaceConnectionsClientImpl$WorkspaceConnectionsService"],["com.azure.resourcemanager.machinelearning.implementation.WorkspaceFeaturesClientImpl$WorkspaceFeaturesService"],["com.azure.resourcemanager.machinelearning.implementation.WorkspacesClientImpl$WorkspacesService"]] \ 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 5fb9abdf6b822..207e60601a808 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 @@ -29,8 +29,8 @@ public final class BatchDeploymentsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchDeployment/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/BatchDeployment/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Batch Deployment. @@ -43,19 +43,19 @@ public static void createOrUpdateWorkspaceBatchDeployment( .define("testDeploymentName") .withRegion("string") .withExistingBatchEndpoint("test-rg", "my-aml-workspace", "testEndpointName") - .withProperties(new BatchDeploymentProperties().withDescription("string") - .withProperties(mapOf("string", "string")) + .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) - .withRetrySettings(new BatchRetrySettings().withMaxRetries(1).withTimeout(Duration.parse("PT5M"))) - .withMiniBatchSize(1L) .withLoggingLevel(BatchLoggingLevel.INFO) - .withModel(new IdAssetReference().withAssetId("string")) .withMaxConcurrencyPerInstance(1) + .withMiniBatchSize(1L) + .withModel(new IdAssetReference().withAssetId("string")) .withOutputAction(BatchOutputAction.SUMMARY_ONLY) .withOutputFileName("string") .withResources(new DeploymentResourceConfiguration().withInstanceCount(1) @@ -63,11 +63,12 @@ public static void createOrUpdateWorkspaceBatchDeployment( .withProperties(mapOf("string", SerializerFactory.createDefaultManagementSerializerAdapter() .deserialize("{\"cd3c37dc-2876-4ca4-8a54-21bd7619724a\":null}", Object.class, - SerializerEncoding.JSON))))) + SerializerEncoding.JSON)))) + .withRetrySettings(new BatchRetrySettings().withMaxRetries(1).withTimeout(Duration.parse("PT5M")))) .withTags(mapOf()) - .withKind("string") .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") .withSku(new Sku().withName("string") .withTier(SkuTier.FREE) .withSize("string") 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 06c92f473d553..541255f2505a2 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 @@ -10,8 +10,8 @@ public final class BatchDeploymentsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchDeployment/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/BatchDeployment/delete.json */ /** * Sample code: Delete Workspace Batch Deployment. 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 c7444157d51af..56493567761e6 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 @@ -10,8 +10,8 @@ public final class BatchDeploymentsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchDeployment/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/BatchDeployment/get.json */ /** * Sample code: Get Workspace Batch Deployment. 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 f3574ad675fd6..8e697614f230b 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 @@ -10,8 +10,8 @@ public final class BatchDeploymentsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchDeployment/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/BatchDeployment/list.json */ /** * Sample code: List Workspace Batch Deployment. 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 6eae68c897350..11b24a690081a 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 @@ -15,8 +15,8 @@ public final class BatchDeploymentsUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchDeployment/update.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/BatchDeployment/update.json */ /** * Sample code: Update Workspace Batch Deployment. 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 c4a73d58e4304..7a0118c49586f 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 @@ -21,8 +21,8 @@ public final class BatchEndpointsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchEndpoint/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/BatchEndpoint/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Batch Endpoint. @@ -35,14 +35,14 @@ public final class BatchEndpointsCreateOrUpdateSamples { .define("testEndpointName") .withRegion("string") .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties(new BatchEndpointProperties().withDescription("string") + .withProperties(new BatchEndpointProperties().withAuthMode(EndpointAuthMode.AMLTOKEN) + .withDescription("string") .withProperties(mapOf("string", "string")) - .withAuthMode(EndpointAuthMode.AMLTOKEN) .withDefaults(new BatchEndpointDefaults().withDeploymentName("string"))) .withTags(mapOf()) - .withKind("string") .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") .withSku(new Sku().withName("string") .withTier(SkuTier.FREE) .withSize("string") 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 8503ee1bbc3da..9d8470cb43cdf 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 @@ -10,8 +10,8 @@ public final class BatchEndpointsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchEndpoint/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/BatchEndpoint/delete.json */ /** * Sample code: Delete Workspace Batch Endpoint. 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 60c40b8680329..68dccdd19b1ce 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 @@ -10,8 +10,8 @@ public final class BatchEndpointsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchEndpoint/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/BatchEndpoint/get.json */ /** * Sample code: Get Workspace Batch Endpoint. 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 989994a986614..bacf42c3dd746 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 @@ -10,8 +10,8 @@ public final class BatchEndpointsListKeysSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchEndpoint/listKeys.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/BatchEndpoint/listKeys.json */ /** * Sample code: ListKeys Workspace Batch Endpoint. 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 73cf262f6eb2c..0698e7c3033dd 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 @@ -10,8 +10,8 @@ public final class BatchEndpointsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchEndpoint/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/BatchEndpoint/list.json */ /** * Sample code: List Workspace Batch Endpoint. 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 eab2df210e2cb..8a24fe3415342 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 @@ -19,8 +19,8 @@ public final class BatchEndpointsUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/BatchEndpoint/update.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/BatchEndpoint/update.json */ /** * Sample code: Update Workspace Batch Endpoint. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostsCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..9c3f1ca84e302 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostsCreateOrUpdateSamples.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.CapabilityHostProperties; + +/** + * Samples for CapabilityHosts CreateOrUpdate. + */ +public final class CapabilityHostsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/CapabilityHost/createOrUpdate.json + */ + /** + * Sample code: CreateOrUpdate CapabilityHost. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + createOrUpdateCapabilityHost(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.capabilityHosts() + .define("capabilityHostName") + .withExistingWorkspace("test-rg", "my-aml-workspace") + .withProperties(new CapabilityHostProperties().withCustomerSubnet( + "subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/myResourceGroups/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/mySubnet")) + .create(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostsDeleteSamples.java new file mode 100644 index 0000000000000..2364d5446641f --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostsDeleteSamples.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 CapabilityHosts Delete. + */ +public final class CapabilityHostsDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/CapabilityHost/delete.json + */ + /** + * Sample code: Delete CapabilityHost. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteCapabilityHost(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.capabilityHosts() + .delete("test-rg", "my-aml-workspace", "capabilityHostName", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostsGetSamples.java new file mode 100644 index 0000000000000..326ab119b008c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CapabilityHostsGetSamples.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 CapabilityHosts Get. + */ +public final class CapabilityHostsGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/CapabilityHost/get.json + */ + /** + * Sample code: Get CapabilityHost. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getCapabilityHost(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.capabilityHosts() + .getWithResponse("test-rg", "my-aml-workspace", "capabilityHostName", com.azure.core.util.Context.NONE); + } +} 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 bae0160986866..07c2c8a125bea 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 @@ -14,8 +14,8 @@ public final class CodeContainersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeContainer/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/CodeContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Code Container. 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 b5e12705aa1d0..6f2bfadd8f1b5 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 @@ -10,8 +10,8 @@ public final class CodeContainersDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeContainer/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/CodeContainer/delete.json */ /** * Sample code: Delete Workspace Code Container. 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 201e703033169..3a198e81a138a 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 @@ -10,8 +10,8 @@ public final class CodeContainersGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeContainer/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/CodeContainer/get.json */ /** * Sample code: Get Workspace Code Container. 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 7d6cbc2ab7291..6a2bccbe18c7a 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 @@ -10,8 +10,8 @@ public final class CodeContainersListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeContainer/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/CodeContainer/list.json */ /** * Sample code: List Workspace Code Container. 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 index a27755b886182..56f2be0069222 100644 --- 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 @@ -13,8 +13,8 @@ public final class CodeVersionsCreateOrGetStartPendingUploadSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeVersion/createOrGetStartPendingUpload.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/CodeVersion/createOrGetStartPendingUpload.json */ /** * Sample code: CreateOrGetStartPendingUpload Workspace Code Version. 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 6d789a13b24b1..bd5d6c5899839 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 @@ -14,8 +14,8 @@ public final class CodeVersionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeVersion/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/CodeVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Code Version. @@ -28,8 +28,8 @@ public final class CodeVersionsCreateOrUpdateSamples { .define("string") .withExistingCode("test-rg", "my-aml-workspace", "string") .withProperties(new CodeVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) .withCodeUri("fakeTokenPlaceholder")) .create(); 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 9a59e05bc3233..093c793bb01db 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 @@ -10,8 +10,8 @@ public final class CodeVersionsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeVersion/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/CodeVersion/delete.json */ /** * Sample code: Delete Workspace Code Version. 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 ccf5e5db61c46..242e3bcfdba39 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 @@ -10,8 +10,8 @@ public final class CodeVersionsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeVersion/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/CodeVersion/get.json */ /** * Sample code: Get Workspace Code Version. 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 50c9ac2415fba..e8551e42c52ec 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 @@ -10,8 +10,8 @@ public final class CodeVersionsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeVersion/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/CodeVersion/list.json */ /** * Sample code: List Workspace Code Version. 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 index 4a584602e6e8e..6fa34bec43e83 100644 --- 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 @@ -12,8 +12,8 @@ public final class CodeVersionsPublishSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/CodeVersion/publish.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/CodeVersion/publish.json */ /** * Sample code: Publish Workspace Code Version. @@ -24,9 +24,9 @@ public final class CodeVersionsPublishSamples { publishWorkspaceCodeVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.codeVersions() .publish("test-rg", "my-aml-workspace", "string", "string", - new DestinationAsset().withRegistryName("string") - .withDestinationName("string") - .withDestinationVersion("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 5353abcb80db3..71c0f59f69e97 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 @@ -14,8 +14,8 @@ public final class ComponentContainersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentContainer/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ComponentContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Component Container. @@ -28,8 +28,8 @@ public static void createOrUpdateWorkspaceComponentContainer( .define("string") .withExistingWorkspace("test-rg", "my-aml-workspace") .withProperties(new ComponentContainerProperties().withDescription("string") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string"))) + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string"))) .create(); } 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 f233a499cc6cf..9693f0347cfc2 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 @@ -10,8 +10,8 @@ public final class ComponentContainersDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentContainer/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ComponentContainer/delete.json */ /** * Sample code: Delete Workspace Component Container. 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 52b21f5d04df5..7799cd4d15f84 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 @@ -10,8 +10,8 @@ public final class ComponentContainersGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentContainer/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ComponentContainer/get.json */ /** * Sample code: Get Workspace Component Container. 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 b899b529d4628..219e127274af5 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 @@ -10,8 +10,8 @@ public final class ComponentContainersListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentContainer/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ComponentContainer/list.json */ /** * Sample code: List Workspace Component Container. 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 07a972a658f46..62915793e7c75 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 @@ -17,8 +17,8 @@ public final class ComponentVersionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentVersion/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ComponentVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Component Version. @@ -31,8 +31,8 @@ public static void createOrUpdateWorkspaceComponentVersion( .define("string") .withExistingComponent("test-rg", "my-aml-workspace", "string") .withProperties(new ComponentVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) .withComponentSpec(SerializerFactory.createDefaultManagementSerializerAdapter() .deserialize("{\"8ced901b-d826-477d-bfef-329da9672513\":null}", Object.class, 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 67fe02db7ccb1..4317c727de571 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 @@ -10,8 +10,8 @@ public final class ComponentVersionsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentVersion/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ComponentVersion/delete.json */ /** * Sample code: Delete Workspace Component Version. 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 c836b72d4a0f2..e34eb4db96e47 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 @@ -10,8 +10,8 @@ public final class ComponentVersionsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentVersion/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ComponentVersion/get.json */ /** * Sample code: Get Workspace Component Version. 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 907bfd41d4b46..f3af8ba685e1c 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 @@ -10,8 +10,8 @@ public final class ComponentVersionsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentVersion/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ComponentVersion/list.json */ /** * Sample code: List Workspace Component Version. 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 index 671c520395c43..e4cfbbc73166e 100644 --- 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 @@ -12,8 +12,8 @@ public final class ComponentVersionsPublishSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ComponentVersion/publish.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ComponentVersion/publish.json */ /** * Sample code: Publish Workspace Component Version. @@ -24,9 +24,9 @@ public final class ComponentVersionsPublishSamples { publishWorkspaceComponentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.componentVersions() .publish("test-rg", "my-aml-workspace", "string", "string", - new DestinationAsset().withRegistryName("string") - .withDestinationName("string") - .withDestinationVersion("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 ade306d1c991b..fc25076f3dd52 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,6 +12,7 @@ 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; @@ -29,8 +30,10 @@ 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; @@ -54,8 +57,8 @@ public final class ComputeCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/BasicAKSCompute.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/createOrUpdate/BasicAKSCompute.json */ /** * Sample code: Create an AKS Compute. @@ -73,8 +76,8 @@ public static void createAnAKSCompute(com.azure.resourcemanager.machinelearning. /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/AKSCompute.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/createOrUpdate/AKSCompute.json */ /** * Sample code: Update an AKS Compute. @@ -95,8 +98,8 @@ public static void updateAnAKSCompute(com.azure.resourcemanager.machinelearning. /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/KubernetesCompute.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/createOrUpdate/KubernetesCompute.json */ /** * Sample code: Attach a Kubernetes Compute. @@ -123,8 +126,8 @@ public static void updateAnAKSCompute(com.azure.resourcemanager.machinelearning. /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/ComputeInstanceWithSchedules.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/createOrUpdate/ComputeInstanceWithSchedules.json */ /** * Sample code: Create an ComputeInstance Compute with Schedules. @@ -157,8 +160,8 @@ public static void createAnComputeInstanceComputeWithSchedules( /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/BasicAmlCompute.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/createOrUpdate/BasicAmlCompute.json */ /** * Sample code: Create a AML Compute. @@ -186,8 +189,8 @@ public static void createAAMLCompute(com.azure.resourcemanager.machinelearning.M /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/ComputeInstance.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/createOrUpdate/ComputeInstance.json */ /** * Sample code: Create an ComputeInstance Compute. @@ -204,26 +207,35 @@ public static void createAAMLCompute(com.azure.resourcemanager.machinelearning.M 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") + .withCustomServices(Arrays.asList(new CustomService().withName("rstudio-workbench") .withImage(new Image().withType(ImageType.DOCKER) - .withReference("ghcr.io/azure/rocker-rstudio-ml-verse:latest") + .withReference("ghcr.io/azure/rstudio-workbench:latest") .withAdditionalProperties(mapOf())) - .withEnvironmentVariables(mapOf("test_variable", + .withEnvironmentVariables(mapOf("RSP_LICENSE", new EnvironmentVariable().withType(EnvironmentVariableType.LOCAL) - .withValue("test_value") + .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(8787))) + .withPublished(4444))) .withVolumes(Arrays.asList(new VolumeDefinition().withType(VolumeDefinitionType.BIND) - .withReadOnly(false) - .withSource("/home/azureuser/cloudfiles") - .withTarget("/home/azureuser/cloudfiles"))) + .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"))))) @@ -232,8 +244,8 @@ public static void createAAMLCompute(com.azure.resourcemanager.machinelearning.M /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/ComputeInstanceMinimal.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/createOrUpdate/ComputeInstanceMinimal.json */ /** * Sample code: Create an ComputeInstance Compute with minimal inputs. @@ -253,8 +265,8 @@ public static void createAnComputeInstanceComputeWithMinimalInputs( /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/AmlCompute.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/createOrUpdate/AmlCompute.json */ /** * Sample code: Update a AML Compute. @@ -275,8 +287,8 @@ public static void updateAAMLCompute(com.azure.resourcemanager.machinelearning.M /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/createOrUpdate/BasicDataFactoryCompute.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/createOrUpdate/BasicDataFactoryCompute.json */ /** * Sample code: Create a DataFactory Compute. 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 3f79c372a3493..c6392d3870ff1 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 @@ -12,8 +12,8 @@ public final class ComputeDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/delete.json */ /** * Sample code: Delete Compute. 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..8b8b16f8a8eef --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeGetAllowedResizeSizesSamples.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 Compute GetAllowedResizeSizes. + */ +public final class ComputeGetAllowedResizeSizesSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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 e5faf9f2527b5..e87e91f1ed8ea 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 @@ -10,8 +10,8 @@ public final class ComputeGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/get/AKSCompute.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/get/AKSCompute.json */ /** * Sample code: Get a AKS Compute. @@ -25,8 +25,8 @@ public static void getAAKSCompute(com.azure.resourcemanager.machinelearning.Mach /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/get/KubernetesCompute.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/get/KubernetesCompute.json */ /** * Sample code: Get a Kubernetes Compute. @@ -40,8 +40,8 @@ public static void getAKubernetesCompute(com.azure.resourcemanager.machinelearni /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/get/ComputeInstance.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/get/ComputeInstance.json */ /** * Sample code: Get an ComputeInstance. @@ -55,8 +55,8 @@ public static void getAnComputeInstance(com.azure.resourcemanager.machinelearnin /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/get/AmlCompute.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/get/AmlCompute.json */ /** * Sample code: Get a AML Compute. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListKeysSamples.java index d0fb89edfa076..0f297cd4bd0eb 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 @@ -10,8 +10,8 @@ public final class ComputeListKeysSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/listKeys.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/listKeys.json */ /** * Sample code: List AKS Compute Keys. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListNodesSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListNodesSamples.java index ec498b55c38cf..80421f7f704c1 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 @@ -10,8 +10,8 @@ public final class ComputeListNodesSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/listNodes.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/listNodes.json */ /** * Sample code: Get compute nodes information for a compute. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListSamples.java index ed57fd9e99498..0b1472dfac88c 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 @@ -10,8 +10,8 @@ public final class ComputeListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/list.json */ /** * Sample code: Get Computes. 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..34b5079806f27 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeResizeSamples.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.ResizeSchema; + +/** + * Samples for Compute Resize. + */ +public final class ComputeResizeSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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 c6b4e49c34110..d4aa06d4fdf01 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 @@ -10,8 +10,8 @@ public final class ComputeRestartSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/restart.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/restart.json */ /** * Sample code: Restart ComputeInstance Compute. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeStartSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeStartSamples.java index 583d315d644ae..7eb59579e8d94 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 @@ -10,8 +10,8 @@ public final class ComputeStartSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/start.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/start.json */ /** * Sample code: Start ComputeInstance Compute. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeStopSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeStopSamples.java index 7731bc4a61e87..2a2d7cad2871f 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 @@ -10,8 +10,8 @@ public final class ComputeStopSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/stop.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/stop.json */ /** * Sample code: Stop ComputeInstance Compute. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateCustomServicesSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateCustomServicesSamples.java new file mode 100644 index 0000000000000..d9dc17ba38c30 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateCustomServicesSamples.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.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/2025-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..b60e1f162fc45 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateDataMountsSamples.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.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/2025-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..c0a044a04cbab --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateIdleShutdownSettingSamples.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.IdleShutdownSetting; + +/** + * Samples for Compute UpdateIdleShutdownSetting. + */ +public final class ComputeUpdateIdleShutdownSettingSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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 a21805726381c..0b6849ae1bc4d 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 @@ -15,8 +15,8 @@ public final class ComputeUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Compute/patch.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Compute/patch.json */ /** * Sample code: Update a AmlCompute Compute. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionCreateOrUpdateDeploymentSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionCreateOrUpdateDeploymentSamples.java new file mode 100644 index 0000000000000..ba3014bf98a9b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionCreateOrUpdateDeploymentSamples.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.DeploymentModelVersionUpgradeOption; +import com.azure.resourcemanager.machinelearning.models.EndpointDeploymentModel; +import com.azure.resourcemanager.machinelearning.models.OpenAIEndpointDeploymentResourceProperties; + +/** + * Samples for Connection CreateOrUpdateDeployment. + */ +public final class ConnectionCreateOrUpdateDeploymentSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/createDeployment.json + */ + /** + * Sample code: Create Azure OpenAI Connection Deployment. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createAzureOpenAIConnectionDeployment( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connections() + .define("text-davinci-003") + .withExistingConnection("resourceGroup-1", "testworkspace", "testConnection") + .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/ConnectionDeleteDeploymentSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionDeleteDeploymentSamples.java new file mode 100644 index 0000000000000..8f15617e8921d --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionDeleteDeploymentSamples.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; + +/** + * Samples for Connection DeleteDeployment. + */ +public final class ConnectionDeleteDeploymentSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/deleteDeployment.json + */ + /** + * Sample code: Delete Azure OpenAI Connection Deployment. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteAzureOpenAIConnectionDeployment( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connections() + .deleteDeployment("test-rg", "aml-workspace-name", "testConnection", "testDeploymentName", null, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionGetAllModelsSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionGetAllModelsSamples.java new file mode 100644 index 0000000000000..ebcd5b3814425 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionGetAllModelsSamples.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 Connection GetAllModels. + */ +public final class ConnectionGetAllModelsSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/listConnectionModels.json + */ + /** + * Sample code: Get models under the Azure ML workspace for all Azure OpenAI connections that the user can deploy. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getModelsUnderTheAzureMLWorkspaceForAllAzureOpenAIConnectionsThatTheUserCanDeploy( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connections() + .getAllModelsWithResponse("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/ConnectionGetDeploymentSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionGetDeploymentSamples.java new file mode 100644 index 0000000000000..ff1380ed5111b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionGetDeploymentSamples.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; + +/** + * Samples for Connection GetDeployment. + */ +public final class ConnectionGetDeploymentSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/getDeployment.json + */ + /** + * Sample code: Get Azure OpenAI Connection Deployment. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + getAzureOpenAIConnectionDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connections() + .getDeploymentWithResponse("resourceGroup-1", "testworkspace", "testConnection", "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/ConnectionGetModelsSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionGetModelsSamples.java new file mode 100644 index 0000000000000..c9b0027a213c6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionGetModelsSamples.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 Connection GetModels. + */ +public final class ConnectionGetModelsSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/getModels.json + */ + /** + * Sample code: Get Azure OpenAI Connection Models. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + getAzureOpenAIConnectionModels(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connections() + .getModels("test-rg", "aml-workspace-name", "testConnection", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionListDeploymentsSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionListDeploymentsSamples.java new file mode 100644 index 0000000000000..f2c76f049097b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionListDeploymentsSamples.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; + +/** + * Samples for Connection ListDeployments. + */ +public final class ConnectionListDeploymentsSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/listDeployments.json + */ + /** + * Sample code: List Azure OpenAI Connection Deployments. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + listAzureOpenAIConnectionDeployments(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connections() + .listDeployments("resourceGroup-1", "testworkspace", "testConnection", null, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemAddBulkSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemAddBulkSamples.java new file mode 100644 index 0000000000000..b313e9b25725a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemAddBulkSamples.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.generated; + +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemBulkRequest; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistItemProperties; +import java.util.Arrays; + +/** + * Samples for ConnectionRaiBlocklistItem AddBulk. + */ +public final class ConnectionRaiBlocklistItemAddBulkSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/RaiBlocklistItem/addBulk.json + */ + /** + * Sample code: Create Bulk Rai Blocklist Items. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + createBulkRaiBlocklistItems(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiBlocklistItems() + .addBulk("test-rg", "aml-workspace-name", "testConnection", "raiBlocklistName", + Arrays.asList( + new RaiBlocklistItemBulkRequest().withName("myblocklistitem1") + .withProperties( + new RaiBlocklistItemProperties().withIsRegex(true).withPattern("^[a-z0-9_-]{2,16}$")), + new RaiBlocklistItemBulkRequest().withName("myblocklistitem2") + .withProperties(new RaiBlocklistItemProperties().withIsRegex(false).withPattern("blockwords"))), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemCreateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemCreateSamples.java new file mode 100644 index 0000000000000..b8638f43cc279 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemCreateSamples.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.RaiBlocklistItemProperties; + +/** + * Samples for ConnectionRaiBlocklistItem Create. + */ +public final class ConnectionRaiBlocklistItemCreateSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/RaiBlocklistItem/create.json + */ + /** + * Sample code: Create RaiBlocklist Item. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + createRaiBlocklistItem(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiBlocklistItems() + .define("raiBlocklistItemName") + .withExistingRaiBlocklist("test-rg", "aml-workspace-name", "testConnection", "raiBlocklistName") + .withProperties(new RaiBlocklistItemProperties().withIsRegex(false).withPattern("Pattern To Block")) + .create(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemDeleteBulkSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemDeleteBulkSamples.java new file mode 100644 index 0000000000000..45faba53ef7eb --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemDeleteBulkSamples.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import java.io.IOException; + +/** + * Samples for ConnectionRaiBlocklistItem DeleteBulk. + */ +public final class ConnectionRaiBlocklistItemDeleteBulkSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/RaiBlocklistItem/deleteBulk.json + */ + /** + * Sample code: Delete Bulk Rai Blocklist Items. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteBulkRaiBlocklistItems( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { + manager.connectionRaiBlocklistItems() + .deleteBulk("test-rg", "aml-workspace-name", "testConnection", "raiBlocklistName", + SerializerFactory.createDefaultManagementSerializerAdapter() + .deserialize("[\"myblocklistitem1\",\"myblocklistitem2\"]", 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/ConnectionRaiBlocklistItemDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemDeleteSamples.java new file mode 100644 index 0000000000000..2cfd0355ad46a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemDeleteSamples.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; + +/** + * Samples for ConnectionRaiBlocklistItem Delete. + */ +public final class ConnectionRaiBlocklistItemDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/RaiBlocklistItem/delete.json + */ + /** + * Sample code: Delete RaiBlocklist Item. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + deleteRaiBlocklistItem(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiBlocklistItems() + .delete("test-rg", "aml-workspace-name", "testConnection", "raiBlocklistName", "raiBlocklistItemName", null, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemGetSamples.java new file mode 100644 index 0000000000000..2d9a32bb57567 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemGetSamples.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; + +/** + * Samples for ConnectionRaiBlocklistItem Get. + */ +public final class ConnectionRaiBlocklistItemGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/RaiBlocklistItem/get.json + */ + /** + * Sample code: Get Rai RaiBlocklist Item. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + getRaiRaiBlocklistItem(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiBlocklistItems() + .getWithResponse("test-rg", "aml-workspace-name", "testConnection", "raiBlocklistName", + "raiBlocklistItemName", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemsOperationListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemsOperationListSamples.java new file mode 100644 index 0000000000000..9dbd240cb0c95 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistItemsOperationListSamples.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 ConnectionRaiBlocklistItemsOperation List. + */ +public final class ConnectionRaiBlocklistItemsOperationListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/RaiBlocklistItem/list.json + */ + /** + * Sample code: List RaiBlocklist Items. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRaiBlocklistItems(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiBlocklistItemsOperations() + .list("test-rg", "aml-workspace-name", "testConnection", "raiBlocklistName", null, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistOperationCreateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistOperationCreateSamples.java new file mode 100644 index 0000000000000..4005aff9e9706 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistOperationCreateSamples.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.RaiBlocklistProperties; + +/** + * Samples for ConnectionRaiBlocklistOperation Create. + */ +public final class ConnectionRaiBlocklistOperationCreateSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/RaiBlocklist/create.json + */ + /** + * Sample code: Create Rai Blocklist. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createRaiBlocklist(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiBlocklistOperations() + .define("raiBlocklistName") + .withExistingConnection("test-rg", "aml-workspace-name", "testConnection") + .withProperties(new RaiBlocklistProperties().withDescription("Basic blocklist description")) + .create(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistOperationDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistOperationDeleteSamples.java new file mode 100644 index 0000000000000..e989dc18758e0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistOperationDeleteSamples.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 ConnectionRaiBlocklistOperation Delete. + */ +public final class ConnectionRaiBlocklistOperationDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/RaiBlocklist/delete.json + */ + /** + * Sample code: Delete Rai Blocklist. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRaiBlocklist(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiBlocklistOperations() + .delete("test-rg", "aml-workspace-name", "testConnection", "raiBlocklistName", null, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistOperationGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistOperationGetSamples.java new file mode 100644 index 0000000000000..924c8da2f8976 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistOperationGetSamples.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 ConnectionRaiBlocklistOperation Get. + */ +public final class ConnectionRaiBlocklistOperationGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/RaiBlocklist/get.json + */ + /** + * Sample code: Get Rai Blocklist. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRaiBlocklist(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiBlocklistOperations() + .getWithResponse("test-rg", "aml-workspace-name", "testConnection", "raiBlocklistName", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistsListSamples.java new file mode 100644 index 0000000000000..efbe15d7c85cf --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiBlocklistsListSamples.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 ConnectionRaiBlocklists List. + */ +public final class ConnectionRaiBlocklistsListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/RaiBlocklist/list.json + */ + /** + * Sample code: List Rai Blocklist. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRaiBlocklist(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiBlocklists() + .list("test-rg", "aml-workspace-name", "testConnection", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPoliciesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPoliciesListSamples.java new file mode 100644 index 0000000000000..a2cc912063ad8 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPoliciesListSamples.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 ConnectionRaiPolicies List. + */ +public final class ConnectionRaiPoliciesListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/RaiPolicy/list.json + */ + /** + * Sample code: List Rai policy. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRaiPolicy(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiPolicies() + .list("test-rg", "aml-workspace-name", "testConnection", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPolicyOperationCreateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPolicyOperationCreateSamples.java new file mode 100644 index 0000000000000..d541917680688 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPolicyOperationCreateSamples.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.AllowedContentLevel; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistConfig; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyContentFilter; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyContentSource; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyMode; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyProperties; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyType; +import java.util.Arrays; + +/** + * Samples for ConnectionRaiPolicyOperation Create. + */ +public final class ConnectionRaiPolicyOperationCreateSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/RaiPolicy/create.json + */ + /** + * Sample code: Create Rai policy. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createRaiPolicy(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiPolicyOperations() + .define("raiPolicyName") + .withExistingConnection("test-rg", "aml-workspace-name", "testConnection") + .withProperties(new RaiPolicyProperties().withBasePolicyName("112") + .withCompletionBlocklists( + Arrays.asList(new RaiBlocklistConfig().withBlocking(false).withBlocklistName("blocklistName"))) + .withContentFilters( + Arrays.asList(new RaiPolicyContentFilter().withAllowedContentLevel(AllowedContentLevel.LOW) + .withBlocking(false) + .withEnabled(false) + .withName("policyName") + .withSource(RaiPolicyContentSource.PROMPT))) + .withMode(RaiPolicyMode.BLOCKING) + .withPromptBlocklists( + Arrays.asList(new RaiBlocklistConfig().withBlocking(false).withBlocklistName("blocklistName"))) + .withType(RaiPolicyType.SYSTEM_MANAGED)) + .create(); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPolicyOperationDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPolicyOperationDeleteSamples.java new file mode 100644 index 0000000000000..3e0309f3ede4a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPolicyOperationDeleteSamples.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 ConnectionRaiPolicyOperation Delete. + */ +public final class ConnectionRaiPolicyOperationDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/RaiPolicy/delete.json + */ + /** + * Sample code: Delete Rai policy. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRaiPolicy(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiPolicyOperations() + .delete("test-rg", "aml-workspace-name", "testConnection", "raiPolicyName", null, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPolicyOperationGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPolicyOperationGetSamples.java new file mode 100644 index 0000000000000..6b1e84385dfe7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ConnectionRaiPolicyOperationGetSamples.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 ConnectionRaiPolicyOperation Get. + */ +public final class ConnectionRaiPolicyOperationGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/RaiPolicy/get.json + */ + /** + * Sample code: Get Rai policy. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRaiPolicy(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.connectionRaiPolicyOperations() + .getWithResponse("test-rg", "aml-workspace-name", "testConnection", "raiPolicyName", + com.azure.core.util.Context.NONE); + } +} 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 2f06e50e8ec3a..8d48c1ebeae35 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 @@ -15,8 +15,8 @@ public final class DataContainersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataContainer/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/DataContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Data Container. @@ -29,8 +29,8 @@ public final class DataContainersCreateOrUpdateSamples { .define("datacontainer123") .withExistingWorkspace("testrg123", "workspace123") .withProperties(new DataContainerProperties().withDescription("string") - .withTags(mapOf("tag1", "value1", "tag2", "value2")) .withProperties(mapOf("properties1", "value1", "properties2", "value2")) + .withTags(mapOf("tag1", "value1", "tag2", "value2")) .withDataType(DataType.fromString("UriFile"))) .create(); } 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 bab9d03cc3176..07c0186baada5 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 @@ -10,8 +10,8 @@ public final class DataContainersDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataContainer/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/DataContainer/delete.json */ /** * Sample code: Delete Workspace Data Container. 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 c1e4a7cf069ea..09582bef153a4 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 @@ -10,8 +10,8 @@ public final class DataContainersGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataContainer/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/DataContainer/get.json */ /** * Sample code: Get Workspace Data Container. 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 0a1b2aad4e416..ac0523cd113fc 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 @@ -10,8 +10,8 @@ public final class DataContainersListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataContainer/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/DataContainer/list.json */ /** * Sample code: List Workspace Data Container. 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 5848152474d87..0b996c3b879d6 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 @@ -14,8 +14,8 @@ public final class DataVersionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataVersionBase/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/DataVersionBase/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Data Version Base. @@ -28,8 +28,8 @@ public static void createOrUpdateWorkspaceDataVersionBase( .define("string") .withExistingData("test-rg", "my-aml-workspace", "string") .withProperties(new UriFileDataVersion().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) .withDataUri("string")) .create(); 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 fde0f26ab3da3..b91ebeb69ff48 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 @@ -10,8 +10,8 @@ public final class DataVersionsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataVersionBase/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/DataVersionBase/delete.json */ /** * Sample code: Delete Workspace Data Version Base. 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 49ee47564ac67..daeb637467a54 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 @@ -10,8 +10,8 @@ public final class DataVersionsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataVersionBase/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/DataVersionBase/get.json */ /** * Sample code: Get Workspace Data Version Base. 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 bdb29955a7949..0e790f17de95e 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 @@ -10,8 +10,8 @@ public final class DataVersionsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataVersionBase/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/DataVersionBase/list.json */ /** * Sample code: List Workspace Data Version Base. 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 index dea270455a334..7c1837e978886 100644 --- 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 @@ -12,8 +12,8 @@ public final class DataVersionsPublishSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/DataVersionBase/publish.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/DataVersionBase/publish.json */ /** * Sample code: Publish Workspace Data Version Base. @@ -24,9 +24,9 @@ public final class DataVersionsPublishSamples { publishWorkspaceDataVersionBase(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.dataVersions() .publish("test-rg", "my-aml-workspace", "string", "string", - new DestinationAsset().withRegistryName("string") - .withDestinationName("string") - .withDestinationVersion("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 996818977188e..30df834dc50f0 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 @@ -22,8 +22,8 @@ public final class DatastoresCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.json */ /** * Sample code: CreateOrUpdate datastore (Azure Data Lake Gen1 w/ ServicePrincipal). @@ -38,10 +38,10 @@ public static void createOrUpdateDatastoreAzureDataLakeGen1WServicePrincipal( .withProperties(new AzureDataLakeGen1Datastore().withDescription("string") .withTags(mapOf("string", "string")) .withCredentials(new ServicePrincipalDatastoreCredentials().withAuthorityUrl("string") - .withResourceUrl("string") - .withTenantId(UUID.fromString("00000000-1111-2222-3333-444444444444")) .withClientId(UUID.fromString("00000000-1111-2222-3333-444444444444")) - .withSecrets(new ServicePrincipalDatastoreSecrets().withClientSecret("fakeTokenPlaceholder"))) + .withResourceUrl("string") + .withSecrets(new ServicePrincipalDatastoreSecrets().withClientSecret("fakeTokenPlaceholder")) + .withTenantId(UUID.fromString("00000000-1111-2222-3333-444444444444"))) .withStoreName("string")) .withSkipValidation(false) .create(); @@ -49,8 +49,8 @@ public static void createOrUpdateDatastoreAzureDataLakeGen1WServicePrincipal( /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.json */ /** * Sample code: CreateOrUpdate datastore (Azure Data Lake Gen2 w/ Service Principal). @@ -65,13 +65,13 @@ public static void createOrUpdateDatastoreAzureDataLakeGen2WServicePrincipal( .withProperties(new AzureDataLakeGen2Datastore().withDescription("string") .withTags(mapOf("string", "string")) .withCredentials(new ServicePrincipalDatastoreCredentials().withAuthorityUrl("string") - .withResourceUrl("string") - .withTenantId(UUID.fromString("00000000-1111-2222-3333-444444444444")) .withClientId(UUID.fromString("00000000-1111-2222-3333-444444444444")) - .withSecrets(new ServicePrincipalDatastoreSecrets().withClientSecret("fakeTokenPlaceholder"))) - .withFilesystem("string") + .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(); @@ -79,8 +79,8 @@ public static void createOrUpdateDatastoreAzureDataLakeGen2WServicePrincipal( /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/AzureBlobWAccountKey/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Datastore/AzureBlobWAccountKey/createOrUpdate.json */ /** * Sample code: CreateOrUpdate datastore (AzureBlob w/ AccountKey). @@ -106,8 +106,8 @@ public static void createOrUpdateDatastoreAzureBlobWAccountKey( /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/AzureFileWAccountKey/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Datastore/AzureFileWAccountKey/createOrUpdate.json */ /** * Sample code: CreateOrUpdate datastore (Azure File store w/ AccountKey). @@ -124,8 +124,8 @@ public static void createOrUpdateDatastoreAzureFileStoreWAccountKey( .withCredentials(new AccountKeyDatastoreCredentials() .withSecrets(new AccountKeyDatastoreSecrets().withKey("fakeTokenPlaceholder"))) .withAccountName("string") - .withFileShareName("string") .withEndpoint("string") + .withFileShareName("string") .withProtocol("string")) .withSkipValidation(false) .create(); 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 0d06f750abe24..f6da74bbfe8c7 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 @@ -10,8 +10,8 @@ public final class DatastoresDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Datastore/delete.json */ /** * Sample code: Delete datastore. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresGetSamples.java index 303e65dd90d1a..0f558155fc671 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 @@ -10,8 +10,8 @@ public final class DatastoresGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Datastore/get.json */ /** * Sample code: Get datastore. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresListSamples.java index 116ae13584723..16ff7dada0dd9 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 @@ -12,8 +12,8 @@ public final class DatastoresListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Datastore/list.json */ /** * Sample code: List datastores. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresListSecretsSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresListSecretsSamples.java index fbff23456a49e..4af8f3597b620 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,14 +4,16 @@ package com.azure.resourcemanager.machinelearning.generated; +import com.azure.resourcemanager.machinelearning.models.SecretExpiry; + /** * Samples for Datastores ListSecrets. */ public final class DatastoresListSecretsSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Datastore/listSecrets.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Datastore/listSecrets.json */ /** * Sample code: Get datastore secrets. @@ -20,6 +22,8 @@ public final class DatastoresListSecretsSamples { */ 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); + .listSecretsWithResponse("test-rg", "my-aml-workspace", "string", + new SecretExpiry().withExpirableSecret(false).withExpireAfterHours(1), + 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..1268a66a6622b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointCreateOrUpdateSamples.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.OpenAIEndpointResourceProperties; + +/** + * Samples for Endpoint CreateOrUpdate. + */ +public final class EndpointCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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..dbfbbd5c8b2e6 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentCreateOrUpdateSamples.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.generated; + +import com.azure.resourcemanager.machinelearning.fluent.models.EndpointDeploymentResourcePropertiesBasicResourceInner; +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/2025-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() + .createOrUpdate("resourceGroup-1", "testworkspace", "Azure.OpenAI", "text-davinci-003", + new EndpointDeploymentResourcePropertiesBasicResourceInner() + .withProperties(new OpenAIEndpointDeploymentResourceProperties() + .withModel(new EndpointDeploymentModel().withFormat("OpenAI") + .withName("text-davinci-003") + .withVersion("1")) + .withVersionUpgradeOption( + DeploymentModelVersionUpgradeOption.ONCE_NEW_DEFAULT_VERSION_AVAILABLE)), + com.azure.core.util.Context.NONE); + } +} 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..0b33bedb55508 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentDeleteSamples.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; + +/** + * Samples for EndpointDeployment Delete. + */ +public final class EndpointDeploymentDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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", null, + 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..b528acf9f9e01 --- /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/2025-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..e8f41c7636290 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointDeploymentGetSamples.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 Get. + */ +public final class EndpointDeploymentGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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..3673d0085421a --- /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/2025-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..79bf86df47335 --- /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/2025-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..d5eb115900d6a --- /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/2025-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..2d75fc4bb1fc6 --- /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/2025-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..be449cb4ae2de --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointListSamples.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.EndpointType; + +/** + * Samples for Endpoint List. + */ +public final class EndpointListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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, null, null, null, "skip_string", null, + 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..7455d49b1ed51 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EndpointRegenerateKeysSamples.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.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/2025-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 e247c99ce7fab..7341ddf975d92 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 @@ -14,8 +14,8 @@ public final class EnvironmentContainersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentContainer/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/EnvironmentContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Environment Container. @@ -28,9 +28,9 @@ public static void createOrUpdateWorkspaceEnvironmentContainer( .define("testEnvironment") .withExistingWorkspace("testrg123", "testworkspace") .withProperties(new EnvironmentContainerProperties().withDescription("string") - .withTags(mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) .withProperties( - mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string"))) + mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) + .withTags(mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string"))) .create(); } 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 f1d0f352b8091..47ff5304b2295 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 @@ -10,8 +10,8 @@ public final class EnvironmentContainersDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentContainer/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/EnvironmentContainer/delete.json */ /** * Sample code: Delete Workspace Environment Container. 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 0a4e3d8be7f4c..befd5c4073a3b 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 @@ -10,8 +10,8 @@ public final class EnvironmentContainersGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentContainer/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/EnvironmentContainer/get.json */ /** * Sample code: Get Workspace Environment Container. 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 5e7fa63a1092a..c9a41ea29cce4 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 @@ -10,8 +10,8 @@ public final class EnvironmentContainersListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentContainer/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/EnvironmentContainer/list.json */ /** * Sample code: List Workspace Environment Container. 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 82cd4de87f594..c6e16c4467091 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 @@ -17,8 +17,8 @@ public final class EnvironmentVersionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentVersion/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/EnvironmentVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Environment Version. @@ -31,14 +31,14 @@ public static void createOrUpdateWorkspaceEnvironmentVersion( .define("string") .withExistingEnvironment("test-rg", "my-aml-workspace", "string") .withProperties(new EnvironmentVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) - .withImage("docker.io/tensorflow/serving:latest") - .withCondaFile("string") .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)) 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 412d60573bdf2..7a4d34b56b890 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 @@ -10,8 +10,8 @@ public final class EnvironmentVersionsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentVersion/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/EnvironmentVersion/delete.json */ /** * Sample code: Delete Workspace Environment Version. 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 289043d8fb9ae..f98ee01a7c498 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 @@ -10,8 +10,8 @@ public final class EnvironmentVersionsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentVersion/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/EnvironmentVersion/get.json */ /** * Sample code: Get Workspace Environment Version. 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 72e5668bc7112..ef6c4baa8f015 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 @@ -10,8 +10,8 @@ public final class EnvironmentVersionsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentVersion/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/EnvironmentVersion/list.json */ /** * Sample code: List Workspace Environment Version. 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 index ad60e007c4f4e..c87f662f4f389 100644 --- 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 @@ -12,8 +12,8 @@ public final class EnvironmentVersionsPublishSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/EnvironmentVersion/publish.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/EnvironmentVersion/publish.json */ /** * Sample code: Publish Workspace Environment Version. @@ -24,9 +24,9 @@ public final class EnvironmentVersionsPublishSamples { publishWorkspaceEnvironmentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.environmentVersions() .publish("test-rg", "my-aml-workspace", "string", "string", - new DestinationAsset().withRegistryName("string") - .withDestinationName("string") - .withDestinationVersion("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 index 7d2372bebf655..acd698bc3e194 100644 --- 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 @@ -10,8 +10,8 @@ public final class FeaturesGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Feature/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Feature/get.json */ /** * Sample code: Get Feature. 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 index 88754e3799cb9..4b2853bee443c 100644 --- 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 @@ -10,8 +10,8 @@ public final class FeaturesListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Feature/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Feature/list.json */ /** * Sample code: List Feature. 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 index 7d37a501db9d2..28972d6458920 100644 --- 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 @@ -14,8 +14,8 @@ public final class FeaturesetContainersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetContainer/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/FeaturesetContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Featureset Container. @@ -28,8 +28,8 @@ public static void createOrUpdateWorkspaceFeaturesetContainer( .define("string") .withExistingWorkspace("test-rg", "my-aml-workspace") .withProperties(new FeaturesetContainerProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsArchived(false)) .create(); } 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 index 9575c34ce3366..e01e2d2efc3a9 100644 --- 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 @@ -10,8 +10,8 @@ public final class FeaturesetContainersDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetContainer/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/FeaturesetContainer/delete.json */ /** * Sample code: Delete Workspace Featureset Container. 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 index 22ec1d806e0f1..9427ea65d9b71 100644 --- 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 @@ -10,8 +10,8 @@ public final class FeaturesetContainersGetEntitySamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetContainer/getEntity.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/FeaturesetContainer/getEntity.json */ /** * Sample code: GetEntity Workspace Featureset Container. 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 index f585cdb2c8e1a..4e333e21a7ee2 100644 --- 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 @@ -12,8 +12,8 @@ public final class FeaturesetContainersListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetContainer/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/FeaturesetContainer/list.json */ /** * Sample code: List Workspace Featureset Container. 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 index 948db8be13847..e3b5cf01dcdc8 100644 --- 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 @@ -5,8 +5,8 @@ package com.azure.resourcemanager.machinelearning.generated; 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.FeaturesetVersionBackfillRequest; import com.azure.resourcemanager.machinelearning.models.MaterializationComputeResource; import java.time.OffsetDateTime; import java.util.Arrays; @@ -19,8 +19,8 @@ public final class FeaturesetVersionsBackfillSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetVersion/backfill.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/FeaturesetVersion/backfill.json */ /** * Sample code: Backfill Workspace Featureset Version. @@ -31,16 +31,17 @@ public final class FeaturesetVersionsBackfillSamples { backfillWorkspaceFeaturesetVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.featuresetVersions() .backfill("test-rg", "my-aml-workspace", "string", "string", - new FeaturesetVersionBackfillRequest().withDisplayName("string") - .withDescription("string") - .withFeatureWindow(new FeatureWindow() - .withFeatureWindowStart(OffsetDateTime.parse("2020-01-01T12:34:56.999+00:51")) - .withFeatureWindowEnd(OffsetDateTime.parse("2020-01-01T12:34:56.999+00:51"))) + 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") - .withTags(mapOf("string", "string")) .withResource(new MaterializationComputeResource().withInstanceType("string")) - .withSparkConfiguration(mapOf("string", "string")), + .withSparkConfiguration(mapOf("string", "string")) + .withTags(mapOf("string", "string")), com.azure.core.util.Context.NONE); } 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 index 9765d26856f50..fe0fa4c7b130f 100644 --- 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 @@ -25,8 +25,8 @@ public final class FeaturesetVersionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetVersion/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/FeaturesetVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Featureset Version. @@ -39,28 +39,29 @@ public static void createOrUpdateWorkspaceFeaturesetVersion( .define("string") .withExistingFeatureset("test-rg", "my-aml-workspace", "string") .withProperties(new FeaturesetVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) - .withIsArchived(false) + .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")) - .withMaterializationSettings( - new MaterializationSettings().withStoreType(MaterializationStoreType.ONLINE) - .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)) - .withWeekDays(Arrays.asList(WeekDay.MONDAY)) - .withMonthDays(Arrays.asList(1)))) - .withNotification(new NotificationSetting().withEmails(Arrays.asList("string")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_FAILED))) - .withResource(new MaterializationComputeResource().withInstanceType("string")) - .withSparkConfiguration(mapOf("string", "string"))) - .withStage("string") - .withEntities(Arrays.asList("string"))) + .withStage("string")) .create(); } 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 index 48a4b01aa8e50..dca6fc4ba5583 100644 --- 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 @@ -10,8 +10,8 @@ public final class FeaturesetVersionsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetVersion/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/FeaturesetVersion/delete.json */ /** * Sample code: Delete Workspace Featureset Version. 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 index 059e017be1ea5..12b3d51b277fb 100644 --- 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 @@ -10,8 +10,8 @@ public final class FeaturesetVersionsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetVersion/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/FeaturesetVersion/get.json */ /** * Sample code: Get Workspace Featureset Version. 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 index d44a4673c733e..253eb01c4b19a 100644 --- 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 @@ -12,8 +12,8 @@ public final class FeaturesetVersionsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturesetVersion/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/FeaturesetVersion/list.json */ /** * Sample code: List Workspace Featureset Version. 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 index 3dca0b60ead71..c8181e07af9e5 100644 --- 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 @@ -14,8 +14,8 @@ public final class FeaturestoreEntityContainersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityContainer/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/FeaturestoreEntityContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Featurestore Entity Container. @@ -28,8 +28,8 @@ public static void createOrUpdateWorkspaceFeaturestoreEntityContainer( .define("string") .withExistingWorkspace("test-rg", "my-aml-workspace") .withProperties(new FeaturestoreEntityContainerProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsArchived(false)) .create(); } 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 index 8ea6a8bb35b62..a1f6572172966 100644 --- 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 @@ -10,8 +10,8 @@ public final class FeaturestoreEntityContainersDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityContainer/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/FeaturestoreEntityContainer/delete.json */ /** * Sample code: Delete Workspace Featurestore Entity Container. 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 index 657178baa01f4..2c01d4867e6c0 100644 --- 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 @@ -10,8 +10,8 @@ public final class FeaturestoreEntityContainersGetEntitySamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityContainer/getEntity.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/FeaturestoreEntityContainer/getEntity.json */ /** * Sample code: GetEntity Workspace Featurestore Entity Container. 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 index 51852e6c654c7..d0bb82210ac04 100644 --- 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 @@ -12,8 +12,8 @@ public final class FeaturestoreEntityContainersListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityContainer/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/FeaturestoreEntityContainer/list.json */ /** * Sample code: List Workspace Featurestore Entity Container. 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 index df724c33bd150..22a0c79dac2f1 100644 --- 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 @@ -17,8 +17,8 @@ public final class FeaturestoreEntityVersionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityVersion/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/FeaturestoreEntityVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Featurestore Entity Version. @@ -32,12 +32,12 @@ public static void createOrUpdateWorkspaceFeaturestoreEntityVersion( .withExistingFeaturestoreEntity("test-rg", "my-aml-workspace", "string") .withProperties( new FeaturestoreEntityVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) - .withIsArchived(false) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) + .withIsArchived(false) .withIndexColumns(Arrays - .asList(new IndexColumn().withDataType(FeatureDataType.DATETIME).withColumnName("string")))) + .asList(new IndexColumn().withColumnName("string").withDataType(FeatureDataType.DATETIME)))) .create(); } 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 index 260d6d2592a69..2d7d93e54f85d 100644 --- 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 @@ -10,8 +10,8 @@ public final class FeaturestoreEntityVersionsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityVersion/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/FeaturestoreEntityVersion/delete.json */ /** * Sample code: Delete Workspace Featurestore Entity Version. 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 index 92c8afc6ee90b..91f67a3493ab2 100644 --- 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 @@ -10,8 +10,8 @@ public final class FeaturestoreEntityVersionsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityVersion/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/FeaturestoreEntityVersion/get.json */ /** * Sample code: Get Workspace Featurestore Entity Version. 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 index 86fdd78399a85..905f16db46fc2 100644 --- 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 @@ -12,8 +12,8 @@ public final class FeaturestoreEntityVersionsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/FeaturestoreEntityVersion/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/FeaturestoreEntityVersion/list.json */ /** * Sample code: List Workspace Featurestore Entity Version. 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..9d0685dd0ee1b --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsCreateOrUpdateSamples.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.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.RequestConfiguration; +import com.azure.resourcemanager.machinelearning.models.Sku; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import com.azure.resourcemanager.machinelearning.models.StringKeyValuePair; +import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; +import java.time.Duration; +import java.util.Arrays; +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/2025-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( + Arrays.asList(new StringKeyValuePair().withKey("fakeTokenPlaceholder").withValue("string"))) + .withAuthMode(AuthMode.AAD) + .withGroupName("string") + .withRequestConfiguration(new RequestConfiguration().withMaxConcurrentRequestsPerInstance(1) + .withRequestTimeout(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.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..d01bead746b25 --- /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/2025-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..11c1a14387813 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsGetSamples.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; + +/** + * Samples for InferenceEndpoints Get. + */ +public final class InferenceEndpointsGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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..59b03330b5aa3 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsListSamples.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.OrderString; + +/** + * Samples for InferenceEndpoints List. + */ +public final class InferenceEndpointsListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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..7c64d65303fb3 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceEndpointsUpdateSamples.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.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/2025-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..528dce9c874e0 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsCreateOrUpdateSamples.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.generated; + +import com.azure.resourcemanager.machinelearning.models.GroupEnvironmentConfiguration; +import com.azure.resourcemanager.machinelearning.models.GroupModelConfiguration; +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.ProbeSettings; +import com.azure.resourcemanager.machinelearning.models.Sku; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import com.azure.resourcemanager.machinelearning.models.StringKeyValuePair; +import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; +import java.time.Duration; +import java.util.Arrays; +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/2025-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( + Arrays.asList(new StringKeyValuePair().withKey("fakeTokenPlaceholder").withValue("string"))) + .withEnvironmentConfiguration(new GroupEnvironmentConfiguration() + .withEnvironmentId("azureml://registries/test-registry/models/enginefeed/versions/1") + .withEnvironmentVariables( + Arrays.asList(new StringKeyValuePair().withKey("fakeTokenPlaceholder").withValue("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 GroupModelConfiguration() + .withModelId("azureml://registries/test-registry/models/modelabc/versions/1")) + .withNodeSkuType("string") + .withScaleUnitSize(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..ce201dece798f --- /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/2025-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/InferenceGroupsGetDeltaModelsStatusAsyncSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsGetDeltaModelsStatusAsyncSamples.java new file mode 100644 index 0000000000000..1345e04d593b5 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsGetDeltaModelsStatusAsyncSamples.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.DeltaModelStatusRequest; +import java.util.Arrays; + +/** + * Samples for InferenceGroups GetDeltaModelsStatusAsync. + */ +public final class InferenceGroupsGetDeltaModelsStatusAsyncSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/InferenceGroup/getDeltaModelsStatusAsync.json + */ + /** + * Sample code: GetDeltaModelsStatusAsync Inference Group. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getDeltaModelsStatusAsyncInferenceGroup( + com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceGroups() + .getDeltaModelsStatusAsyncWithResponse("test-rg", "my-aml-workspace", "string", "string", + new DeltaModelStatusRequest().withDeltaModels(Arrays.asList("string")) + .withTargetBaseModel("azureml://registries/test-registry/models/modelabc/versions/1"), + 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..01fe60e19e1e3 --- /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/2025-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..57b5c5d723fe1 --- /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/2025-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/InferenceGroupsListDeltaModelsAsyncSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsListDeltaModelsAsyncSamples.java new file mode 100644 index 0000000000000..738a348d1cfc3 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsListDeltaModelsAsyncSamples.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.DeltaModelListRequest; + +/** + * Samples for InferenceGroups ListDeltaModelsAsync. + */ +public final class InferenceGroupsListDeltaModelsAsyncSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/InferenceGroup/listDeltaModelsAsync.json + */ + /** + * Sample code: ListDeltaModelsAsync Inference Group. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + listDeltaModelsAsyncInferenceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceGroups() + .listDeltaModelsAsync("test-rg", "my-aml-workspace", "string", "string", + new DeltaModelListRequest().withCount(-1) + .withSkipToken("fakeTokenPlaceholder") + .withTargetBaseModel("azureml://registries/test-registry/models/modelabc/versions/1"), + 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..90a68a3be7ac7 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsListSamples.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.OrderString; + +/** + * Samples for InferenceGroups List. + */ +public final class InferenceGroupsListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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..484865c8e03b0 --- /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/2025-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/InferenceGroupsModifyDeltaModelsAsyncSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsModifyDeltaModelsAsyncSamples.java new file mode 100644 index 0000000000000..e7b5c3517680c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsModifyDeltaModelsAsyncSamples.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.resourcemanager.machinelearning.models.DeltaModelModifyRequest; +import java.util.Arrays; + +/** + * Samples for InferenceGroups ModifyDeltaModelsAsync. + */ +public final class InferenceGroupsModifyDeltaModelsAsyncSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/InferenceGroup/modifyDeltaModelsAsync.json + */ + /** + * Sample code: ModifyDeltaModelsAsync Inference Group. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + modifyDeltaModelsAsyncInferenceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.inferenceGroups() + .modifyDeltaModelsAsync("test-rg", "my-aml-workspace", "string", "string", + new DeltaModelModifyRequest().withAddDeltaModels(Arrays.asList("string")) + .withRemoveDeltaModels(Arrays.asList("string")) + .withTargetBaseModel("azureml://registries/test-registry/models/modelabc/versions/1"), + 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..8a06bfcaed5a2 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferenceGroupsUpdateSamples.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.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/2025-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..405ff79f36968 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsCreateOrUpdateSamples.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.generated; + +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.ScaleUnitConfiguration; +import com.azure.resourcemanager.machinelearning.models.Sku; +import com.azure.resourcemanager.machinelearning.models.SkuTier; +import com.azure.resourcemanager.machinelearning.models.StringKeyValuePair; +import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; +import java.util.Arrays; +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/2025-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( + Arrays.asList(new StringKeyValuePair().withKey("fakeTokenPlaceholder").withValue("string"))) + .withScaleUnitConfiguration(new ScaleUnitConfiguration().withDisablePublicEgress(false) + .withRegistries(Arrays.asList("string", "registryName1")))) + .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..91965c880e1a3 --- /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/2025-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..04015f2657850 --- /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/2025-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/InferencePoolsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsListSamples.java new file mode 100644 index 0000000000000..d042e5e6339c9 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsListSamples.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.OrderString; + +/** + * Samples for InferencePools List. + */ +public final class InferencePoolsListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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/InferencePoolsUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsUpdateSamples.java new file mode 100644 index 0000000000000..4edf11177d29a --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/InferencePoolsUpdateSamples.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.generated; + +import com.azure.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/2025-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 b088c953d6aba..cf8f9b5dc01a9 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 @@ -10,8 +10,8 @@ public final class JobsCancelSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/cancel.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Job/cancel.json */ /** * Sample code: Cancel Job. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsCreateOrUpdateSamples.java index 0b075fc721a1a..87f01cbf619e6 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 @@ -10,25 +10,35 @@ 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.CustomModelFineTuning; +import com.azure.resourcemanager.machinelearning.models.FineTuningJob; +import com.azure.resourcemanager.machinelearning.models.FineTuningTaskType; 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.InputDeliveryMode; import com.azure.resourcemanager.machinelearning.models.JobResourceConfiguration; +import com.azure.resourcemanager.machinelearning.models.JobResources; 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.MedianStoppingPolicy; +import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput; +import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobOutput; 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.QueueSettings; 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.UriFileJobInput; import com.azure.resourcemanager.machinelearning.models.UriFileJobOutput; import java.io.IOException; import java.time.Duration; @@ -42,8 +52,8 @@ public final class JobsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/AutoMLJob/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Job/AutoMLJob/createOrUpdate.json */ /** * Sample code: CreateOrUpdate AutoML Job. @@ -56,43 +66,43 @@ public static void createOrUpdateAutoMLJob(com.azure.resourcemanager.machinelear .define("string") .withExistingWorkspace("test-rg", "my-aml-workspace") .withProperties(new AutoMLJob().withDescription("string") - .withTags(mapOf("string", "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().withJobServiceType("string") + new JobService().withEndpoint("string") + .withJobServiceType("string") .withPort(1) - .withEndpoint("string") .withProperties(mapOf("string", "string")))) - .withComputeId("string") - .withIsArchived(false) - .withIdentity(new AmlToken()) + .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)))) - .withEnvironmentId("string") - .withEnvironmentVariables(mapOf("string", "string")) - .withTaskDetails(new ImageClassification().withTrainingData(new MLTableJobInput().withUri("string")) - .withTargetColumnName("string") + .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))) - .withOutputs(mapOf("string", - new UriFileJobOutput().withDescription("string") - .withUri("string") - .withMode(OutputDeliveryMode.READ_WRITE_MOUNT)))) + .withLimitSettings(new ImageLimitSettings().withMaxTrials(2)))) .create(); } /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/SweepJob/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Job/SweepJob/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Sweep Job. @@ -105,29 +115,29 @@ public static void createOrUpdateSweepJob(com.azure.resourcemanager.machinelearn .define("string") .withExistingWorkspace("test-rg", "my-aml-workspace") .withProperties(new SweepJob().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withComputeId("string") .withDisplayName("string") .withExperimentName("string") .withServices(mapOf("string", - new JobService().withJobServiceType("string") + new JobService().withEndpoint("string") + .withJobServiceType("string") .withPort(1) - .withEndpoint("string") .withProperties(mapOf("string", "string")))) - .withComputeId("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)) - .withSamplingAlgorithm(new GridSamplingAlgorithm()) - .withLimits(new SweepJobLimits().withMaxTotalTrials(1) - .withMaxConcurrentTrials(1) - .withTrialTimeout(Duration.parse("PT1S"))) - .withEarlyTermination(new MedianStoppingPolicy().withEvaluationInterval(1).withDelayEvaluation(1)) - .withObjective(new Objective().withPrimaryMetric("string").withGoal(Goal.MINIMIZE)) .withTrial(new TrialComponent().withCodeId("fakeTokenPlaceholder") .withCommand("string") + .withDistribution(new Mpi().withProcessCountPerInstance(1)) .withEnvironmentId("string") .withEnvironmentVariables(mapOf("string", "string")) - .withDistribution(new Mpi().withProcessCountPerInstance(1)) .withResources(new JobResourceConfiguration().withInstanceCount(1) .withInstanceType("string") .withProperties(mapOf("string", @@ -139,8 +149,8 @@ public static void createOrUpdateSweepJob(com.azure.resourcemanager.machinelearn /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/PipelineJob/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Job/PipelineJob/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Pipeline Job. @@ -153,30 +163,62 @@ public static void createOrUpdatePipelineJob( .define("string") .withExistingWorkspace("test-rg", "my-aml-workspace") .withProperties(new PipelineJob().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withComputeId("string") .withDisplayName("string") .withExperimentName("string") .withServices(mapOf("string", - new JobService().withJobServiceType("string") + new JobService().withEndpoint("string") + .withJobServiceType("string") .withPort(1) - .withEndpoint("string") .withProperties(mapOf("string", "string")))) - .withComputeId("string") - .withSettings(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON)) .withInputs(mapOf("string", new LiteralJobInput().withDescription("string").withValue("string"))) .withOutputs(mapOf("string", new UriFileJobOutput().withDescription("string") - .withUri("string") - .withMode(OutputDeliveryMode.UPLOAD)))) + .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/2024-04-01/ - * examples/Job/CommandJob/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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().withComputeId("gpu-compute") + .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") + .withMode(OutputDeliveryMode.READ_WRITE_MOUNT) + .withUri("string"))) + .withQueueSettings(new QueueSettings().withJobTier(JobTier.STANDARD)) + .withResources(new JobResources().withInstanceTypes(Arrays.asList("Standard_NC6")))) + .create(); + } + + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Job/CommandJob/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Command Job. @@ -189,34 +231,35 @@ public static void createOrUpdateCommandJob( .define("string") .withExistingWorkspace("test-rg", "my-aml-workspace") .withProperties(new CommandJob().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) + .withComputeId("string") .withDisplayName("string") .withExperimentName("string") + .withIdentity(new AmlToken()) + .withParentJobName("ParentRun") .withServices(mapOf("string", - new JobService().withJobServiceType("string") + new JobService().withEndpoint("string") + .withJobServiceType("string") .withPort(1) - .withEndpoint("string") .withProperties(mapOf("string", "string")))) - .withComputeId("string") - .withIdentity(new AmlToken()) - .withResources(new JobResourceConfiguration().withInstanceCount(1) - .withInstanceType("string") - .withProperties(mapOf("string", - SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{\"e6b6493e-7d5e-4db3-be1e-306ec641327e\":null}", Object.class, - SerializerEncoding.JSON)))) .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") - .withUri("string") - .withMode(OutputDeliveryMode.READ_WRITE_MOUNT))) - .withDistribution(new TensorFlow().withWorkerCount(1).withParameterServerCount(1)) - .withLimits(new CommandJobLimits().withTimeout(Duration.parse("PT5M"))) - .withEnvironmentVariables(mapOf("string", "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(); } 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 06c963d241c3d..f8590d37171a7 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 @@ -10,8 +10,8 @@ public final class JobsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Job/delete.json */ /** * Sample code: Delete Job. 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 1577e8c5a9e1c..9f86ef79a9c3d 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 @@ -10,8 +10,8 @@ public final class JobsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/CommandJob/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Job/CommandJob/get.json */ /** * Sample code: Get Command Job. @@ -24,8 +24,8 @@ public static void getCommandJob(com.azure.resourcemanager.machinelearning.Machi /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/AutoMLJob/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Job/AutoMLJob/get.json */ /** * Sample code: Get AutoML Job. @@ -38,8 +38,8 @@ public static void getAutoMLJob(com.azure.resourcemanager.machinelearning.Machin /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/SweepJob/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Job/SweepJob/get.json */ /** * Sample code: Get Sweep Job. @@ -52,8 +52,8 @@ public static void getSweepJob(com.azure.resourcemanager.machinelearning.Machine /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/PipelineJob/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Job/PipelineJob/get.json */ /** * Sample code: Get Pipeline Job. @@ -63,4 +63,18 @@ public static void getSweepJob(com.azure.resourcemanager.machinelearning.Machine 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/2025-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 96283b6c8e09e..28298ede9424e 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,14 +4,16 @@ package com.azure.resourcemanager.machinelearning.generated; +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/2024-04-01/ - * examples/Job/CommandJob/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Job/CommandJob/list.json */ /** * Sample code: List Command Job. @@ -26,8 +28,8 @@ public static void listCommandJob(com.azure.resourcemanager.machinelearning.Mach /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/PipelineJob/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Job/PipelineJob/list.json */ /** * Sample code: List Pipeline Job. @@ -42,8 +44,24 @@ public static void listPipelineJob(com.azure.resourcemanager.machinelearning.Mac /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/SweepJob/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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, + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Job/SweepJob/list.json */ /** * Sample code: List Sweep Job. @@ -58,8 +76,8 @@ public static void listSweepJob(com.azure.resourcemanager.machinelearning.Machin /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Job/AutoMLJob/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Job/AutoMLJob/list.json */ /** * Sample code: List AutoML Job. 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 index fe00570a75583..f3d04707211f5 100644 --- 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 @@ -12,8 +12,8 @@ public final class ManagedNetworkProvisionsProvisionManagedNetworkSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/ManagedNetwork/provision.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/ManagedNetwork/provision.json */ /** * Sample code: Provision ManagedNetwork. 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 index ddd8e88b13510..60f6949ab631b 100644 --- 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 @@ -14,8 +14,8 @@ public final class ManagedNetworkSettingsRuleCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/ManagedNetwork/createOrUpdateRule.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/ManagedNetwork/createOrUpdateRule.json */ /** * Sample code: CreateOrUpdate ManagedNetworkSettingsRule. 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 index a90f21df55ff1..7096a42283bb1 100644 --- 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 @@ -10,8 +10,8 @@ public final class ManagedNetworkSettingsRuleDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/ManagedNetwork/deleteRule.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/ManagedNetwork/deleteRule.json */ /** * Sample code: Delete ManagedNetworkSettingsRule. 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 index 1ccacdcb5e9f1..47183906854a5 100644 --- 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 @@ -10,8 +10,8 @@ public final class ManagedNetworkSettingsRuleGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/ManagedNetwork/getRule.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/ManagedNetwork/getRule.json */ /** * Sample code: Get ManagedNetworkSettingsRule. 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 index 2f19211ab7b55..fd612e5ebdd66 100644 --- 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 @@ -10,8 +10,8 @@ public final class ManagedNetworkSettingsRuleListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/ManagedNetwork/listRule.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/ManagedNetwork/listRule.json */ /** * Sample code: List ManagedNetworkSettingsRule. 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 index 6c2429d5bb83a..f52415f2fc0c5 100644 --- 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 @@ -12,8 +12,8 @@ public final class MarketplaceSubscriptionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/MarketplaceSubscription/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/MarketplaceSubscription/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Marketplace Subscription. 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 index 4fa5c22d71022..afc73cf46b7e4 100644 --- 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 @@ -10,8 +10,8 @@ public final class MarketplaceSubscriptionsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/MarketplaceSubscription/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/MarketplaceSubscription/delete.json */ /** * Sample code: Delete Workspace Marketplace Subscription. 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 index 243cf647cdc22..91a8dea69a024 100644 --- 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 @@ -10,8 +10,8 @@ public final class MarketplaceSubscriptionsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/MarketplaceSubscription/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/MarketplaceSubscription/get.json */ /** * Sample code: Get Workspace Marketplace Subscription. 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 index 346d0fe46a83d..4155593441d38 100644 --- 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 @@ -10,8 +10,8 @@ public final class MarketplaceSubscriptionsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/MarketplaceSubscription/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/MarketplaceSubscription/list.json */ /** * Sample code: List Workspace Marketplace Subscription. 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 12628a6fbc3ee..1d126ea315ab8 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 @@ -14,8 +14,8 @@ public final class ModelContainersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelContainer/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ModelContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Model Container. 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 b9a5dac8d5128..ed62279abc05b 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 @@ -10,8 +10,8 @@ public final class ModelContainersDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelContainer/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ModelContainer/delete.json */ /** * Sample code: Delete Workspace Model Container. 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 2835c3d7abcea..e303e44684e18 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 @@ -10,8 +10,8 @@ public final class ModelContainersGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelContainer/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ModelContainer/get.json */ /** * Sample code: Get Workspace Model Container. 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 22a403b08f355..a7ddf6699d054 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 @@ -10,8 +10,8 @@ public final class ModelContainersListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelContainer/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ModelContainer/list.json */ /** * Sample code: List Workspace Model Container. 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 05f0b164b294c..7af1a3c004247 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 @@ -15,8 +15,8 @@ public final class ModelVersionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelVersion/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ModelVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Model Version. @@ -29,8 +29,8 @@ public final class ModelVersionsCreateOrUpdateSamples { .define("string") .withExistingModel("test-rg", "my-aml-workspace", "string") .withProperties(new ModelVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) .withFlavors(mapOf("string", new FlavorData().withData(mapOf("string", "string")))) .withModelType("CustomModel") 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 81d7fee23d4e7..5125535a718e2 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 @@ -10,8 +10,8 @@ public final class ModelVersionsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelVersion/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ModelVersion/delete.json */ /** * Sample code: Delete Workspace Model Version. 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 a7ebce68fb467..22b07cf3ef1c2 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 @@ -10,8 +10,8 @@ public final class ModelVersionsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelVersion/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ModelVersion/get.json */ /** * Sample code: Get Workspace Model Version. 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 dde491a5bc158..ee82c50e2eb88 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 @@ -10,8 +10,8 @@ public final class ModelVersionsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelVersion/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ModelVersion/list.json */ /** * Sample code: List Workspace Model Version. 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 index dad0ce4285f3a..44eedcd6e0f37 100644 --- 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 @@ -12,8 +12,8 @@ public final class ModelVersionsPublishSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ModelVersion/publish.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ModelVersion/publish.json */ /** * Sample code: Publish Workspace Model Version. @@ -24,9 +24,9 @@ public final class ModelVersionsPublishSamples { publishWorkspaceModelVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.modelVersions() .publish("test-rg", "my-aml-workspace", "string", "string", - new DestinationAsset().withRegistryName("string") - .withDestinationName("string") - .withDestinationVersion("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 b21db6a8c2260..bea5e60feb181 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 @@ -27,8 +27,8 @@ public final class OnlineDeploymentsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/KubernetesOnlineDeployment/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/OnlineDeployment/KubernetesOnlineDeployment/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Kubernetes Online Deployment. @@ -41,34 +41,35 @@ public static void createOrUpdateKubernetesOnlineDeployment( .define("testDeploymentName") .withRegion("string") .withExistingOnlineEndpoint("test-rg", "my-aml-workspace", "testEndpointName") - .withProperties(new KubernetesOnlineDeployment().withDescription("string") - .withProperties(mapOf("string", "string")) + .withProperties(new KubernetesOnlineDeployment() .withCodeConfiguration( new CodeConfiguration().withCodeId("fakeTokenPlaceholder").withScoringScript("string")) + .withDescription("string") .withEnvironmentId("string") .withEnvironmentVariables(mapOf("string", "string")) - .withScaleSettings(new DefaultScaleSettings()) - .withRequestSettings(new OnlineRequestSettings().withMaxQueueWait(Duration.parse("PT5M")) - .withRequestTimeout(Duration.parse("PT5M")) - .withMaxConcurrentRequestsPerInstance(1)) - .withModelMountPath("string") + .withProperties(mapOf("string", "string")) .withAppInsightsEnabled(false) + .withInstanceType("string") .withLivenessProbe(new ProbeSettings().withFailureThreshold(1) - .withSuccessThreshold(1) - .withTimeout(Duration.parse("PT5M")) + .withInitialDelay(Duration.parse("PT5M")) .withPeriod(Duration.parse("PT5M")) - .withInitialDelay(Duration.parse("PT5M"))) - .withInstanceType("string") + .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() - .withContainerResourceRequests( - new ContainerResourceSettings().withCpu("\"1\"").withMemory("\"2Gi\"").withGpu("\"1\"")) .withContainerResourceLimits( - new ContainerResourceSettings().withCpu("\"1\"").withMemory("\"2Gi\"").withGpu("\"1\"")))) + new ContainerResourceSettings().withCpu("\"1\"").withGpu("\"1\"").withMemory("\"2Gi\"")) + .withContainerResourceRequests( + new ContainerResourceSettings().withCpu("\"1\"").withGpu("\"1\"").withMemory("\"2Gi\"")))) .withTags(mapOf()) - .withKind("string") .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") .withSku(new Sku().withName("string") .withTier(SkuTier.FREE) .withSize("string") @@ -79,8 +80,8 @@ public static void createOrUpdateKubernetesOnlineDeployment( /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/ManagedOnlineDeployment/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/OnlineDeployment/ManagedOnlineDeployment/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Managed Online Deployment. @@ -93,34 +94,35 @@ public static void createOrUpdateManagedOnlineDeployment( .define("testDeploymentName") .withRegion("string") .withExistingOnlineEndpoint("test-rg", "my-aml-workspace", "testEndpointName") - .withProperties(new ManagedOnlineDeployment().withDescription("string") - .withProperties(mapOf("string", "string")) + .withProperties(new ManagedOnlineDeployment() .withCodeConfiguration( new CodeConfiguration().withCodeId("fakeTokenPlaceholder").withScoringScript("string")) + .withDescription("string") .withEnvironmentId("string") .withEnvironmentVariables(mapOf("string", "string")) - .withScaleSettings(new DefaultScaleSettings()) - .withRequestSettings(new OnlineRequestSettings().withMaxQueueWait(Duration.parse("PT5M")) - .withRequestTimeout(Duration.parse("PT5M")) - .withMaxConcurrentRequestsPerInstance(1)) - .withModelMountPath("string") + .withProperties(mapOf("string", "string")) .withAppInsightsEnabled(false) + .withInstanceType("string") .withLivenessProbe(new ProbeSettings().withFailureThreshold(1) - .withSuccessThreshold(1) - .withTimeout(Duration.parse("PT5M")) + .withInitialDelay(Duration.parse("PT5M")) .withPeriod(Duration.parse("PT5M")) - .withInitialDelay(Duration.parse("PT5M"))) - .withReadinessProbe(new ProbeSettings().withFailureThreshold(30) .withSuccessThreshold(1) - .withTimeout(Duration.parse("PT2S")) + .withTimeout(Duration.parse("PT5M"))) + .withModel("string") + .withModelMountPath("string") + .withReadinessProbe(new ProbeSettings().withFailureThreshold(30) + .withInitialDelay(Duration.parse("PT1S")) .withPeriod(Duration.parse("PT10S")) - .withInitialDelay(Duration.parse("PT1S"))) - .withInstanceType("string") - .withModel("string")) + .withSuccessThreshold(1) + .withTimeout(Duration.parse("PT2S"))) + .withRequestSettings(new OnlineRequestSettings().withMaxConcurrentRequestsPerInstance(1) + .withMaxQueueWait(Duration.parse("PT5M")) + .withRequestTimeout(Duration.parse("PT5M"))) + .withScaleSettings(new DefaultScaleSettings())) .withTags(mapOf()) - .withKind("string") .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") .withSku(new Sku().withName("string") .withTier(SkuTier.FREE) .withSize("string") 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 76577d8486dd4..4d18560f7fc02 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 @@ -10,8 +10,8 @@ public final class OnlineDeploymentsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineDeployment/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/OnlineDeployment/delete.json */ /** * Sample code: Delete Workspace Online Deployment. 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 77f5fa60698bc..ebd79d86430ce 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 @@ -13,8 +13,8 @@ public final class OnlineDeploymentsGetLogsSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/getLogs.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/OnlineDeployment/getLogs.json */ /** * Sample code: Get Online Deployment Logs. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetSamples.java index f883224d2527c..44da5c3900ca8 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 @@ -10,8 +10,8 @@ public final class OnlineDeploymentsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/KubernetesOnlineDeployment/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/OnlineDeployment/KubernetesOnlineDeployment/get.json */ /** * Sample code: Get Kubernetes Online Deployment. @@ -27,8 +27,8 @@ public final class OnlineDeploymentsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/ManagedOnlineDeployment/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/OnlineDeployment/ManagedOnlineDeployment/get.json */ /** * Sample code: Get Managed Online Deployment. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSamples.java index 2327d527e2bd1..f6c7adccd2375 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 @@ -10,8 +10,8 @@ public final class OnlineDeploymentsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/OnlineDeployment/list.json */ /** * Sample code: List Online Deployments. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSkusSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSkusSamples.java index f9c82cad08a9f..514c7d1bd2b2c 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 @@ -10,8 +10,8 @@ public final class OnlineDeploymentsListSkusSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/ManagedOnlineDeployment/listSkus.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/OnlineDeployment/ManagedOnlineDeployment/listSkus.json */ /** * Sample code: List Managed Online Deployment Skus. @@ -27,8 +27,8 @@ public final class OnlineDeploymentsListSkusSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/KubernetesOnlineDeployment/listSkus.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/OnlineDeployment/KubernetesOnlineDeployment/listSkus.json */ /** * Sample code: List Kubernetes Online Deployment Skus. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsUpdateSamples.java index cf33e07fcbeb9..a5057f8b95283 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 @@ -16,8 +16,8 @@ public final class OnlineDeploymentsUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/ManagedOnlineDeployment/update.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/OnlineDeployment/ManagedOnlineDeployment/update.json */ /** * Sample code: Update Managed Online Deployment. @@ -32,18 +32,18 @@ public final class OnlineDeploymentsUpdateSamples { .getValue(); resource.update() .withTags(mapOf()) - .withSku(new PartialSku().withName("string") - .withTier(SkuTier.FREE) - .withSize("string") + .withSku(new PartialSku().withCapacity(1) .withFamily("string") - .withCapacity(1)) + .withName("string") + .withSize("string") + .withTier(SkuTier.FREE)) .apply(); } /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/OnlineDeployment/KubernetesOnlineDeployment/update.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/OnlineDeployment/KubernetesOnlineDeployment/update.json */ /** * Sample code: Update Kubernetes Online Deployment. @@ -58,11 +58,11 @@ public final class OnlineDeploymentsUpdateSamples { .getValue(); resource.update() .withTags(mapOf()) - .withSku(new PartialSku().withName("string") - .withTier(SkuTier.FREE) - .withSize("string") + .withSku(new PartialSku().withCapacity(1) .withFamily("string") - .withCapacity(1)) + .withName("string") + .withSize("string") + .withTier(SkuTier.FREE)) .apply(); } 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 ba5238faf74ac..bb5f209adc839 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 @@ -20,8 +20,8 @@ public final class OnlineEndpointsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/OnlineEndpoint/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Online Endpoint. @@ -34,15 +34,15 @@ public static void createOrUpdateWorkspaceOnlineEndpoint( .define("testEndpointName") .withRegion("string") .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties(new OnlineEndpointProperties().withDescription("string") + .withProperties(new OnlineEndpointProperties().withAuthMode(EndpointAuthMode.AMLTOKEN) + .withDescription("string") .withProperties(mapOf("string", "string")) - .withAuthMode(EndpointAuthMode.AMLTOKEN) .withCompute("string") .withTraffic(mapOf("string", 1))) .withTags(mapOf()) - .withKind("string") .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") .withSku(new Sku().withName("string") .withTier(SkuTier.FREE) .withSize("string") 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 98fe3c6eac61f..f839625f45c35 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 @@ -10,8 +10,8 @@ public final class OnlineEndpointsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/OnlineEndpoint/delete.json */ /** * Sample code: Delete Workspace Online Endpoint. 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 166c01c353343..cf02b87eef798 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 @@ -10,8 +10,8 @@ public final class OnlineEndpointsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/OnlineEndpoint/get.json */ /** * Sample code: Get Workspace Online Endpoint. 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 ced9eb79c1114..dc6feab8380bf 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 @@ -10,8 +10,8 @@ public final class OnlineEndpointsGetTokenSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/getToken.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/OnlineEndpoint/getToken.json */ /** * Sample code: GetToken Workspace Online Endpoint. 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 f588f47ec28c5..5e15963239a5f 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 @@ -10,8 +10,8 @@ public final class OnlineEndpointsListKeysSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/listKeys.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/OnlineEndpoint/listKeys.json */ /** * Sample code: ListKeys Workspace Online Endpoint. 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 c38212d46e73c..732880206b14f 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 @@ -13,8 +13,8 @@ public final class OnlineEndpointsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/OnlineEndpoint/list.json */ /** * Sample code: List Workspace Online Endpoint. 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 02405cfeda2bd..fc00661e36410 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 @@ -13,8 +13,8 @@ public final class OnlineEndpointsRegenerateKeysSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/regenerateKeys.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/OnlineEndpoint/regenerateKeys.json */ /** * Sample code: RegenerateKeys Workspace Online Endpoint. 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 da734f187c6b4..c4d8495c69784 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 @@ -19,8 +19,8 @@ public final class OnlineEndpointsUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/OnlineEndpoint/update.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/OnlineEndpoint/update.json */ /** * Sample code: Update Workspace Online Endpoint. 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 1de8bcc4511a0..2c574afda6b00 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 @@ -10,8 +10,8 @@ public final class OperationsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/operationsList.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/operationsList.json */ /** * Sample code: OperationsList. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java index 7637883c3920b..02f1735c821a6 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,7 +4,7 @@ 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; /** @@ -13,8 +13,8 @@ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/PrivateEndpointConnection/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/PrivateEndpointConnection/createOrUpdate.json */ /** * Sample code: WorkspacePutPrivateEndpointConnection. @@ -27,8 +27,8 @@ public static void workspacePutPrivateEndpointConnection( .define("{privateEndpointConnectionName}") .withExistingWorkspace("rg-1234", "testworkspace") .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) - .withDescription("Auto-Approved")) + 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 b64f4d37ef224..2f720d0e8f6a1 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 @@ -10,15 +10,15 @@ public final class PrivateEndpointConnectionsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/PrivateEndpointConnection/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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}", 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 b137954fedb33..e62eece87fa7b 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 @@ -10,8 +10,8 @@ public final class PrivateEndpointConnectionsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/PrivateEndpointConnection/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/PrivateEndpointConnection/get.json */ /** * Sample code: WorkspaceGetPrivateEndpointConnection. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsListSamples.java index a87e0762b3a80..0ee11a1c943b0 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 @@ -10,8 +10,8 @@ public final class PrivateEndpointConnectionsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/PrivateEndpointConnection/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/PrivateEndpointConnection/list.json */ /** * Sample code: StorageAccountListPrivateEndpointConnections. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcesListSamples.java index 6821d71c24f12..d73315f0e066d 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 @@ -10,8 +10,8 @@ public final class PrivateLinkResourcesListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/PrivateLinkResource/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/PrivateLinkResource/list.json */ /** * Sample code: WorkspaceListPrivateLinkResources. @@ -20,6 +20,6 @@ public final class PrivateLinkResourcesListSamples { */ public static void workspaceListPrivateLinkResources(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.privateLinkResources().listWithResponse("rg-1234", "testworkspace", com.azure.core.util.Context.NONE); + 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/PtuQuotaGetAvailableSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PtuQuotaGetAvailableSamples.java new file mode 100644 index 0000000000000..f9d8ef837cf5c --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PtuQuotaGetAvailableSamples.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 PtuQuota GetAvailable. + */ +public final class PtuQuotaGetAvailableSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/PTUQuota/getAvailable.json + */ + /** + * Sample code: Get available MaaS PTU quota. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + getAvailableMaaSPTUQuota(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.ptuQuotas().getAvailableWithResponse("location", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PtuQuotaListAvailableSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PtuQuotaListAvailableSamples.java new file mode 100644 index 0000000000000..39b941057fd78 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PtuQuotaListAvailableSamples.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 PtuQuota ListAvailable. + */ +public final class PtuQuotaListAvailableSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/PTUQuota/listAvailable.json + */ + /** + * Sample code: List available MaaS PTU quota. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + listAvailableMaaSPTUQuota(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.ptuQuotas().listAvailable("location", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PtuQuotaListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PtuQuotaListSamples.java new file mode 100644 index 0000000000000..09f310990ee89 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PtuQuotaListSamples.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 PtuQuota List. + */ +public final class PtuQuotaListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/PTUQuota/list.json + */ + /** + * Sample code: List MaaS PTU usage and quota. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void + listMaaSPTUUsageAndQuota(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.ptuQuotas().list("location", null, 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 9b662845f9702..ce2c72b0aeb71 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 @@ -10,8 +10,8 @@ public final class QuotasListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Quota/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Quota/list.json */ /** * Sample code: List workspace quotas by VMFamily. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/QuotasUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/QuotasUpdateSamples.java index affcf1a4cfdfd..7271e23bba45d 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 @@ -15,8 +15,8 @@ public final class QuotasUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Quota/update.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Quota/update.json */ /** * Sample code: update quotas. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RaiPoliciesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RaiPoliciesListSamples.java new file mode 100644 index 0000000000000..73a24671e5eca --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RaiPoliciesListSamples.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 RaiPolicies List. + */ +public final class RaiPoliciesListSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Endpoint/RaiPolicy/list.json + */ + /** + * Sample code: List Rai policies. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void listRaiPolicies(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.raiPolicies() + .list("test-rg", "aml-workspace-name", "Azure.OpenAI", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyOperationCreateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyOperationCreateSamples.java new file mode 100644 index 0000000000000..7add485d6a5ad --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyOperationCreateSamples.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.fluent.models.RaiPolicyPropertiesBasicResourceInner; +import com.azure.resourcemanager.machinelearning.models.AllowedContentLevel; +import com.azure.resourcemanager.machinelearning.models.RaiBlocklistConfig; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyContentFilter; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyContentSource; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyMode; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyProperties; +import com.azure.resourcemanager.machinelearning.models.RaiPolicyType; +import java.util.Arrays; + +/** + * Samples for RaiPolicyOperation Create. + */ +public final class RaiPolicyOperationCreateSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Endpoint/RaiPolicy/create.json + */ + /** + * Sample code: Create Rai policy. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void createRaiPolicy(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.raiPolicyOperations() + .create("test-rg", "aml-workspace-name", "Azure.OpenAI", "raiPolicyName", + new RaiPolicyPropertiesBasicResourceInner().withProperties(new RaiPolicyProperties() + .withBasePolicyName("112") + .withCompletionBlocklists( + Arrays.asList(new RaiBlocklistConfig().withBlocking(false).withBlocklistName("blocklistName"))) + .withContentFilters( + Arrays.asList(new RaiPolicyContentFilter().withAllowedContentLevel(AllowedContentLevel.LOW) + .withBlocking(false) + .withEnabled(false) + .withName("policyName") + .withSource(RaiPolicyContentSource.PROMPT))) + .withMode(RaiPolicyMode.BLOCKING) + .withPromptBlocklists( + Arrays.asList(new RaiBlocklistConfig().withBlocking(false).withBlocklistName("blocklistName"))) + .withType(RaiPolicyType.SYSTEM_MANAGED)), + null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyOperationDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyOperationDeleteSamples.java new file mode 100644 index 0000000000000..36affdb399144 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyOperationDeleteSamples.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 RaiPolicyOperation Delete. + */ +public final class RaiPolicyOperationDeleteSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Endpoint/RaiPolicy/delete.json + */ + /** + * Sample code: Delete Rai policy. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void deleteRaiPolicy(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.raiPolicyOperations() + .delete("test-rg", "aml-workspace-name", "Azure.OpenAI", "raiPolicyName", null, + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyOperationGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyOperationGetSamples.java new file mode 100644 index 0000000000000..28931767758cb --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/RaiPolicyOperationGetSamples.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 RaiPolicyOperation Get. + */ +public final class RaiPolicyOperationGetSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Endpoint/RaiPolicy/get.json + */ + /** + * Sample code: Get Rai policy. + * + * @param manager Entry point to MachineLearningManager. + */ + public static void getRaiPolicy(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { + manager.raiPolicyOperations() + .getWithResponse("test-rg", "aml-workspace-name", "Azure.OpenAI", "raiPolicyName", + 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 index 97c56eab19dfd..59eb7605120a9 100644 --- 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 @@ -31,8 +31,8 @@ public final class RegistriesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/createOrUpdate-SystemCreated.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registries/createOrUpdate-SystemCreated.json */ /** * Sample code: CreateOrUpdate Registry with system created accounts. @@ -86,8 +86,8 @@ public static void createOrUpdateRegistryWithSystemCreatedAccounts( /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/createOrUpdate-UserCreated.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registries/createOrUpdate-UserCreated.json */ /** * Sample code: CreateOrUpdate Registry with user created accounts. 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 index 605b18f560ce1..1da42b71ffce6 100644 --- 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 @@ -10,8 +10,8 @@ public final class RegistriesDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registries/delete.json */ /** * Sample code: Delete Registry. 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 index 5ac1ac1933028..deb9c0875241c 100644 --- 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 @@ -10,8 +10,8 @@ public final class RegistriesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/get-UserCreated.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registries/get-UserCreated.json */ /** * Sample code: Get Registry with user created accounts. @@ -25,8 +25,8 @@ public final class RegistriesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/get-SystemCreated.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registries/get-SystemCreated.json */ /** * Sample code: Get Registry with system created accounts. 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 index 510ee99393b7e..394e378a90313 100644 --- 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 @@ -10,8 +10,8 @@ public final class RegistriesListByResourceGroupSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/list-UserCreated.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registries/list-UserCreated.json */ /** * Sample code: List registries with user created accounts. @@ -25,8 +25,8 @@ public static void listRegistriesWithUserCreatedAccounts( /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/list-SystemCreated.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registries/list-SystemCreated.json */ /** * Sample code: List registries with system created accounts. 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 index 45d93209a5ce4..36b9f99757072 100644 --- 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 @@ -10,8 +10,8 @@ public final class RegistriesListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/listBySubscription.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registries/listBySubscription.json */ /** * Sample code: List registries by subscription. 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 index fe5143d1e173f..2716ad6258735 100644 --- 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 @@ -32,8 +32,8 @@ public final class RegistriesRemoveRegionsSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/removeRegions.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registries/removeRegions.json */ /** * Sample code: Remove regions from registry. 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 index 32fc0e4361f42..e438501cefc4e 100644 --- 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 @@ -19,8 +19,8 @@ public final class RegistriesUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/update-UserCreated.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registries/update-UserCreated.json */ /** * Sample code: Update Registry with user created accounts. @@ -36,18 +36,18 @@ public static void updateRegistryWithUserCreatedAccounts( .withTags(mapOf()) .withIdentity(new RegistryPartialManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) - .withSku(new PartialSku().withName("string") - .withTier(SkuTier.BASIC) - .withSize("string") + .withSku(new PartialSku().withCapacity(1) .withFamily("string") - .withCapacity(1)) + .withName("string") + .withSize("string") + .withTier(SkuTier.BASIC)) .apply(); } /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registries/update-SystemCreated.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registries/update-SystemCreated.json */ /** * Sample code: Update Registry with system created accounts. @@ -64,11 +64,11 @@ public static void updateRegistryWithSystemCreatedAccounts( .withIdentity( new RegistryPartialManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) - .withSku(new PartialSku().withName("string") - .withTier(SkuTier.BASIC) - .withSize("string") + .withSku(new PartialSku().withCapacity(1) .withFamily("string") - .withCapacity(1)) + .withName("string") + .withSize("string") + .withTier(SkuTier.BASIC)) .apply(); } 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 index 3948fe8e66d10..e48c0c8f8ee5b 100644 --- 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 @@ -15,8 +15,8 @@ public final class RegistryCodeContainersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeContainer/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/CodeContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Code Container. 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 index fddf1645491f5..88216ddc76733 100644 --- 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 @@ -10,8 +10,8 @@ public final class RegistryCodeContainersDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeContainer/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/CodeContainer/delete.json */ /** * Sample code: Delete Registry Code Container. 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 index 55c87a4fd3cda..02a72a263df97 100644 --- 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 @@ -10,8 +10,8 @@ public final class RegistryCodeContainersGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeContainer/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/CodeContainer/get.json */ /** * Sample code: Get Registry Code Container. 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 index c93e323011972..497601f575404 100644 --- 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 @@ -10,8 +10,8 @@ public final class RegistryCodeContainersListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeContainer/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/CodeContainer/list.json */ /** * Sample code: List Registry Code Container. 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 index 5797cfd6351e2..1a9a6af06bd3d 100644 --- 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 @@ -13,8 +13,8 @@ public final class RegistryCodeVersionsCreateOrGetStartPendingUploadSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeVersion/createOrGetStartPendingUpload.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/CodeVersion/createOrGetStartPendingUpload.json */ /** * Sample code: CreateOrGetStartPendingUpload Registry Code Version. 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 index 81b813de1f168..d397357e462bc 100644 --- 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 @@ -15,8 +15,8 @@ public final class RegistryCodeVersionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeVersion/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/CodeVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Code Version. @@ -28,8 +28,8 @@ public final class RegistryCodeVersionsCreateOrUpdateSamples { manager.registryCodeVersions() .createOrUpdate("test-rg", "my-aml-registry", "string", "string", new CodeVersionInner().withProperties(new CodeVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) .withCodeUri("fakeTokenPlaceholder")), com.azure.core.util.Context.NONE); 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 index 06bf92b4951fc..91340e12e26b5 100644 --- 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 @@ -10,8 +10,8 @@ public final class RegistryCodeVersionsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeVersion/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/CodeVersion/delete.json */ /** * Sample code: Delete Registry Code Version. 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 index 03d9147a92f57..af39be31b36be 100644 --- 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 @@ -10,8 +10,8 @@ public final class RegistryCodeVersionsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeVersion/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/CodeVersion/get.json */ /** * Sample code: Get Registry Code Version. 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 index 6cd2872433f7b..d1c0acd79f713 100644 --- 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 @@ -10,8 +10,8 @@ public final class RegistryCodeVersionsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/CodeVersion/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/CodeVersion/list.json */ /** * Sample code: List Registry Code Version. 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 index ae9ac890e6b78..fa179254bae36 100644 --- 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 @@ -15,8 +15,8 @@ public final class RegistryComponentContainersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentContainer/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/ComponentContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Component Container. @@ -29,8 +29,8 @@ public static void createOrUpdateRegistryComponentContainer( .createOrUpdate("test-rg", "my-aml-registry", "string", new ComponentContainerInner() .withProperties(new ComponentContainerProperties().withDescription("string") - .withTags(mapOf("string", "string")) - .withProperties(mapOf("string", "string"))), + .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string"))), com.azure.core.util.Context.NONE); } 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 index 82604e36820cd..56381aeab0ae8 100644 --- 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 @@ -10,8 +10,8 @@ public final class RegistryComponentContainersDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentContainer/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/ComponentContainer/delete.json */ /** * Sample code: Delete Registry Component Container. 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 index a69d3dc483955..b65bb700b0007 100644 --- 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 @@ -10,8 +10,8 @@ public final class RegistryComponentContainersGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentContainer/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/ComponentContainer/get.json */ /** * Sample code: Get Registry Component Container. 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 index 4039f905f383f..009f4e4283f17 100644 --- 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 @@ -10,8 +10,8 @@ public final class RegistryComponentContainersListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentContainer/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/ComponentContainer/list.json */ /** * Sample code: List Registry Component Container. 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 index 9daa8bc433dd4..5d25c5cb08e63 100644 --- 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 @@ -18,8 +18,8 @@ public final class RegistryComponentVersionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentVersion/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/ComponentVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Component Version. @@ -31,8 +31,8 @@ public static void createOrUpdateRegistryComponentVersion( manager.registryComponentVersions() .createOrUpdate("test-rg", "my-aml-registry", "string", "string", new ComponentVersionInner().withProperties(new ComponentVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) .withComponentSpec(SerializerFactory.createDefaultManagementSerializerAdapter() .deserialize("{\"8ced901b-d826-477d-bfef-329da9672513\":null}", Object.class, 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 index ab5498d5b70c4..c0ce1682ece30 100644 --- 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 @@ -10,8 +10,8 @@ public final class RegistryComponentVersionsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentVersion/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/ComponentVersion/delete.json */ /** * Sample code: Delete Registry Component Version. 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 index 79cfeb53d1d43..ca7a63e5f51c1 100644 --- 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 @@ -10,8 +10,8 @@ public final class RegistryComponentVersionsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentVersion/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/ComponentVersion/get.json */ /** * Sample code: Get Registry Component Version. 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 index 2ace72a2c3289..3cf51e9f69d60 100644 --- 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 @@ -10,8 +10,8 @@ public final class RegistryComponentVersionsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ComponentVersion/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/ComponentVersion/list.json */ /** * Sample code: List Registry Component Version. 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 index f95a428f5c200..81450d0a77ee3 100644 --- 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 @@ -16,8 +16,8 @@ public final class RegistryDataContainersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataContainer/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/DataContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Data Container. @@ -29,8 +29,8 @@ public final class RegistryDataContainersCreateOrUpdateSamples { manager.registryDataContainers() .createOrUpdate("test-rg", "registryName", "string", new DataContainerInner().withProperties(new DataContainerProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsArchived(false) .withDataType(DataType.URI_FOLDER)), com.azure.core.util.Context.NONE); 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 index b18b5baab55a8..18a613abad816 100644 --- 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 @@ -10,8 +10,8 @@ public final class RegistryDataContainersDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataContainer/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/DataContainer/delete.json */ /** * Sample code: Delete Registry Data Container. 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 index b2c13cde5452d..481d0890ba3a7 100644 --- 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 @@ -10,8 +10,8 @@ public final class RegistryDataContainersGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataContainer/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/DataContainer/get.json */ /** * Sample code: Get Registry Data Container. 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 index 0a4362fe4de40..4af91eea7ef90 100644 --- 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 @@ -12,8 +12,8 @@ public final class RegistryDataContainersListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataContainer/registryList.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/DataContainer/registryList.json */ /** * Sample code: RegistryList Registry Data Container. 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 index 8f77dd21585b3..4b8c7949f0d9d 100644 --- 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 @@ -12,8 +12,8 @@ public final class RegistryDataReferencesGetBlobReferenceSasSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/DataReference/getBlobReferenceSAS.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/DataReference/getBlobReferenceSAS.json */ /** * Sample code: GetBlobReferenceSAS Data Reference. 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 index c54d42479df17..dcdc7ac27ff15 100644 --- 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 @@ -13,8 +13,8 @@ public final class RegistryDataVersionsCreateOrGetStartPendingUploadSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataVersionBase/createOrGetStartPendingUpload.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/DataVersionBase/createOrGetStartPendingUpload.json */ /** * Sample code: CreateOrGetStartPendingUpload Registry Data Version Base. 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 index 576d7f848fa82..dbd85d8532be8 100644 --- 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 @@ -16,8 +16,8 @@ public final class RegistryDataVersionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataVersionBase/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/DataVersionBase/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Data Version Base. @@ -29,10 +29,10 @@ public static void createOrUpdateRegistryDataVersionBase( manager.registryDataVersions() .createOrUpdate("test-rg", "registryName", "string", "string", new DataVersionBaseInner().withProperties(new MLTableData().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) - .withIsArchived(false) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) + .withIsArchived(false) .withDataUri("string") .withReferencedUris(Arrays.asList("string"))), com.azure.core.util.Context.NONE); 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 index b7ce0a9f75cf9..00de518b53464 100644 --- 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 @@ -10,8 +10,8 @@ public final class RegistryDataVersionsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataVersionBase/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/DataVersionBase/delete.json */ /** * Sample code: Delete Registry Data Version Base. 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 index a5a3dbcbfda96..0aaca559e163b 100644 --- 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 @@ -10,8 +10,8 @@ public final class RegistryDataVersionsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataVersionBase/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/DataVersionBase/get.json */ /** * Sample code: Get Registry Data Version Base. 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 index dc192c672fb8b..49641b7cb5040 100644 --- 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 @@ -12,8 +12,8 @@ public final class RegistryDataVersionsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/DataVersionBase/registryList.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/DataVersionBase/registryList.json */ /** * Sample code: RegistryList Registry Data Version Base. 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 index 518e85b26ba0b..d3dd1def08a8a 100644 --- 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 @@ -15,8 +15,8 @@ public final class RegistryEnvironmentContainersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentContainer/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/EnvironmentContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Environment Container. @@ -29,9 +29,9 @@ public static void createOrUpdateRegistryEnvironmentContainer( .createOrUpdate("testrg123", "testregistry", "testEnvironment", new EnvironmentContainerInner().withProperties(new EnvironmentContainerProperties() .withDescription("string") - .withTags( - mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) .withProperties( + mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) + .withTags( mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string"))), com.azure.core.util.Context.NONE); } 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 index c763ae8238714..6b22d55a1a050 100644 --- 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 @@ -10,8 +10,8 @@ public final class RegistryEnvironmentContainersDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentContainer/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/EnvironmentContainer/delete.json */ /** * Sample code: Delete Registry Environment Container. 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 index 4544a14f3b796..828724b9c9729 100644 --- 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 @@ -10,8 +10,8 @@ public final class RegistryEnvironmentContainersGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentContainer/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/EnvironmentContainer/get.json */ /** * Sample code: Get Registry Environment Container. 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 index 8c55031c2ce86..1aa67e25b5661 100644 --- 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 @@ -10,8 +10,8 @@ public final class RegistryEnvironmentContainersListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentContainer/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/EnvironmentContainer/list.json */ /** * Sample code: List Registry Environment Container. 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 index f8d55faf952dc..2012a094f7719 100644 --- 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 @@ -18,8 +18,8 @@ public final class RegistryEnvironmentVersionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentVersion/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/EnvironmentVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Environment Version. @@ -32,14 +32,14 @@ public static void createOrUpdateRegistryEnvironmentVersion( .createOrUpdate("test-rg", "my-aml-registry", "string", "string", new EnvironmentVersionInner().withProperties(new EnvironmentVersionProperties() .withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) - .withImage("docker.io/tensorflow/serving:latest") - .withCondaFile("string") .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)) 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 index 92d4b8e340261..c786d7df5d008 100644 --- 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 @@ -10,8 +10,8 @@ public final class RegistryEnvironmentVersionsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentVersion/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/EnvironmentVersion/delete.json */ /** * Sample code: Delete Registry Environment Version. 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 index 21b46cad644b3..83a040b03712e 100644 --- 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 @@ -10,8 +10,8 @@ public final class RegistryEnvironmentVersionsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentVersion/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/EnvironmentVersion/get.json */ /** * Sample code: Get Registry Environment Version. 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 index 3fc953fcd1880..d3e3c268e0fd1 100644 --- 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 @@ -10,8 +10,8 @@ public final class RegistryEnvironmentVersionsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/EnvironmentVersion/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/EnvironmentVersion/list.json */ /** * Sample code: List Registry Environment Version. 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 index b6531faab826a..9ebcfdc0bb49a 100644 --- 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 @@ -15,8 +15,8 @@ public final class RegistryModelContainersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelContainer/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/ModelContainer/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Model Container. 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 index 08663fd5e9e8c..cdb2d363cc745 100644 --- 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 @@ -10,8 +10,8 @@ public final class RegistryModelContainersDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelContainer/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/ModelContainer/delete.json */ /** * Sample code: Delete Registry Model Container. 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 index d0b5913c3d98d..7068d87ebbf19 100644 --- 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 @@ -10,8 +10,8 @@ public final class RegistryModelContainersGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelContainer/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/ModelContainer/get.json */ /** * Sample code: Get Registry Model Container. 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 index 5db8eb515db44..a9240289b050a 100644 --- 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 @@ -10,8 +10,8 @@ public final class RegistryModelContainersListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelContainer/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/ModelContainer/list.json */ /** * Sample code: List Registry Model Container. 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 index f8364e1a447bd..942d5070ea965 100644 --- 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 @@ -13,8 +13,8 @@ public final class RegistryModelVersionsCreateOrGetStartPendingUploadSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelVersion/createOrGetStartPendingUpload.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/ModelVersion/createOrGetStartPendingUpload.json */ /** * Sample code: CreateOrGetStartPendingUpload Registry Model Version. 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 index b203ed258ad9b..56dfd0d499f20 100644 --- 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 @@ -16,8 +16,8 @@ public final class RegistryModelVersionsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelVersion/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/ModelVersion/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Registry Model Version. @@ -29,8 +29,8 @@ public final class RegistryModelVersionsCreateOrUpdateSamples { manager.registryModelVersions() .createOrUpdate("test-rg", "my-aml-registry", "string", "string", new ModelVersionInner().withProperties(new ModelVersionProperties().withDescription("string") - .withTags(mapOf("string", "string")) .withProperties(mapOf("string", "string")) + .withTags(mapOf("string", "string")) .withIsAnonymous(false) .withFlavors(mapOf("string", new FlavorData().withData(mapOf("string", "string")))) .withModelType("CustomModel") 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 index e58641c85172a..be99d336b70da 100644 --- 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 @@ -10,8 +10,8 @@ public final class RegistryModelVersionsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelVersion/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/ModelVersion/delete.json */ /** * Sample code: Delete Registry Model Version. 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 index d53c83a659579..fbc3792c43ed5 100644 --- 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 @@ -10,8 +10,8 @@ public final class RegistryModelVersionsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelVersion/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/ModelVersion/get.json */ /** * Sample code: Get Registry Model Version. 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 index c9c644f3b10d9..439a38f342d79 100644 --- 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 @@ -10,8 +10,8 @@ public final class RegistryModelVersionsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Registry/ModelVersion/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Registry/ModelVersion/list.json */ /** * Sample code: List Registry Model Version. 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 cc15538341545..5e400f1ca544a 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 @@ -19,8 +19,8 @@ public final class SchedulesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Schedule/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Schedule/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Schedule. @@ -33,18 +33,18 @@ public static void createOrUpdateSchedule(com.azure.resourcemanager.machinelearn .define("string") .withExistingWorkspace("test-rg", "my-aml-workspace") .withProperties(new ScheduleProperties().withDescription("string") - .withTags(mapOf("string", "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")) - .withAction(new EndpointScheduleAction() - .withEndpointInvocationDefinition(SerializerFactory.createDefaultManagementSerializerAdapter() - .deserialize("{\"9965593e-526f-4b89-bb36-761138cf2794\":null}", Object.class, - SerializerEncoding.JSON)))) + .withExpression("string"))) .create(); } 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 531602b888c27..b1dd84c232f32 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 @@ -10,8 +10,8 @@ public final class SchedulesDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Schedule/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Schedule/delete.json */ /** * Sample code: Delete Schedule. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesGetSamples.java index bac015b98e508..7e8faa8864778 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 @@ -10,8 +10,8 @@ public final class SchedulesGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Schedule/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Schedule/get.json */ /** * Sample code: Get Schedule. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesListSamples.java index f8aa057f06b00..7a8bb6a943a20 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 @@ -10,8 +10,8 @@ public final class SchedulesListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Schedule/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Schedule/list.json */ /** * Sample code: List Schedules. 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 index 21d2d0b4525d0..b20d624c76b7a 100644 --- 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 @@ -5,6 +5,7 @@ package com.azure.resourcemanager.machinelearning.generated; import com.azure.resourcemanager.machinelearning.models.ContentSafety; +import com.azure.resourcemanager.machinelearning.models.ContentSafetyLevel; import com.azure.resourcemanager.machinelearning.models.ContentSafetyStatus; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; @@ -23,8 +24,8 @@ public final class ServerlessEndpointsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ServerlessEndpoint/createOrUpdate.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ServerlessEndpoint/createOrUpdate.json */ /** * Sample code: CreateOrUpdate Workspace Serverless Endpoint. @@ -37,14 +38,14 @@ public static void createOrUpdateWorkspaceServerlessEndpoint( .define("string") .withRegion("string") .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties( - new ServerlessEndpointProperties().withModelSettings(new ModelSettings().withModelId("string")) - .withAuthMode(ServerlessInferenceEndpointAuthMode.KEY) - .withContentSafety(new ContentSafety().withContentSafetyStatus(ContentSafetyStatus.ENABLED))) + .withProperties(new ServerlessEndpointProperties().withAuthMode(ServerlessInferenceEndpointAuthMode.KEY) + .withContentSafety(new ContentSafety().withContentSafetyLevel(ContentSafetyLevel.BLOCKING) + .withContentSafetyStatus(ContentSafetyStatus.ENABLED)) + .withModelSettings(new ModelSettings().withModelId("string"))) .withTags(mapOf()) - .withKind("string") .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) + .withKind("string") .withSku(new Sku().withName("string") .withTier(SkuTier.STANDARD) .withSize("string") 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 index 9451dd9810cc3..da9a1314fb3c0 100644 --- 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 @@ -10,8 +10,8 @@ public final class ServerlessEndpointsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ServerlessEndpoint/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ServerlessEndpoint/delete.json */ /** * Sample code: Delete Workspace Serverless Endpoint. 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 index 55332d3421430..db50bf7582f54 100644 --- 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 @@ -10,8 +10,8 @@ public final class ServerlessEndpointsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ServerlessEndpoint/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ServerlessEndpoint/get.json */ /** * Sample code: Get Workspace Serverless Endpoint. 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 index e1ae216c6ac79..99aa2270970eb 100644 --- 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 @@ -10,8 +10,8 @@ public final class ServerlessEndpointsListKeysSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ServerlessEndpoint/listKeys.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ServerlessEndpoint/listKeys.json */ /** * Sample code: ListKeys Workspace Serverless Endpoint. 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 index d0fee73469a57..e5608b946bf00 100644 --- 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 @@ -10,8 +10,8 @@ public final class ServerlessEndpointsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ServerlessEndpoint/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ServerlessEndpoint/list.json */ /** * Sample code: List Workspace Serverless Endpoint. 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 index 252985f25b8e9..aa4844eb45bd4 100644 --- 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 @@ -13,8 +13,8 @@ public final class ServerlessEndpointsRegenerateKeysSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ServerlessEndpoint/regenerateKeys.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ServerlessEndpoint/regenerateKeys.json */ /** * Sample code: RegenerateKeys Workspace Serverless Endpoint. 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 index 4d9507a9342e1..e0741ceadcd2f 100644 --- 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 @@ -21,8 +21,8 @@ public final class ServerlessEndpointsUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/ServerlessEndpoint/update.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/ServerlessEndpoint/update.json */ /** * Sample code: Update Workspace Serverless Endpoint. @@ -36,15 +36,15 @@ public static void updateWorkspaceServerlessEndpoint( .getValue(); resource.update() .withTags(mapOf()) - .withSku(new PartialSku().withName("string") - .withTier(SkuTier.PREMIUM) - .withSize("string") - .withFamily("string") - .withCapacity(1)) .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.PREMIUM)) .apply(); } 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 d490829392256..1d2cb88a1498a 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 @@ -10,8 +10,8 @@ public final class UsagesListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Usage/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Usage/list.json */ /** * Sample code: List Usages. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizesListSamples.java index 578235e20d63d..6c9d5d80bd174 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 @@ -10,8 +10,8 @@ public final class VirtualMachineSizesListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/VirtualMachineSize/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/VirtualMachineSize/list.json */ /** * Sample code: List VM Sizes. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsCreateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsCreateSamples.java index f06e496ea0204..5f214905bd5e8 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,6 +6,7 @@ import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; import com.azure.resourcemanager.machinelearning.models.NoneAuthTypeWorkspaceConnectionProperties; +import java.time.OffsetDateTime; /** * Samples for WorkspaceConnections Create. @@ -13,8 +14,8 @@ public final class WorkspaceConnectionsCreateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/WorkspaceConnection/create.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/create.json */ /** * Sample code: CreateWorkspaceConnection. @@ -28,6 +29,7 @@ public final class WorkspaceConnectionsCreateSamples { .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(); } 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 99e07c7030e3f..d1b23c0a51d4a 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 @@ -10,8 +10,8 @@ public final class WorkspaceConnectionsDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/WorkspaceConnection/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/delete.json */ /** * Sample code: DeleteWorkspaceConnection. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsGetSamples.java index 2f8139326149e..8dfcec4d36669 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 @@ -10,8 +10,8 @@ public final class WorkspaceConnectionsGetSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/WorkspaceConnection/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/get.json */ /** * Sample code: GetWorkspaceConnection. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListSamples.java index 54c33bad1de89..74b3656cd64dd 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 @@ -10,8 +10,8 @@ public final class WorkspaceConnectionsListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/WorkspaceConnection/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/list.json */ /** * Sample code: ListWorkspaceConnections. @@ -21,7 +21,7 @@ public final class WorkspaceConnectionsListSamples { public static void listWorkspaceConnections(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { manager.workspaceConnections() - .list("resourceGroup-1", "workspace-1", "www.facebook.com", "ContainerRegistry", + .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 index 7c48c51c1dec4..ab59e60ab4590 100644 --- 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 @@ -10,8 +10,8 @@ public final class WorkspaceConnectionsListSecretsSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/WorkspaceConnection/listSecrets.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceConnection/listSecrets.json */ /** * Sample code: GetWorkspaceConnection. 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..a6103da1527f4 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsTestConnectionSamples.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.machinelearning.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/2025-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..a1fc31597fb23 --- /dev/null +++ b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsUpdateSamples.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.AccessKeyAuthTypeWorkspaceConnectionProperties; +import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; +import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionAccessKey; +import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2BasicResource; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for WorkspaceConnections Update. + */ +public final class WorkspaceConnectionsUpdateSamples { + /* + * x-ms-original-file: + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-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) { + WorkspaceConnectionPropertiesV2BasicResource resource = manager.workspaceConnections() + .getWithResponse("test-rg", "workspace-1", "connection-1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties( + new AccessKeyAuthTypeWorkspaceConnectionProperties().withCategory(ConnectionCategory.ADLSGEN2) + .withExpiryTime(OffsetDateTime.parse("2020-01-01T00:00:00Z")) + .withMetadata(mapOf()) + .withTarget("some_string") + .withCredentials(new WorkspaceConnectionAccessKey().withAccessKeyId("fakeTokenPlaceholder") + .withSecretAccessKey("fakeTokenPlaceholder"))) + .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/WorkspaceFeaturesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceFeaturesListSamples.java index a1437795cee49..e62e8b5fb8c69 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 @@ -10,8 +10,8 @@ public final class WorkspaceFeaturesListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/WorkspaceFeature/list.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/WorkspaceFeature/list.json */ /** * Sample code: List Workspace features. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesCreateOrUpdateSamples.java index 6e450329fdb26..3e22d0f42d4a1 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,13 +4,13 @@ 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; @@ -23,8 +23,8 @@ public final class WorkspacesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/create.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/create.json */ /** * Sample code: Create Workspace. @@ -41,29 +41,29 @@ public static void createWorkspace(com.azure.resourcemanager.machinelearning.Mac .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") + .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") - .withIdentityClientId(""))) + .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") - .withGroupId("Sql") .withRequestMessage("Please approve") - .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED))) + .withStatus(EndpointServiceConnectionStatus.APPROVED))) + .withStorageAccount( + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccount") .create(); } 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 785fbd3e9ca72..1c92d4d630e9d 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 @@ -10,8 +10,8 @@ public final class WorkspacesDeleteSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/delete.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/delete.json */ /** * Sample code: Delete Workspace. 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 d2af3a41e6c00..31057adc168eb 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 @@ -15,8 +15,8 @@ public final class WorkspacesDiagnoseSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/diagnose.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/diagnose.json */ /** * Sample code: Diagnose Workspace. @@ -26,15 +26,16 @@ public final class WorkspacesDiagnoseSamples { 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())), + 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); } 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 7ada38a5bcc37..5bd09bb74f406 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 @@ -10,8 +10,8 @@ public final class WorkspacesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/get.json */ /** * Sample code: Get Workspace. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListByResourceGroupSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListByResourceGroupSamples.java index d9ef531759b2a..72dd5d0b5f53d 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 @@ -10,8 +10,8 @@ public final class WorkspacesListByResourceGroupSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/listByResourceGroup.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/listByResourceGroup.json */ /** * Sample code: Get Workspaces by Resource Group. @@ -20,6 +20,6 @@ public final class WorkspacesListByResourceGroupSamples { */ public static void getWorkspacesByResourceGroup(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaces().listByResourceGroup("workspace-1234", null, com.azure.core.util.Context.NONE); + 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 f40eacb0c1725..287e2e1616317 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 @@ -10,8 +10,8 @@ public final class WorkspacesListKeysSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/listKeys.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/listKeys.json */ /** * Sample code: List Workspace Keys. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListNotebookAccessTokenSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListNotebookAccessTokenSamples.java index 1d4294bdfb105..f599c079f2310 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 @@ -10,8 +10,8 @@ public final class WorkspacesListNotebookAccessTokenSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/listNotebookAccessToken.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/listNotebookAccessToken.json */ /** * Sample code: List Workspace Keys. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListNotebookKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListNotebookKeysSamples.java index b59fc17ce7c2b..ab4c849a6dbda 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 @@ -10,8 +10,8 @@ public final class WorkspacesListNotebookKeysSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Notebook/listKeys.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Notebook/listKeys.json */ /** * Sample code: List Workspace Keys. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListOutboundNetworkDependenciesEndpointsSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListOutboundNetworkDependenciesEndpointsSamples.java index 30c9aae061c1c..04460b31ab57a 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 @@ -10,8 +10,8 @@ public final class WorkspacesListOutboundNetworkDependenciesEndpointsSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/ExternalFQDN/get.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/ExternalFQDN/get.json */ /** * Sample code: ListOutboundNetworkDependenciesEndpoints. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListSamples.java index 3f53b0bfd5bdb..998d031bd6951 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 @@ -10,8 +10,8 @@ public final class WorkspacesListSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/listBySubscription.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/listBySubscription.json */ /** * Sample code: Get Workspaces by subscription. @@ -20,6 +20,6 @@ public final class WorkspacesListSamples { */ public static void getWorkspacesBySubscription(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaces().list(null, com.azure.core.util.Context.NONE); + 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 01e342c2fc7be..3fdc0a2a40606 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 @@ -10,8 +10,8 @@ public final class WorkspacesListStorageAccountKeysSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/listStorageAccountKeys.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/listStorageAccountKeys.json */ /** * Sample code: List Workspace Keys. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesPrepareNotebookSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesPrepareNotebookSamples.java index 269407da1cc2d..6c218f32e692a 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 @@ -10,8 +10,8 @@ public final class WorkspacesPrepareNotebookSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Notebook/prepare.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Notebook/prepare.json */ /** * Sample code: Prepare Notebook. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesResyncKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesResyncKeysSamples.java index dd194c1daed9e..82ee114320821 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 @@ -10,8 +10,8 @@ public final class WorkspacesResyncKeysSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/resyncKeys.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/resyncKeys.json */ /** * Sample code: Resync Workspace Keys. diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesUpdateSamples.java index 5747af6e63e07..5cf0a0c051caf 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,7 +4,7 @@ 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; /** @@ -13,8 +13,8 @@ public final class WorkspacesUpdateSamples { /* * x-ms-original-file: - * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2024-04-01/ - * examples/Workspace/update.json + * specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2025-01-01- + * preview/examples/Workspace/update.json */ /** * Sample code: Update Workspace. @@ -28,7 +28,7 @@ public static void updateWorkspace(com.azure.resourcemanager.machinelearning.Mac resource.update() .withDescription("new description") .withFriendlyName("New friendly name") - .withPublicNetworkAccess(PublicNetworkAccess.DISABLED) + .withPublicNetworkAccess(PublicNetworkAccessType.DISABLED) .apply(); } } diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AadAuthTypeWorkspaceConnectionPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AadAuthTypeWorkspaceConnectionPropertiesTests.java deleted file mode 100644 index a3381403e3177..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AadAuthTypeWorkspaceConnectionPropertiesTests.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.AadAuthTypeWorkspaceConnectionProperties; -import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class AadAuthTypeWorkspaceConnectionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AadAuthTypeWorkspaceConnectionProperties model = BinaryData.fromString( - "{\"authType\":\"AAD\",\"category\":\"MySql\",\"createdByWorkspaceArmId\":\"dixqbo\",\"expiryTime\":\"2021-04-26T10:17:01Z\",\"group\":\"NoSQL\",\"isSharedToAll\":false,\"target\":\"egatxgrznm\",\"metadata\":{\"bmgjymncjc\":\"mtsdixchwk\",\"cqzoofjnqjsve\":\"gair\"},\"sharedUserList\":[\"htleberpyljek\",\"fqnwjjqx\",\"wkdnjrxgkrhwiehy\"],\"value\":\"nowawonoehrguqlh\",\"valueFormat\":\"JSON\"}") - .toObject(AadAuthTypeWorkspaceConnectionProperties.class); - Assertions.assertEquals(ConnectionCategory.MY_SQL, model.category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-26T10:17:01Z"), model.expiryTime()); - Assertions.assertEquals(false, model.isSharedToAll()); - Assertions.assertEquals("egatxgrznm", model.target()); - Assertions.assertEquals("mtsdixchwk", model.metadata().get("bmgjymncjc")); - Assertions.assertEquals("htleberpyljek", model.sharedUserList().get(0)); - Assertions.assertEquals("nowawonoehrguqlh", model.value()); - Assertions.assertEquals(ValueFormat.JSON, model.valueFormat()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AadAuthTypeWorkspaceConnectionProperties model - = new AadAuthTypeWorkspaceConnectionProperties().withCategory(ConnectionCategory.MY_SQL) - .withExpiryTime(OffsetDateTime.parse("2021-04-26T10:17:01Z")) - .withIsSharedToAll(false) - .withTarget("egatxgrznm") - .withMetadata(mapOf("bmgjymncjc", "mtsdixchwk", "cqzoofjnqjsve", "gair")) - .withSharedUserList(Arrays.asList("htleberpyljek", "fqnwjjqx", "wkdnjrxgkrhwiehy")) - .withValue("nowawonoehrguqlh") - .withValueFormat(ValueFormat.JSON); - model = BinaryData.fromObject(model).toObject(AadAuthTypeWorkspaceConnectionProperties.class); - Assertions.assertEquals(ConnectionCategory.MY_SQL, model.category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-26T10:17:01Z"), model.expiryTime()); - Assertions.assertEquals(false, model.isSharedToAll()); - Assertions.assertEquals("egatxgrznm", model.target()); - Assertions.assertEquals("mtsdixchwk", model.metadata().get("bmgjymncjc")); - Assertions.assertEquals("htleberpyljek", model.sharedUserList().get(0)); - Assertions.assertEquals("nowawonoehrguqlh", model.value()); - Assertions.assertEquals(ValueFormat.JSON, model.valueFormat()); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/AcrDetailsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AcrDetailsTests.java deleted file mode 100644 index 5923d941ff5bf..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AcrDetailsTests.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.AcrDetails; -import com.azure.resourcemanager.machinelearning.models.ArmResourceId; -import com.azure.resourcemanager.machinelearning.models.SystemCreatedAcrAccount; -import com.azure.resourcemanager.machinelearning.models.UserCreatedAcrAccount; -import org.junit.jupiter.api.Assertions; - -public final class AcrDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AcrDetails model = BinaryData.fromString( - "{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"rgdtpeqnacyheqw\",\"acrAccountSku\":\"qq\",\"armResourceId\":{\"resourceId\":\"u\"}},\"userCreatedAcrAccount\":{\"armResourceId\":{\"resourceId\":\"ozf\"}}}") - .toObject(AcrDetails.class); - Assertions.assertEquals("rgdtpeqnacyheqw", model.systemCreatedAcrAccount().acrAccountName()); - Assertions.assertEquals("qq", model.systemCreatedAcrAccount().acrAccountSku()); - Assertions.assertEquals("u", model.systemCreatedAcrAccount().armResourceId().resourceId()); - Assertions.assertEquals("ozf", model.userCreatedAcrAccount().armResourceId().resourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AcrDetails model = new AcrDetails() - .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("rgdtpeqnacyheqw") - .withAcrAccountSku("qq") - .withArmResourceId(new ArmResourceId().withResourceId("u"))) - .withUserCreatedAcrAccount( - new UserCreatedAcrAccount().withArmResourceId(new ArmResourceId().withResourceId("ozf"))); - model = BinaryData.fromObject(model).toObject(AcrDetails.class); - Assertions.assertEquals("rgdtpeqnacyheqw", model.systemCreatedAcrAccount().acrAccountName()); - Assertions.assertEquals("qq", model.systemCreatedAcrAccount().acrAccountSku()); - Assertions.assertEquals("u", model.systemCreatedAcrAccount().armResourceId().resourceId()); - Assertions.assertEquals("ozf", model.userCreatedAcrAccount().armResourceId().resourceId()); - } -} 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 41691600817e7..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AksNetworkingConfigurationTests.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.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\":\"mffngdyfcixr\",\"serviceCidr\":\"cqvhoejgoiutgwrm\",\"dnsServiceIP\":\"hpqhazyntacihn\",\"dockerBridgeCidr\":\"gmipnmliqmvlbhik\"}") - .toObject(AksNetworkingConfiguration.class); - Assertions.assertEquals("mffngdyfcixr", model.subnetId()); - Assertions.assertEquals("cqvhoejgoiutgwrm", model.serviceCidr()); - Assertions.assertEquals("hpqhazyntacihn", model.dnsServiceIp()); - Assertions.assertEquals("gmipnmliqmvlbhik", model.dockerBridgeCidr()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AksNetworkingConfiguration model = new AksNetworkingConfiguration().withSubnetId("mffngdyfcixr") - .withServiceCidr("cqvhoejgoiutgwrm") - .withDnsServiceIp("hpqhazyntacihn") - .withDockerBridgeCidr("gmipnmliqmvlbhik"); - model = BinaryData.fromObject(model).toObject(AksNetworkingConfiguration.class); - Assertions.assertEquals("mffngdyfcixr", model.subnetId()); - Assertions.assertEquals("cqvhoejgoiutgwrm", model.serviceCidr()); - Assertions.assertEquals("hpqhazyntacihn", model.dnsServiceIp()); - Assertions.assertEquals("gmipnmliqmvlbhik", model.dockerBridgeCidr()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AllFeaturesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AllFeaturesTests.java deleted file mode 100644 index 960b4c98194fb..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AllFeaturesTests.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.AllFeatures; - -public final class AllFeaturesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AllFeatures model = BinaryData.fromString("{\"filterType\":\"AllFeatures\"}").toObject(AllFeatures.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AllFeatures model = new AllFeatures(); - model = BinaryData.fromObject(model).toObject(AllFeatures.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AllNodesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AllNodesTests.java deleted file mode 100644 index a964c0776dfaa..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AllNodesTests.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.AllNodes; - -public final class AllNodesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AllNodes model = BinaryData.fromString("{\"nodesValueType\":\"All\"}").toObject(AllNodes.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AllNodes model = new AllNodes(); - model = BinaryData.fromObject(model).toObject(AllNodes.class); - } -} 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 88c90d4806095..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlComputeNodeInformationTests.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.AmlComputeNodeInformation; - -public final class AmlComputeNodeInformationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AmlComputeNodeInformation model = BinaryData.fromString( - "{\"nodeId\":\"nxipeil\",\"privateIpAddress\":\"zuaejxd\",\"publicIpAddress\":\"tskzbbtdzumveek\",\"port\":1792717087,\"nodeState\":\"preparing\",\"runId\":\"hkfpbs\"}") - .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 28fea97b88c31..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlComputeNodesInformationTests.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.AmlComputeNodesInformation; - -public final class AmlComputeNodesInformationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AmlComputeNodesInformation model = BinaryData.fromString( - "{\"nodes\":[{\"nodeId\":\"wrtz\",\"privateIpAddress\":\"zg\",\"publicIpAddress\":\"zmh\",\"port\":1672254683,\"nodeState\":\"running\",\"runId\":\"ts\"},{\"nodeId\":\"jcbpwxqpsrknft\",\"privateIpAddress\":\"vriuhprwmdyvx\",\"publicIpAddress\":\"ayriwwroyqbexrm\",\"port\":1486337456,\"nodeState\":\"running\",\"runId\":\"nojvknmefqsg\"},{\"nodeId\":\"ah\",\"privateIpAddress\":\"jyzhpvgq\",\"publicIpAddress\":\"j\",\"port\":391970506,\"nodeState\":\"preempted\",\"runId\":\"lmwlxkvugfhzo\"}],\"nextLink\":\"wjvzunluthnn\"}") - .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/AmlTokenComputeIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlTokenComputeIdentityTests.java deleted file mode 100644 index dc143c2e942c1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlTokenComputeIdentityTests.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.AmlTokenComputeIdentity; - -public final class AmlTokenComputeIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AmlTokenComputeIdentity model - = BinaryData.fromString("{\"computeIdentityType\":\"AmlToken\"}").toObject(AmlTokenComputeIdentity.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AmlTokenComputeIdentity model = new AmlTokenComputeIdentity(); - model = BinaryData.fromObject(model).toObject(AmlTokenComputeIdentity.class); - } -} 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 8e69984b63ba8..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlUserFeatureInnerTests.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.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\":\"yyyzlwhbw\",\"displayName\":\"nufzr\",\"description\":\"m\"}") - .toObject(AmlUserFeatureInner.class); - Assertions.assertEquals("yyyzlwhbw", model.id()); - Assertions.assertEquals("nufzr", model.displayName()); - Assertions.assertEquals("m", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AmlUserFeatureInner model - = new AmlUserFeatureInner().withId("yyyzlwhbw").withDisplayName("nufzr").withDescription("m"); - model = BinaryData.fromObject(model).toObject(AmlUserFeatureInner.class); - Assertions.assertEquals("yyyzlwhbw", model.id()); - Assertions.assertEquals("nufzr", model.displayName()); - Assertions.assertEquals("m", model.description()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ArmResourceIdTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ArmResourceIdTests.java deleted file mode 100644 index 9ab857d7bec8b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ArmResourceIdTests.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.ArmResourceId; -import org.junit.jupiter.api.Assertions; - -public final class ArmResourceIdTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ArmResourceId model = BinaryData.fromString("{\"resourceId\":\"bmom\"}").toObject(ArmResourceId.class); - Assertions.assertEquals("bmom", model.resourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ArmResourceId model = new ArmResourceId().withResourceId("bmom"); - model = BinaryData.fromObject(model).toObject(ArmResourceId.class); - Assertions.assertEquals("bmom", model.resourceId()); - } -} 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 2f2ab05dd909b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetBaseTests.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.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( - "{\"isArchived\":false,\"isAnonymous\":true,\"description\":\"jrkvfgbvfvpdbo\",\"tags\":{\"bdeibqipqk\":\"izsjqlhkrr\",\"rwkq\":\"hvxndzwmkrefajpj\",\"sjabibs\":\"yhgbijtjivfx\",\"bjxbkzbzk\":\"stawfsdjpvkv\"},\"properties\":{\"zhjjklffhmouwq\":\"cjabudurgkakmo\"}}") - .toObject(AssetBase.class); - Assertions.assertEquals("jrkvfgbvfvpdbo", model.description()); - Assertions.assertEquals("izsjqlhkrr", model.tags().get("bdeibqipqk")); - Assertions.assertEquals("cjabudurgkakmo", model.properties().get("zhjjklffhmouwq")); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals(true, model.isAnonymous()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AssetBase model = new AssetBase().withDescription("jrkvfgbvfvpdbo") - .withTags(mapOf("bdeibqipqk", "izsjqlhkrr", "rwkq", "hvxndzwmkrefajpj", "sjabibs", "yhgbijtjivfx", - "bjxbkzbzk", "stawfsdjpvkv")) - .withProperties(mapOf("zhjjklffhmouwq", "cjabudurgkakmo")) - .withIsArchived(false) - .withIsAnonymous(true); - model = BinaryData.fromObject(model).toObject(AssetBase.class); - Assertions.assertEquals("jrkvfgbvfvpdbo", model.description()); - Assertions.assertEquals("izsjqlhkrr", model.tags().get("bdeibqipqk")); - Assertions.assertEquals("cjabudurgkakmo", model.properties().get("zhjjklffhmouwq")); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals(true, model.isAnonymous()); - } - - // 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/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 23f5530365575..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetContainerTests.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.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\":true,\"latestVersion\":\"equi\",\"nextVersion\":\"xicslfao\",\"description\":\"piyylhalnswhccsp\",\"tags\":{\"oluhczbwemh\":\"ivwitqscywugg\",\"sbrgz\":\"i\",\"ggicccnxqhue\":\"wmsweypqwd\"},\"properties\":{\"ncsdtclusiyp\":\"ttlstvlzywemhz\"}}") - .toObject(AssetContainer.class); - Assertions.assertEquals("piyylhalnswhccsp", model.description()); - Assertions.assertEquals("ivwitqscywugg", model.tags().get("oluhczbwemh")); - Assertions.assertEquals("ttlstvlzywemhz", model.properties().get("ncsdtclusiyp")); - Assertions.assertEquals(true, model.isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AssetContainer model = new AssetContainer().withDescription("piyylhalnswhccsp") - .withTags(mapOf("oluhczbwemh", "ivwitqscywugg", "sbrgz", "i", "ggicccnxqhue", "wmsweypqwd")) - .withProperties(mapOf("ncsdtclusiyp", "ttlstvlzywemhz")) - .withIsArchived(true); - model = BinaryData.fromObject(model).toObject(AssetContainer.class); - Assertions.assertEquals("piyylhalnswhccsp", model.description()); - Assertions.assertEquals("ivwitqscywugg", model.tags().get("oluhczbwemh")); - Assertions.assertEquals("ttlstvlzywemhz", model.properties().get("ncsdtclusiyp")); - Assertions.assertEquals(true, model.isArchived()); - } - - // 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/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 3ebea634df0ea..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("{\"uri\":\"ynosugkfhaxt\",\"mode\":\"ReadWriteMount\"}") - .toObject(AssetJobInput.class); - Assertions.assertEquals("ynosugkfhaxt", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AssetJobInput model = new AssetJobInput().withUri("ynosugkfhaxt").withMode(InputDeliveryMode.READ_WRITE_MOUNT); - model = BinaryData.fromObject(model).toObject(AssetJobInput.class); - Assertions.assertEquals("ynosugkfhaxt", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } -} 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 8550d30cc8100..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("{\"uri\":\"mwgsghq\",\"mode\":\"ReadWriteMount\"}").toObject(AssetJobOutput.class); - Assertions.assertEquals("mwgsghq", model.uri()); - Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AssetJobOutput model = new AssetJobOutput().withUri("mwgsghq").withMode(OutputDeliveryMode.READ_WRITE_MOUNT); - model = BinaryData.fromObject(model).toObject(AssetJobOutput.class); - Assertions.assertEquals("mwgsghq", model.uri()); - Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } -} 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 a4292e1446872..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 570b61b7f59c4..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssignedUserTests.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.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\":\"lmcskyk\",\"tenantId\":\"fuofixcnpcfykkp\"}") - .toObject(AssignedUser.class); - Assertions.assertEquals("lmcskyk", model.objectId()); - Assertions.assertEquals("fuofixcnpcfykkp", model.tenantId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AssignedUser model = new AssignedUser().withObjectId("lmcskyk").withTenantId("fuofixcnpcfykkp"); - model = BinaryData.fromObject(model).toObject(AssignedUser.class); - Assertions.assertEquals("lmcskyk", model.objectId()); - Assertions.assertEquals("fuofixcnpcfykkp", 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 8a5082e2e258d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoMLJobTests.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated 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.EmailNotificationEnableType; -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.JobTier; -import com.azure.resourcemanager.machinelearning.models.LogVerbosity; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.Nodes; -import com.azure.resourcemanager.machinelearning.models.NotificationSetting; -import com.azure.resourcemanager.machinelearning.models.QueueSettings; -import com.azure.resourcemanager.machinelearning.models.Webhook; -import java.util.Arrays; -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\",\"resources\":{\"shmSize\":\"dd\",\"dockerArgs\":\"qm\",\"instanceCount\":1650398695,\"instanceType\":\"othxuarigrjd\",\"properties\":{\"pruulhg\":\"datakqhvkrbzkuastaxk\",\"izwxvs\":\"datat\",\"fxcz\":\"dataksgfyyskyekg\"}},\"environmentId\":\"cckwrtwle\",\"environmentVariables\":{\"lhpdhwynctaczcnj\":\"eszr\",\"x\":\"mbbfnv\",\"nkrtikl\":\"tzo\"},\"taskDetails\":{\"taskType\":\"AutoMLVertical\",\"logVerbosity\":\"Error\",\"trainingData\":{\"jobInputType\":\"mltable\",\"uri\":\"ihqlcoqks\",\"mode\":\"ReadOnlyMount\",\"description\":\"hyxwbgbud\"},\"targetColumnName\":\"qdo\"},\"outputs\":{\"thojvlirknucos\":{\"jobOutputType\":\"JobOutput\",\"description\":\"qcd\"},\"pya\":{\"jobOutputType\":\"JobOutput\",\"description\":\"rdtnagzl\"}},\"queueSettings\":{\"jobTier\":\"Basic\"},\"displayName\":\"qjjtsmuydqfttka\",\"status\":\"Canceled\",\"experimentName\":\"ue\",\"services\":{\"lvqzrwtrdgscnv\":{\"jobServiceType\":\"cdcpkshloj\",\"port\":1132917743,\"endpoint\":\"zics\",\"status\":\"d\",\"errorMessage\":\"yaaknyukibxiglhp\",\"properties\":{\"z\":\"xqtejpiilhvt\",\"k\":\"agjjn\",\"f\":\"ylhyyx\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"l\":{\"jobServiceType\":\"on\",\"port\":1449590493,\"endpoint\":\"xlw\",\"status\":\"zyohxpthc\",\"errorMessage\":\"pvkvtwf\",\"properties\":{\"cdyarnggcjfwblqh\":\"obpbokhmm\",\"s\":\"kasmcolmugpyva\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"nbxqaeht\":{\"jobServiceType\":\"zxeygzvtye\",\"port\":2081188062,\"endpoint\":\"bnob\",\"status\":\"qisqsqkp\",\"errorMessage\":\"ioyj\",\"properties\":{\"qdvrdmvxyrxdh\":\"lviqcpszpmc\",\"mbtple\":\"vqojbxaotcgbz\",\"muuv\":\"oioyidoxznvgvd\",\"erxrzutylcurza\":\"awsxmrszbknimxlp\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}}},\"computeId\":\"jmbnvynf\",\"isArchived\":true,\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"componentId\":\"c\",\"notificationSetting\":{\"emails\":[\"glskakddi\",\"ahzllrqmtlpb\",\"xroi\"],\"emailOn\":[\"JobCompleted\"],\"webhooks\":{\"brjjtalxrdsjr\":{\"webhookType\":\"Webhook\",\"eventType\":\"fmnoiicsudy\"},\"dp\":{\"webhookType\":\"Webhook\",\"eventType\":\"luqwgusxxhd\"}}},\"description\":\"yblvtbdmvsbyi\",\"tags\":{\"jfb\":\"lqpvekmk\",\"gdusxurs\":\"tlo\",\"iqrizfwihvaan\":\"ivuxcjkcoqwczs\"},\"properties\":{\"bbaex\":\"nhjrfdmfd\",\"vmuafmc\":\"jfwtgdfkkaui\",\"vpltidajjvy\":\"fedyuep\"}}") - .toObject(AutoMLJob.class); - Assertions.assertEquals("yblvtbdmvsbyi", model.description()); - Assertions.assertEquals("lqpvekmk", model.tags().get("jfb")); - Assertions.assertEquals("nhjrfdmfd", model.properties().get("bbaex")); - Assertions.assertEquals("qjjtsmuydqfttka", model.displayName()); - Assertions.assertEquals("ue", model.experimentName()); - Assertions.assertEquals("cdcpkshloj", model.services().get("lvqzrwtrdgscnv").jobServiceType()); - Assertions.assertEquals(1132917743, model.services().get("lvqzrwtrdgscnv").port()); - Assertions.assertEquals("zics", model.services().get("lvqzrwtrdgscnv").endpoint()); - Assertions.assertEquals("xqtejpiilhvt", model.services().get("lvqzrwtrdgscnv").properties().get("z")); - Assertions.assertEquals("jmbnvynf", model.computeId()); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals("c", model.componentId()); - Assertions.assertEquals("glskakddi", model.notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_COMPLETED, - model.notificationSetting().emailOn().get(0)); - Assertions.assertEquals("fmnoiicsudy", model.notificationSetting().webhooks().get("brjjtalxrdsjr").eventType()); - Assertions.assertEquals(1650398695, model.resources().instanceCount()); - Assertions.assertEquals("othxuarigrjd", model.resources().instanceType()); - Assertions.assertEquals("dd", model.resources().shmSize()); - Assertions.assertEquals("qm", model.resources().dockerArgs()); - Assertions.assertEquals("cckwrtwle", model.environmentId()); - Assertions.assertEquals("eszr", model.environmentVariables().get("lhpdhwynctaczcnj")); - Assertions.assertEquals(LogVerbosity.ERROR, model.taskDetails().logVerbosity()); - Assertions.assertEquals("hyxwbgbud", model.taskDetails().trainingData().description()); - Assertions.assertEquals("ihqlcoqks", model.taskDetails().trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.taskDetails().trainingData().mode()); - Assertions.assertEquals("qdo", model.taskDetails().targetColumnName()); - Assertions.assertEquals("qcd", model.outputs().get("thojvlirknucos").description()); - Assertions.assertEquals(JobTier.BASIC, model.queueSettings().jobTier()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoMLJob model - = new AutoMLJob().withDescription("yblvtbdmvsbyi") - .withTags(mapOf("jfb", "lqpvekmk", "gdusxurs", "tlo", "iqrizfwihvaan", "ivuxcjkcoqwczs")) - .withProperties(mapOf("bbaex", "nhjrfdmfd", "vmuafmc", "jfwtgdfkkaui", "vpltidajjvy", "fedyuep")) - .withDisplayName("qjjtsmuydqfttka") - .withExperimentName("ue") - .withServices(mapOf("lvqzrwtrdgscnv", - new JobService().withJobServiceType("cdcpkshloj") - .withPort(1132917743) - .withEndpoint("zics") - .withProperties(mapOf("z", "xqtejpiilhvt", "k", "agjjn", "f", "ylhyyx")) - .withNodes(new Nodes()), - "l", - new JobService().withJobServiceType("on") - .withPort(1449590493) - .withEndpoint("xlw") - .withProperties(mapOf("cdyarnggcjfwblqh", "obpbokhmm", "s", "kasmcolmugpyva")) - .withNodes(new Nodes()), - "nbxqaeht", - new JobService().withJobServiceType("zxeygzvtye") - .withPort(2081188062) - .withEndpoint("bnob") - .withProperties(mapOf("qdvrdmvxyrxdh", "lviqcpszpmc", "mbtple", "vqojbxaotcgbz", "muuv", - "oioyidoxznvgvd", "erxrzutylcurza", "awsxmrszbknimxlp")) - .withNodes(new Nodes()))) - .withComputeId("jmbnvynf") - .withIsArchived(true) - .withIdentity(new IdentityConfiguration()) - .withComponentId("c") - .withNotificationSetting(new NotificationSetting() - .withEmails(Arrays.asList("glskakddi", "ahzllrqmtlpb", "xroi")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_COMPLETED)) - .withWebhooks(mapOf("brjjtalxrdsjr", new Webhook().withEventType("fmnoiicsudy"), "dp", - new Webhook().withEventType("luqwgusxxhd")))) - .withResources(new JobResourceConfiguration().withInstanceCount(1650398695) - .withInstanceType("othxuarigrjd") - .withProperties( - mapOf("pruulhg", "datakqhvkrbzkuastaxk", "izwxvs", "datat", "fxcz", "dataksgfyyskyekg")) - .withShmSize("dd") - .withDockerArgs("qm")) - .withEnvironmentId("cckwrtwle") - .withEnvironmentVariables(mapOf("lhpdhwynctaczcnj", "eszr", "x", "mbbfnv", "nkrtikl", "tzo")) - .withTaskDetails(new AutoMLVertical().withLogVerbosity(LogVerbosity.ERROR) - .withTrainingData(new MLTableJobInput().withDescription("hyxwbgbud") - .withUri("ihqlcoqks") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT)) - .withTargetColumnName("qdo")) - .withOutputs(mapOf("thojvlirknucos", new JobOutput().withDescription("qcd"), "pya", - new JobOutput().withDescription("rdtnagzl"))) - .withQueueSettings(new QueueSettings().withJobTier(JobTier.BASIC)); - model = BinaryData.fromObject(model).toObject(AutoMLJob.class); - Assertions.assertEquals("yblvtbdmvsbyi", model.description()); - Assertions.assertEquals("lqpvekmk", model.tags().get("jfb")); - Assertions.assertEquals("nhjrfdmfd", model.properties().get("bbaex")); - Assertions.assertEquals("qjjtsmuydqfttka", model.displayName()); - Assertions.assertEquals("ue", model.experimentName()); - Assertions.assertEquals("cdcpkshloj", model.services().get("lvqzrwtrdgscnv").jobServiceType()); - Assertions.assertEquals(1132917743, model.services().get("lvqzrwtrdgscnv").port()); - Assertions.assertEquals("zics", model.services().get("lvqzrwtrdgscnv").endpoint()); - Assertions.assertEquals("xqtejpiilhvt", model.services().get("lvqzrwtrdgscnv").properties().get("z")); - Assertions.assertEquals("jmbnvynf", model.computeId()); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals("c", model.componentId()); - Assertions.assertEquals("glskakddi", model.notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_COMPLETED, - model.notificationSetting().emailOn().get(0)); - Assertions.assertEquals("fmnoiicsudy", model.notificationSetting().webhooks().get("brjjtalxrdsjr").eventType()); - Assertions.assertEquals(1650398695, model.resources().instanceCount()); - Assertions.assertEquals("othxuarigrjd", model.resources().instanceType()); - Assertions.assertEquals("dd", model.resources().shmSize()); - Assertions.assertEquals("qm", model.resources().dockerArgs()); - Assertions.assertEquals("cckwrtwle", model.environmentId()); - Assertions.assertEquals("eszr", model.environmentVariables().get("lhpdhwynctaczcnj")); - Assertions.assertEquals(LogVerbosity.ERROR, model.taskDetails().logVerbosity()); - Assertions.assertEquals("hyxwbgbud", model.taskDetails().trainingData().description()); - Assertions.assertEquals("ihqlcoqks", model.taskDetails().trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.taskDetails().trainingData().mode()); - Assertions.assertEquals("qdo", model.taskDetails().targetColumnName()); - Assertions.assertEquals("qcd", model.outputs().get("thojvlirknucos").description()); - Assertions.assertEquals(JobTier.BASIC, model.queueSettings().jobTier()); - } - - // 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/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 3b895a713017d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoMLVerticalTests.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.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\":\"Error\",\"trainingData\":{\"jobInputType\":\"mltable\",\"uri\":\"q\",\"mode\":\"ReadOnlyMount\",\"description\":\"xqwqueu\"},\"targetColumnName\":\"lztpziizevjykof\"}") - .toObject(AutoMLVertical.class); - Assertions.assertEquals(LogVerbosity.ERROR, model.logVerbosity()); - Assertions.assertEquals("xqwqueu", model.trainingData().description()); - Assertions.assertEquals("q", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("lztpziizevjykof", model.targetColumnName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoMLVertical model = new AutoMLVertical().withLogVerbosity(LogVerbosity.ERROR) - .withTrainingData(new MLTableJobInput().withDescription("xqwqueu") - .withUri("q") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT)) - .withTargetColumnName("lztpziizevjykof"); - model = BinaryData.fromObject(model).toObject(AutoMLVertical.class); - Assertions.assertEquals(LogVerbosity.ERROR, model.logVerbosity()); - Assertions.assertEquals("xqwqueu", model.trainingData().description()); - Assertions.assertEquals("q", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("lztpziizevjykof", model.targetColumnName()); - } -} 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 f53af11b7c4ba..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 41f4f6f7556fd..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoPausePropertiesTests.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.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\":1738803308,\"enabled\":true}") - .toObject(AutoPauseProperties.class); - Assertions.assertEquals(1738803308, model.delayInMinutes()); - Assertions.assertEquals(true, model.enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoPauseProperties model = new AutoPauseProperties().withDelayInMinutes(1738803308).withEnabled(true); - model = BinaryData.fromObject(model).toObject(AutoPauseProperties.class); - Assertions.assertEquals(1738803308, 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 b38744899efdc..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoScalePropertiesTests.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.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\":239147193,\"enabled\":true,\"maxNodeCount\":981129054}") - .toObject(AutoScaleProperties.class); - Assertions.assertEquals(239147193, model.minNodeCount()); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals(981129054, model.maxNodeCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoScaleProperties model - = new AutoScaleProperties().withMinNodeCount(239147193).withEnabled(true).withMaxNodeCount(981129054); - model = BinaryData.fromObject(model).toObject(AutoScaleProperties.class); - Assertions.assertEquals(239147193, model.minNodeCount()); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals(981129054, 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 01498e0b18d2e..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/AzureDatastoreTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AzureDatastoreTests.java deleted file mode 100644 index c3ab34e5349d8..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AzureDatastoreTests.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.AzureDatastore; -import org.junit.jupiter.api.Assertions; - -public final class AzureDatastoreTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureDatastore model - = BinaryData.fromString("{\"subscriptionId\":\"ssgwjfkain\",\"resourceGroup\":\"uymvecvzts\"}") - .toObject(AzureDatastore.class); - Assertions.assertEquals("ssgwjfkain", model.subscriptionId()); - Assertions.assertEquals("uymvecvzts", model.resourceGroup()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureDatastore model = new AzureDatastore().withSubscriptionId("ssgwjfkain").withResourceGroup("uymvecvzts"); - model = BinaryData.fromObject(model).toObject(AzureDatastore.class); - Assertions.assertEquals("ssgwjfkain", model.subscriptionId()); - Assertions.assertEquals("uymvecvzts", model.resourceGroup()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AzureDevOpsWebhookTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AzureDevOpsWebhookTests.java deleted file mode 100644 index 92616de4fa267..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AzureDevOpsWebhookTests.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.AzureDevOpsWebhook; -import org.junit.jupiter.api.Assertions; - -public final class AzureDevOpsWebhookTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureDevOpsWebhook model - = BinaryData.fromString("{\"webhookType\":\"AzureDevOps\",\"eventType\":\"cvasormrexzvdu\"}") - .toObject(AzureDevOpsWebhook.class); - Assertions.assertEquals("cvasormrexzvdu", model.eventType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureDevOpsWebhook model = new AzureDevOpsWebhook().withEventType("cvasormrexzvdu"); - model = BinaryData.fromObject(model).toObject(AzureDevOpsWebhook.class); - Assertions.assertEquals("cvasormrexzvdu", model.eventType()); - } -} 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 6d5107068d578..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BanditPolicyTests.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.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\",\"slackFactor\":60.285545,\"slackAmount\":73.91734,\"evaluationInterval\":1123560800,\"delayEvaluation\":1370389329}") - .toObject(BanditPolicy.class); - Assertions.assertEquals(1123560800, model.evaluationInterval()); - Assertions.assertEquals(1370389329, model.delayEvaluation()); - Assertions.assertEquals(60.285545F, model.slackFactor()); - Assertions.assertEquals(73.91734F, model.slackAmount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BanditPolicy model = new BanditPolicy().withEvaluationInterval(1123560800) - .withDelayEvaluation(1370389329) - .withSlackFactor(60.285545F) - .withSlackAmount(73.91734F); - model = BinaryData.fromObject(model).toObject(BanditPolicy.class); - Assertions.assertEquals(1123560800, model.evaluationInterval()); - Assertions.assertEquals(1370389329, model.delayEvaluation()); - Assertions.assertEquals(60.285545F, model.slackFactor()); - Assertions.assertEquals(73.91734F, model.slackAmount()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentConfigurationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentConfigurationTests.java deleted file mode 100644 index 4f6536cc925fd..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentConfigurationTests.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.BatchDeploymentConfiguration; - -public final class BatchDeploymentConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BatchDeploymentConfiguration model - = BinaryData.fromString("{\"deploymentConfigurationType\":\"BatchDeploymentConfiguration\"}") - .toObject(BatchDeploymentConfiguration.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BatchDeploymentConfiguration model = new BatchDeploymentConfiguration(); - model = BinaryData.fromObject(model).toObject(BatchDeploymentConfiguration.class); - } -} 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 7d7c3e21175ec..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class BatchDeploymentsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("vi", "cwbqy", "clwbjgiynqryoisw", "ofvsxau", 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 a2712fe028ca6..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\":\"winhehfqpo\"}").toObject(BatchEndpointDefaults.class); - Assertions.assertEquals("winhehfqpo", model.deploymentName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BatchEndpointDefaults model = new BatchEndpointDefaults().withDeploymentName("winhehfqpo"); - model = BinaryData.fromObject(model).toObject(BatchEndpointDefaults.class); - Assertions.assertEquals("winhehfqpo", model.deploymentName()); - } -} 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 2ece8ae2a2532..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class BatchEndpointsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("fxcsqmzdozktkdpc", "eohpl", "gcnbvmhvqp", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchPipelineComponentDeploymentConfigurationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchPipelineComponentDeploymentConfigurationTests.java deleted file mode 100644 index 94bafbf74579c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchPipelineComponentDeploymentConfigurationTests.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.BatchPipelineComponentDeploymentConfiguration; -import com.azure.resourcemanager.machinelearning.models.IdAssetReference; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class BatchPipelineComponentDeploymentConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BatchPipelineComponentDeploymentConfiguration model = BinaryData.fromString( - "{\"deploymentConfigurationType\":\"PipelineComponent\",\"componentId\":{\"referenceType\":\"Id\",\"assetId\":\"jgvhxcc\"},\"description\":\"kakmkookbputmgvm\",\"settings\":{\"ow\":\"kmlwkt\",\"ejtgzjxxl\":\"kroyrdurxflzqji\",\"lzuqloiwyayyzivr\":\"e\",\"jlei\":\"itcdqlhchwhrk\"},\"tags\":{\"nsmy\":\"fiplhx\"}}") - .toObject(BatchPipelineComponentDeploymentConfiguration.class); - Assertions.assertEquals("jgvhxcc", model.componentId().assetId()); - Assertions.assertEquals("kakmkookbputmgvm", model.description()); - Assertions.assertEquals("kmlwkt", model.settings().get("ow")); - Assertions.assertEquals("fiplhx", model.tags().get("nsmy")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BatchPipelineComponentDeploymentConfiguration model = new BatchPipelineComponentDeploymentConfiguration() - .withComponentId(new IdAssetReference().withAssetId("jgvhxcc")) - .withDescription("kakmkookbputmgvm") - .withSettings( - mapOf("ow", "kmlwkt", "ejtgzjxxl", "kroyrdurxflzqji", "lzuqloiwyayyzivr", "e", "jlei", "itcdqlhchwhrk")) - .withTags(mapOf("nsmy", "fiplhx")); - model = BinaryData.fromObject(model).toObject(BatchPipelineComponentDeploymentConfiguration.class); - Assertions.assertEquals("jgvhxcc", model.componentId().assetId()); - Assertions.assertEquals("kakmkookbputmgvm", model.description()); - Assertions.assertEquals("kmlwkt", model.settings().get("ow")); - Assertions.assertEquals("fiplhx", model.tags().get("nsmy")); - } - - // 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/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 209f9e21bc4cb..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchRetrySettingsTests.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.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\":1662564263,\"timeout\":\"PT208H49M32S\"}") - .toObject(BatchRetrySettings.class); - Assertions.assertEquals(1662564263, model.maxRetries()); - Assertions.assertEquals(Duration.parse("PT208H49M32S"), model.timeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BatchRetrySettings model - = new BatchRetrySettings().withMaxRetries(1662564263).withTimeout(Duration.parse("PT208H49M32S")); - model = BinaryData.fromObject(model).toObject(BatchRetrySettings.class); - Assertions.assertEquals(1662564263, model.maxRetries()); - Assertions.assertEquals(Duration.parse("PT208H49M32S"), 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 96b3f9dcffaa1..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/BindOptionsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BindOptionsTests.java deleted file mode 100644 index a5f75e9ec4679..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BindOptionsTests.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.BindOptions; -import org.junit.jupiter.api.Assertions; - -public final class BindOptionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BindOptions model - = BinaryData.fromString("{\"propagation\":\"arwp\",\"createHostPath\":true,\"selinux\":\"udoejtighsxjp\"}") - .toObject(BindOptions.class); - Assertions.assertEquals("arwp", model.propagation()); - Assertions.assertEquals(true, model.createHostPath()); - Assertions.assertEquals("udoejtighsxjp", model.selinux()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BindOptions model - = new BindOptions().withPropagation("arwp").withCreateHostPath(true).withSelinux("udoejtighsxjp"); - model = BinaryData.fromObject(model).toObject(BindOptions.class); - Assertions.assertEquals("arwp", model.propagation()); - Assertions.assertEquals(true, model.createHostPath()); - Assertions.assertEquals("udoejtighsxjp", model.selinux()); - } -} 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 43b9ecc4b4f13..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BuildContextTests.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.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\":\"zrcxfailcfxwmdbo\",\"dockerfilePath\":\"fgsftufqob\"}") - .toObject(BuildContext.class); - Assertions.assertEquals("zrcxfailcfxwmdbo", model.contextUri()); - Assertions.assertEquals("fgsftufqob", model.dockerfilePath()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BuildContext model = new BuildContext().withContextUri("zrcxfailcfxwmdbo").withDockerfilePath("fgsftufqob"); - model = BinaryData.fromObject(model).toObject(BuildContext.class); - Assertions.assertEquals("zrcxfailcfxwmdbo", model.contextUri()); - Assertions.assertEquals("fgsftufqob", model.dockerfilePath()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CategoricalDataDriftMetricThresholdTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CategoricalDataDriftMetricThresholdTests.java deleted file mode 100644 index 42de010f2f329..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CategoricalDataDriftMetricThresholdTests.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.CategoricalDataDriftMetric; -import com.azure.resourcemanager.machinelearning.models.CategoricalDataDriftMetricThreshold; -import com.azure.resourcemanager.machinelearning.models.MonitoringThreshold; -import org.junit.jupiter.api.Assertions; - -public final class CategoricalDataDriftMetricThresholdTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CategoricalDataDriftMetricThreshold model = BinaryData.fromString( - "{\"dataType\":\"Categorical\",\"metric\":\"PearsonsChiSquaredTest\",\"threshold\":{\"value\":46.62967716667693}}") - .toObject(CategoricalDataDriftMetricThreshold.class); - Assertions.assertEquals(46.62967716667693D, model.threshold().value()); - Assertions.assertEquals(CategoricalDataDriftMetric.PEARSONS_CHI_SQUARED_TEST, model.metric()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CategoricalDataDriftMetricThreshold model = new CategoricalDataDriftMetricThreshold() - .withThreshold(new MonitoringThreshold().withValue(46.62967716667693D)) - .withMetric(CategoricalDataDriftMetric.PEARSONS_CHI_SQUARED_TEST); - model = BinaryData.fromObject(model).toObject(CategoricalDataDriftMetricThreshold.class); - Assertions.assertEquals(46.62967716667693D, model.threshold().value()); - Assertions.assertEquals(CategoricalDataDriftMetric.PEARSONS_CHI_SQUARED_TEST, model.metric()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CategoricalDataQualityMetricThresholdTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CategoricalDataQualityMetricThresholdTests.java deleted file mode 100644 index 98eddd5d54f5b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CategoricalDataQualityMetricThresholdTests.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.CategoricalDataQualityMetric; -import com.azure.resourcemanager.machinelearning.models.CategoricalDataQualityMetricThreshold; -import com.azure.resourcemanager.machinelearning.models.MonitoringThreshold; -import org.junit.jupiter.api.Assertions; - -public final class CategoricalDataQualityMetricThresholdTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CategoricalDataQualityMetricThreshold model = BinaryData.fromString( - "{\"dataType\":\"Categorical\",\"metric\":\"OutOfBoundsRate\",\"threshold\":{\"value\":24.67440172418167}}") - .toObject(CategoricalDataQualityMetricThreshold.class); - Assertions.assertEquals(24.67440172418167D, model.threshold().value()); - Assertions.assertEquals(CategoricalDataQualityMetric.OUT_OF_BOUNDS_RATE, model.metric()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CategoricalDataQualityMetricThreshold model = new CategoricalDataQualityMetricThreshold() - .withThreshold(new MonitoringThreshold().withValue(24.67440172418167D)) - .withMetric(CategoricalDataQualityMetric.OUT_OF_BOUNDS_RATE); - model = BinaryData.fromObject(model).toObject(CategoricalDataQualityMetricThreshold.class); - Assertions.assertEquals(24.67440172418167D, model.threshold().value()); - Assertions.assertEquals(CategoricalDataQualityMetric.OUT_OF_BOUNDS_RATE, model.metric()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CategoricalPredictionDriftMetricThresholdTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CategoricalPredictionDriftMetricThresholdTests.java deleted file mode 100644 index d9da6bebfec50..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CategoricalPredictionDriftMetricThresholdTests.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.CategoricalPredictionDriftMetric; -import com.azure.resourcemanager.machinelearning.models.CategoricalPredictionDriftMetricThreshold; -import com.azure.resourcemanager.machinelearning.models.MonitoringThreshold; -import org.junit.jupiter.api.Assertions; - -public final class CategoricalPredictionDriftMetricThresholdTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CategoricalPredictionDriftMetricThreshold model = BinaryData.fromString( - "{\"dataType\":\"Categorical\",\"metric\":\"PopulationStabilityIndex\",\"threshold\":{\"value\":29.225647005199463}}") - .toObject(CategoricalPredictionDriftMetricThreshold.class); - Assertions.assertEquals(29.225647005199463D, model.threshold().value()); - Assertions.assertEquals(CategoricalPredictionDriftMetric.POPULATION_STABILITY_INDEX, model.metric()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CategoricalPredictionDriftMetricThreshold model = new CategoricalPredictionDriftMetricThreshold() - .withThreshold(new MonitoringThreshold().withValue(29.225647005199463D)) - .withMetric(CategoricalPredictionDriftMetric.POPULATION_STABILITY_INDEX); - model = BinaryData.fromObject(model).toObject(CategoricalPredictionDriftMetricThreshold.class); - Assertions.assertEquals(29.225647005199463D, model.threshold().value()); - Assertions.assertEquals(CategoricalPredictionDriftMetric.POPULATION_STABILITY_INDEX, model.metric()); - } -} 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 cca76ae955bf1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClassificationTests.java +++ /dev/null @@ -1,220 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated 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.ColumnTransformer; -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\",\"primaryMetric\":\"NormMacroRecall\",\"trainingSettings\":{\"allowedTrainingAlgorithms\":[\"XGBoostClassifier\",\"RandomForest\",\"KNN\"],\"blockedTrainingAlgorithms\":[\"MultinomialNaiveBayes\",\"GradientBoosting\"],\"enableOnnxCompatibleModels\":false,\"stackEnsembleSettings\":{\"stackMetaLearnerType\":\"LinearRegression\",\"stackMetaLearnerTrainPercentage\":20.84074496097085,\"stackMetaLearnerKWargs\":\"dataczd\"},\"enableStackEnsemble\":false,\"enableVoteEnsemble\":true,\"ensembleModelDownloadTimeout\":\"PT27H37M10S\",\"enableModelExplainability\":true,\"enableDnnTraining\":false},\"positiveLabel\":\"sstciv\",\"limitSettings\":{\"maxTrials\":636720393,\"trialTimeout\":\"PT55H19M43S\",\"timeout\":\"PT42H27M16S\",\"maxConcurrentTrials\":1561472375,\"maxCoresPerTrial\":1179315377,\"exitScore\":20.777247401023292,\"enableEarlyTermination\":true},\"nCrossValidations\":{\"mode\":\"NCrossValidations\"},\"cvSplitColumnNames\":[\"xrkemjpequlrl\",\"audgjtfbclakkucd\",\"wnhczbutou\"],\"weightColumnName\":\"jtirjwayhicqq\",\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"v\",\"mode\":\"ReadOnlyMount\",\"description\":\"lvlize\"},\"testData\":{\"jobInputType\":\"mltable\",\"uri\":\"biabvnsrgekz\",\"mode\":\"EvalMount\",\"description\":\"dyfhb\"},\"validationDataSize\":71.86910773602595,\"testDataSize\":54.066554814118874,\"featurizationSettings\":{\"mode\":\"Auto\",\"blockedTransformers\":[\"LabelEncoder\",\"NaiveBayes\",\"WordEmbedding\",\"HashOneHotEncoder\"],\"columnNameAndTypes\":{\"jrz\":\"qjsgyzst\",\"iitt\":\"rknsfdrlduyeh\",\"csozjv\":\"gyuqwrldaxurfqa\"},\"transformerParams\":{\"ttoztj\":[{\"fields\":[\"gbnvt\",\"o\"],\"parameters\":\"dataalzyxwhoeamo\"},{\"fields\":[\"doey\",\"fpnimtwuuhaueg\"],\"parameters\":\"datawmnfeubtzjyrkwfu\"},{\"fields\":[\"hrrk\",\"umnqdurhzzfopu\"],\"parameters\":\"dataqusvwlujopwnib\"}],\"feapdrbzyvbsuadu\":[{\"fields\":[\"qvfmwcad\",\"tgctxe\"],\"parameters\":\"datavgwy\"},{\"fields\":[\"elfnzzryiz\"],\"parameters\":\"dataxgdebxl\"},{\"fields\":[\"no\",\"irhpfabenq\"],\"parameters\":\"datamwmgewayxfl\"},{\"fields\":[\"pjs\"],\"parameters\":\"datahemhcucsqsnxfbx\"}],\"aqufqizjvppwoo\":[{\"fields\":[\"kaxpfobkzhmh\",\"dqltdel\",\"qrojadhfztlray\",\"rkgzkyhudbkuw\"],\"parameters\":\"dataqxlcweakfecjvx\"}],\"cwlo\":[{\"fields\":[\"yjmjjxizxpxhnzls\",\"ekcttgzkjtyqpdwa\",\"egh\"],\"parameters\":\"dataldsvc\"},{\"fields\":[\"iahuqymjzucw\",\"mejjqhddwvmq\"],\"parameters\":\"datayookyfozkbnzxby\"},{\"fields\":[\"pgaixwrgrkkderf\",\"swqi\",\"wepwoggg\"],\"parameters\":\"datawnxhtf\"},{\"fields\":[\"bsudzpgchzpgfqu\",\"jdjxhzghgo\",\"kynrceqavf\",\"bdfmm\"],\"parameters\":\"datadnajuopjyyqmkwlh\"}]},\"enableDnnFeaturization\":false,\"datasetLanguage\":\"kluxxrwzobuzmsxg\"},\"logVerbosity\":\"NotSet\",\"trainingData\":{\"jobInputType\":\"mltable\",\"uri\":\"dtkwppth\",\"mode\":\"EvalDownload\",\"description\":\"rmimrljdpoqfxyem\"},\"targetColumnName\":\"ftb\"}") - .toObject(Classification.class); - Assertions.assertEquals(LogVerbosity.NOT_SET, model.logVerbosity()); - Assertions.assertEquals("rmimrljdpoqfxyem", model.trainingData().description()); - Assertions.assertEquals("dtkwppth", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("ftb", model.targetColumnName()); - Assertions.assertEquals(ClassificationPrimaryMetrics.NORM_MACRO_RECALL, model.primaryMetric()); - Assertions.assertEquals(false, model.trainingSettings().enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.LINEAR_REGRESSION, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(20.84074496097085D, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(false, model.trainingSettings().enableStackEnsemble()); - Assertions.assertEquals(true, model.trainingSettings().enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT27H37M10S"), model.trainingSettings().ensembleModelDownloadTimeout()); - Assertions.assertEquals(true, model.trainingSettings().enableModelExplainability()); - Assertions.assertEquals(false, model.trainingSettings().enableDnnTraining()); - Assertions.assertEquals(ClassificationModels.XGBOOST_CLASSIFIER, - model.trainingSettings().allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(ClassificationModels.MULTINOMIAL_NAIVE_BAYES, - model.trainingSettings().blockedTrainingAlgorithms().get(0)); - Assertions.assertEquals("sstciv", model.positiveLabel()); - Assertions.assertEquals(636720393, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT55H19M43S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals(Duration.parse("PT42H27M16S"), model.limitSettings().timeout()); - Assertions.assertEquals(1561472375, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1179315377, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(20.777247401023292D, model.limitSettings().exitScore()); - Assertions.assertEquals(true, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals("xrkemjpequlrl", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("jtirjwayhicqq", model.weightColumnName()); - Assertions.assertEquals("lvlize", model.validationData().description()); - Assertions.assertEquals("v", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals("dyfhb", model.testData().description()); - Assertions.assertEquals("biabvnsrgekz", model.testData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.testData().mode()); - Assertions.assertEquals(71.86910773602595D, model.validationDataSize()); - Assertions.assertEquals(54.066554814118874D, model.testDataSize()); - Assertions.assertEquals("kluxxrwzobuzmsxg", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(FeaturizationMode.AUTO, model.featurizationSettings().mode()); - Assertions.assertEquals(BlockedTransformers.LABEL_ENCODER, - model.featurizationSettings().blockedTransformers().get(0)); - Assertions.assertEquals("qjsgyzst", model.featurizationSettings().columnNameAndTypes().get("jrz")); - Assertions.assertEquals("gbnvt", - model.featurizationSettings().transformerParams().get("ttoztj").get(0).fields().get(0)); - Assertions.assertEquals(false, model.featurizationSettings().enableDnnFeaturization()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Classification model = new Classification().withLogVerbosity(LogVerbosity.NOT_SET) - .withTrainingData(new MLTableJobInput().withDescription("rmimrljdpoqfxyem") - .withUri("dtkwppth") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD)) - .withTargetColumnName("ftb") - .withPrimaryMetric(ClassificationPrimaryMetrics.NORM_MACRO_RECALL) - .withTrainingSettings(new ClassificationTrainingSettings().withEnableOnnxCompatibleModels(false) - .withStackEnsembleSettings( - new StackEnsembleSettings().withStackMetaLearnerType(StackMetaLearnerType.LINEAR_REGRESSION) - .withStackMetaLearnerTrainPercentage(20.84074496097085D) - .withStackMetaLearnerKWargs("dataczd")) - .withEnableStackEnsemble(false) - .withEnableVoteEnsemble(true) - .withEnsembleModelDownloadTimeout(Duration.parse("PT27H37M10S")) - .withEnableModelExplainability(true) - .withEnableDnnTraining(false) - .withAllowedTrainingAlgorithms(Arrays.asList(ClassificationModels.XGBOOST_CLASSIFIER, - ClassificationModels.RANDOM_FOREST, ClassificationModels.KNN)) - .withBlockedTrainingAlgorithms(Arrays.asList(ClassificationModels.MULTINOMIAL_NAIVE_BAYES, - ClassificationModels.GRADIENT_BOOSTING))) - .withPositiveLabel("sstciv") - .withLimitSettings(new TableVerticalLimitSettings().withMaxTrials(636720393) - .withTrialTimeout(Duration.parse("PT55H19M43S")) - .withTimeout(Duration.parse("PT42H27M16S")) - .withMaxConcurrentTrials(1561472375) - .withMaxCoresPerTrial(1179315377) - .withExitScore(20.777247401023292D) - .withEnableEarlyTermination(true)) - .withNCrossValidations(new NCrossValidations()) - .withCvSplitColumnNames(Arrays.asList("xrkemjpequlrl", "audgjtfbclakkucd", "wnhczbutou")) - .withWeightColumnName("jtirjwayhicqq") - .withValidationData(new MLTableJobInput().withDescription("lvlize") - .withUri("v") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT)) - .withTestData(new MLTableJobInput().withDescription("dyfhb") - .withUri("biabvnsrgekz") - .withMode(InputDeliveryMode.EVAL_MOUNT)) - .withValidationDataSize(71.86910773602595D) - .withTestDataSize(54.066554814118874D) - .withFeaturizationSettings(new TableVerticalFeaturizationSettings().withDatasetLanguage("kluxxrwzobuzmsxg") - .withMode(FeaturizationMode.AUTO) - .withBlockedTransformers( - Arrays.asList(BlockedTransformers.LABEL_ENCODER, BlockedTransformers.NAIVE_BAYES, - BlockedTransformers.WORD_EMBEDDING, BlockedTransformers.HASH_ONE_HOT_ENCODER)) - .withColumnNameAndTypes(mapOf("jrz", "qjsgyzst", "iitt", "rknsfdrlduyeh", "csozjv", "gyuqwrldaxurfqa")) - .withTransformerParams(mapOf("ttoztj", Arrays.asList( - new ColumnTransformer().withFields(Arrays.asList("gbnvt", "o")).withParameters("dataalzyxwhoeamo"), - new ColumnTransformer().withFields(Arrays.asList("doey", "fpnimtwuuhaueg")) - .withParameters("datawmnfeubtzjyrkwfu"), - new ColumnTransformer().withFields(Arrays.asList("hrrk", "umnqdurhzzfopu")) - .withParameters("dataqusvwlujopwnib")), - "feapdrbzyvbsuadu", - Arrays.asList( - new ColumnTransformer().withFields(Arrays.asList("qvfmwcad", "tgctxe")) - .withParameters("datavgwy"), - new ColumnTransformer().withFields(Arrays.asList("elfnzzryiz")).withParameters("dataxgdebxl"), - new ColumnTransformer().withFields(Arrays.asList("no", "irhpfabenq")) - .withParameters("datamwmgewayxfl"), - new ColumnTransformer().withFields(Arrays.asList("pjs")).withParameters("datahemhcucsqsnxfbx")), - "aqufqizjvppwoo", - Arrays.asList(new ColumnTransformer() - .withFields(Arrays.asList("kaxpfobkzhmh", "dqltdel", "qrojadhfztlray", "rkgzkyhudbkuw")) - .withParameters("dataqxlcweakfecjvx")), - "cwlo", - Arrays.asList( - new ColumnTransformer().withFields(Arrays.asList("yjmjjxizxpxhnzls", "ekcttgzkjtyqpdwa", "egh")) - .withParameters("dataldsvc"), - new ColumnTransformer().withFields(Arrays.asList("iahuqymjzucw", "mejjqhddwvmq")) - .withParameters("datayookyfozkbnzxby"), - new ColumnTransformer().withFields(Arrays.asList("pgaixwrgrkkderf", "swqi", "wepwoggg")) - .withParameters("datawnxhtf"), - new ColumnTransformer() - .withFields(Arrays.asList("bsudzpgchzpgfqu", "jdjxhzghgo", "kynrceqavf", "bdfmm")) - .withParameters("datadnajuopjyyqmkwlh")))) - .withEnableDnnFeaturization(false)); - model = BinaryData.fromObject(model).toObject(Classification.class); - Assertions.assertEquals(LogVerbosity.NOT_SET, model.logVerbosity()); - Assertions.assertEquals("rmimrljdpoqfxyem", model.trainingData().description()); - Assertions.assertEquals("dtkwppth", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("ftb", model.targetColumnName()); - Assertions.assertEquals(ClassificationPrimaryMetrics.NORM_MACRO_RECALL, model.primaryMetric()); - Assertions.assertEquals(false, model.trainingSettings().enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.LINEAR_REGRESSION, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(20.84074496097085D, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(false, model.trainingSettings().enableStackEnsemble()); - Assertions.assertEquals(true, model.trainingSettings().enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT27H37M10S"), model.trainingSettings().ensembleModelDownloadTimeout()); - Assertions.assertEquals(true, model.trainingSettings().enableModelExplainability()); - Assertions.assertEquals(false, model.trainingSettings().enableDnnTraining()); - Assertions.assertEquals(ClassificationModels.XGBOOST_CLASSIFIER, - model.trainingSettings().allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(ClassificationModels.MULTINOMIAL_NAIVE_BAYES, - model.trainingSettings().blockedTrainingAlgorithms().get(0)); - Assertions.assertEquals("sstciv", model.positiveLabel()); - Assertions.assertEquals(636720393, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT55H19M43S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals(Duration.parse("PT42H27M16S"), model.limitSettings().timeout()); - Assertions.assertEquals(1561472375, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1179315377, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(20.777247401023292D, model.limitSettings().exitScore()); - Assertions.assertEquals(true, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals("xrkemjpequlrl", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("jtirjwayhicqq", model.weightColumnName()); - Assertions.assertEquals("lvlize", model.validationData().description()); - Assertions.assertEquals("v", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals("dyfhb", model.testData().description()); - Assertions.assertEquals("biabvnsrgekz", model.testData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.testData().mode()); - Assertions.assertEquals(71.86910773602595D, model.validationDataSize()); - Assertions.assertEquals(54.066554814118874D, model.testDataSize()); - Assertions.assertEquals("kluxxrwzobuzmsxg", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(FeaturizationMode.AUTO, model.featurizationSettings().mode()); - Assertions.assertEquals(BlockedTransformers.LABEL_ENCODER, - model.featurizationSettings().blockedTransformers().get(0)); - Assertions.assertEquals("qjsgyzst", model.featurizationSettings().columnNameAndTypes().get("jrz")); - Assertions.assertEquals("gbnvt", - model.featurizationSettings().transformerParams().get("ttoztj").get(0).fields().get(0)); - Assertions.assertEquals(false, model.featurizationSettings().enableDnnFeaturization()); - } - - // 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/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 1b6542b32fb9a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClassificationTrainingSettingsTests.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.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\":[\"ExtremeRandomTrees\",\"DecisionTree\",\"KNN\",\"SVM\"],\"blockedTrainingAlgorithms\":[\"SGD\",\"LogisticRegression\",\"XGBoostClassifier\",\"LinearSVM\"],\"enableOnnxCompatibleModels\":false,\"stackEnsembleSettings\":{\"stackMetaLearnerType\":\"LightGBMRegressor\",\"stackMetaLearnerTrainPercentage\":99.81987601096077,\"stackMetaLearnerKWargs\":\"dataqcnrrfijhggabqb\"},\"enableStackEnsemble\":false,\"enableVoteEnsemble\":true,\"ensembleModelDownloadTimeout\":\"PT110H9M4S\",\"enableModelExplainability\":true,\"enableDnnTraining\":false}") - .toObject(ClassificationTrainingSettings.class); - Assertions.assertEquals(false, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.LIGHT_GBMREGRESSOR, - model.stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(99.81987601096077D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(false, model.enableStackEnsemble()); - Assertions.assertEquals(true, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT110H9M4S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(true, model.enableModelExplainability()); - Assertions.assertEquals(false, model.enableDnnTraining()); - Assertions.assertEquals(ClassificationModels.EXTREME_RANDOM_TREES, model.allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(ClassificationModels.SGD, model.blockedTrainingAlgorithms().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClassificationTrainingSettings model - = new ClassificationTrainingSettings().withEnableOnnxCompatibleModels(false) - .withStackEnsembleSettings( - new StackEnsembleSettings().withStackMetaLearnerType(StackMetaLearnerType.LIGHT_GBMREGRESSOR) - .withStackMetaLearnerTrainPercentage(99.81987601096077D) - .withStackMetaLearnerKWargs("dataqcnrrfijhggabqb")) - .withEnableStackEnsemble(false) - .withEnableVoteEnsemble(true) - .withEnsembleModelDownloadTimeout(Duration.parse("PT110H9M4S")) - .withEnableModelExplainability(true) - .withEnableDnnTraining(false) - .withAllowedTrainingAlgorithms(Arrays.asList(ClassificationModels.EXTREME_RANDOM_TREES, - ClassificationModels.DECISION_TREE, ClassificationModels.KNN, ClassificationModels.SVM)) - .withBlockedTrainingAlgorithms( - Arrays.asList(ClassificationModels.SGD, ClassificationModels.LOGISTIC_REGRESSION, - ClassificationModels.XGBOOST_CLASSIFIER, ClassificationModels.LINEAR_SVM)); - model = BinaryData.fromObject(model).toObject(ClassificationTrainingSettings.class); - Assertions.assertEquals(false, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.LIGHT_GBMREGRESSOR, - model.stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(99.81987601096077D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(false, model.enableStackEnsemble()); - Assertions.assertEquals(true, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT110H9M4S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(true, model.enableModelExplainability()); - Assertions.assertEquals(false, model.enableDnnTraining()); - Assertions.assertEquals(ClassificationModels.EXTREME_RANDOM_TREES, model.allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(ClassificationModels.SGD, 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 46ffbae7342f5..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClusterUpdateParametersTests.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.ClusterUpdateParameters; -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 ClusterUpdateParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterUpdateParameters model = BinaryData.fromString( - "{\"properties\":{\"properties\":{\"scaleSettings\":{\"maxNodeCount\":932562427,\"minNodeCount\":2103137599,\"nodeIdleTimeBeforeScaleDown\":\"PT10H3M4S\"}}}}") - .toObject(ClusterUpdateParameters.class); - Assertions.assertEquals(932562427, model.properties().scaleSettings().maxNodeCount()); - Assertions.assertEquals(2103137599, model.properties().scaleSettings().minNodeCount()); - Assertions.assertEquals(Duration.parse("PT10H3M4S"), - model.properties().scaleSettings().nodeIdleTimeBeforeScaleDown()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterUpdateParameters model = new ClusterUpdateParameters().withProperties( - new ScaleSettingsInformation().withScaleSettings(new ScaleSettings().withMaxNodeCount(932562427) - .withMinNodeCount(2103137599) - .withNodeIdleTimeBeforeScaleDown(Duration.parse("PT10H3M4S")))); - model = BinaryData.fromObject(model).toObject(ClusterUpdateParameters.class); - Assertions.assertEquals(932562427, model.properties().scaleSettings().maxNodeCount()); - Assertions.assertEquals(2103137599, model.properties().scaleSettings().minNodeCount()); - Assertions.assertEquals(Duration.parse("PT10H3M4S"), - model.properties().scaleSettings().nodeIdleTimeBeforeScaleDown()); - } -} 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 6b6e4484b286d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClusterUpdatePropertiesTests.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.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\":2125596553,\"minNodeCount\":236135695,\"nodeIdleTimeBeforeScaleDown\":\"PT176H56M43S\"}}}") - .toObject(ClusterUpdateProperties.class); - Assertions.assertEquals(2125596553, model.properties().scaleSettings().maxNodeCount()); - Assertions.assertEquals(236135695, model.properties().scaleSettings().minNodeCount()); - Assertions.assertEquals(Duration.parse("PT176H56M43S"), - 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(2125596553) - .withMinNodeCount(236135695) - .withNodeIdleTimeBeforeScaleDown(Duration.parse("PT176H56M43S")))); - model = BinaryData.fromObject(model).toObject(ClusterUpdateProperties.class); - Assertions.assertEquals(2125596553, model.properties().scaleSettings().maxNodeCount()); - Assertions.assertEquals(236135695, model.properties().scaleSettings().minNodeCount()); - Assertions.assertEquals(Duration.parse("PT176H56M43S"), - 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 af80271d0e434..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerInnerTests.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.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\":{\"provisioningState\":\"Updating\",\"isArchived\":true,\"latestVersion\":\"buruvd\",\"nextVersion\":\"vsmzlxwab\",\"description\":\"oefki\",\"tags\":{\"gkfbtndoaong\":\"tpuqujmq\",\"tcje\":\"jcntuj\",\"zfoqouicybxar\":\"ftwwaezkojvdc\"},\"properties\":{\"x\":\"zuf\",\"khazxkhnzbonlwn\":\"iqopidoamciod\",\"szzcmrvexztv\":\"oegokdwbwh\",\"gsfraoyzkoow\":\"t\"}},\"id\":\"mnguxawqaldsyu\",\"name\":\"ximerqfobwyznk\",\"type\":\"ykutwpf\"}") - .toObject(CodeContainerInner.class); - Assertions.assertEquals("oefki", model.properties().description()); - Assertions.assertEquals("tpuqujmq", model.properties().tags().get("gkfbtndoaong")); - Assertions.assertEquals("zuf", model.properties().properties().get("x")); - Assertions.assertEquals(true, model.properties().isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CodeContainerInner model - = new CodeContainerInner().withProperties(new CodeContainerProperties().withDescription("oefki") - .withTags(mapOf("gkfbtndoaong", "tpuqujmq", "tcje", "jcntuj", "zfoqouicybxar", "ftwwaezkojvdc")) - .withProperties(mapOf("x", "zuf", "khazxkhnzbonlwn", "iqopidoamciod", "szzcmrvexztv", "oegokdwbwh", - "gsfraoyzkoow", "t")) - .withIsArchived(true)); - model = BinaryData.fromObject(model).toObject(CodeContainerInner.class); - Assertions.assertEquals("oefki", model.properties().description()); - Assertions.assertEquals("tpuqujmq", model.properties().tags().get("gkfbtndoaong")); - Assertions.assertEquals("zuf", model.properties().properties().get("x")); - Assertions.assertEquals(true, model.properties().isArchived()); - } - - // 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/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 8a1bf482c65e7..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerPropertiesTests.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.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( - "{\"provisioningState\":\"Deleting\",\"isArchived\":false,\"latestVersion\":\"r\",\"nextVersion\":\"dsnfdsdoakgtdl\",\"description\":\"kzevdlhewpusds\",\"tags\":{\"kufgmj\":\"vogvbbejdcngqqmo\",\"grtwae\":\"rwr\",\"zkopb\":\"u\"},\"properties\":{\"hziuiefozbhdms\":\"rfdwoyu\",\"zqhof\":\"l\"}}") - .toObject(CodeContainerProperties.class); - Assertions.assertEquals("kzevdlhewpusds", model.description()); - Assertions.assertEquals("vogvbbejdcngqqmo", model.tags().get("kufgmj")); - Assertions.assertEquals("rfdwoyu", model.properties().get("hziuiefozbhdms")); - Assertions.assertEquals(false, model.isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CodeContainerProperties model = new CodeContainerProperties().withDescription("kzevdlhewpusds") - .withTags(mapOf("kufgmj", "vogvbbejdcngqqmo", "grtwae", "rwr", "zkopb", "u")) - .withProperties(mapOf("hziuiefozbhdms", "rfdwoyu", "zqhof", "l")) - .withIsArchived(false); - model = BinaryData.fromObject(model).toObject(CodeContainerProperties.class); - Assertions.assertEquals("kzevdlhewpusds", model.description()); - Assertions.assertEquals("vogvbbejdcngqqmo", model.tags().get("kufgmj")); - Assertions.assertEquals("rfdwoyu", model.properties().get("hziuiefozbhdms")); - Assertions.assertEquals(false, model.isArchived()); - } - - // 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/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 0465407bf61cd..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerResourceArmPaginatedResultTests.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.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( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"isArchived\":false,\"latestVersion\":\"mzqa\",\"nextVersion\":\"rmnjijpx\",\"description\":\"q\",\"tags\":{\"yxbaaabjyvayf\":\"fn\",\"exn\":\"imrzrtuzqog\",\"zsoibjudpfrxtr\":\"vfdnwnwmewzsyyce\",\"ytdw\":\"hzv\"},\"properties\":{\"vpdtiirqtdqoa\":\"rqubpaxhexiil\",\"eptra\":\"oruzfgsquyfxrxx\"}},\"id\":\"jezwlwnw\",\"name\":\"uqlcvydy\",\"type\":\"atdooaojkniod\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"isArchived\":false,\"latestVersion\":\"nuj\",\"nextVersion\":\"mmsbvdkcrodtjin\",\"description\":\"jlfltkacjvefkdlf\",\"tags\":{\"qblylsyxkqj\":\"ggkfpagaowpul\",\"gxsds\":\"sjervti\"},\"properties\":{\"nqicvinvkjjxdxrb\":\"mpsbzkfzbeyv\"}},\"id\":\"kzclewyh\",\"name\":\"lw\",\"type\":\"aztz\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"latestVersion\":\"kwyfzqwhxxbuyqax\",\"nextVersion\":\"eqz\",\"description\":\"priolx\",\"tags\":{\"ncwsob\":\"altol\",\"pfuvglsbjjca\":\"wcsdbnwdcfhucq\",\"t\":\"vxb\"},\"properties\":{\"lxqtvcofudfl\":\"utncorm\"}},\"id\":\"gj\",\"name\":\"bgdknnqv\",\"type\":\"aznqntoru\"}],\"nextLink\":\"gsahmkycgrauw\"}") - .toObject(CodeContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("q", model.value().get(0).properties().description()); - Assertions.assertEquals("fn", model.value().get(0).properties().tags().get("yxbaaabjyvayf")); - Assertions.assertEquals("rqubpaxhexiil", model.value().get(0).properties().properties().get("vpdtiirqtdqoa")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("gsahmkycgrauw", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CodeContainerResourceArmPaginatedResult model - = new CodeContainerResourceArmPaginatedResult().withValue(Arrays.asList( - new CodeContainerInner().withProperties(new CodeContainerProperties().withDescription("q") - .withTags(mapOf("yxbaaabjyvayf", "fn", "exn", "imrzrtuzqog", "zsoibjudpfrxtr", "vfdnwnwmewzsyyce", - "ytdw", "hzv")) - .withProperties(mapOf("vpdtiirqtdqoa", "rqubpaxhexiil", "eptra", "oruzfgsquyfxrxx")) - .withIsArchived(false)), - new CodeContainerInner() - .withProperties(new CodeContainerProperties().withDescription("jlfltkacjvefkdlf") - .withTags(mapOf("qblylsyxkqj", "ggkfpagaowpul", "gxsds", "sjervti")) - .withProperties(mapOf("nqicvinvkjjxdxrb", "mpsbzkfzbeyv")) - .withIsArchived(false)), - new CodeContainerInner().withProperties(new CodeContainerProperties().withDescription("priolx") - .withTags(mapOf("ncwsob", "altol", "pfuvglsbjjca", "wcsdbnwdcfhucq", "t", "vxb")) - .withProperties(mapOf("lxqtvcofudfl", "utncorm")) - .withIsArchived(true)))) - .withNextLink("gsahmkycgrauw"); - model = BinaryData.fromObject(model).toObject(CodeContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("q", model.value().get(0).properties().description()); - Assertions.assertEquals("fn", model.value().get(0).properties().tags().get("yxbaaabjyvayf")); - Assertions.assertEquals("rqubpaxhexiil", model.value().get(0).properties().properties().get("vpdtiirqtdqoa")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("gsahmkycgrauw", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 35f77adec0c6d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersCreateOrUpdateWithResponseMockTests.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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.CodeContainer; -import com.azure.resourcemanager.machinelearning.models.CodeContainerProperties; -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 reactor.core.publisher.Mono; - -public final class CodeContainersCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Creating\",\"isArchived\":false,\"latestVersion\":\"mluyrlkpismmr\",\"nextVersion\":\"jpjthizsabcylzz\",\"description\":\"tumzenkrdruesxe\",\"tags\":{\"qqeetsqac\":\"xoibdctjwfeb\",\"yyraiaiidkewqwa\":\"czfro\",\"fngfpilloir\":\"ptldddorzljhnxfk\",\"bktuqnbcjk\":\"vx\"},\"properties\":{\"inlic\":\"mznwwtkuytwii\",\"yzqke\":\"moyoioxdwff\",\"uecokyduqzusc\":\"curr\",\"htekxnvkdvc\":\"lbqv\"}},\"id\":\"wrd\",\"name\":\"ddddwzdlbbcztam\",\"type\":\"yrkwsthpivocf\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("uvqbeyxwrmupzpe") - .withExistingWorkspace("gynsixgzbbnug", "quarb") - .withProperties(new CodeContainerProperties().withDescription("gen") - .withTags(mapOf("ppgl", "ybepsihzqieoy", "zlycxlubrukhqb", "jsfgbyyts")) - .withProperties(mapOf("fjjfexuvsveam", "rbdkgqdmvvvj", "io", "eauuuvh", "mtyosdpxtsdy", - "glmufzuuyszhae", "wxiavwmixaqgfpu", "fgefvwgwp")) - .withIsArchived(true)) - .create(); - - Assertions.assertEquals("tumzenkrdruesxe", response.properties().description()); - Assertions.assertEquals("xoibdctjwfeb", response.properties().tags().get("qqeetsqac")); - Assertions.assertEquals("mznwwtkuytwii", response.properties().properties().get("inlic")); - Assertions.assertEquals(false, response.properties().isArchived()); - } - - // 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/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 aa77dc1ed8e2c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersDeleteWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class CodeContainersDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("glafnfgazaghddc", "zwxuxorrutuhvem", "xlssolqypvw", 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 ebe02e07238a5..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.CodeContainer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class CodeContainersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"latestVersion\":\"uod\",\"nextVersion\":\"gqu\",\"description\":\"nyxpmqd\",\"tags\":{\"sq\":\"iiontqikdipk\",\"tacvs\":\"uzabrsoihataj\",\"adohsj\":\"nssxylsui\",\"qqnzk\":\"iehkxgfu\"},\"properties\":{\"sxipdnlbyit\":\"q\"}},\"id\":\"pwwgzeylzp\",\"name\":\"imxacrkt\",\"type\":\"o\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("lxo", "vrkqv", "vgdojcvzfcmxmjp", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("nyxpmqd", response.properties().description()); - Assertions.assertEquals("iiontqikdipk", response.properties().tags().get("sq")); - Assertions.assertEquals("q", response.properties().properties().get("sxipdnlbyit")); - Assertions.assertEquals(true, 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 59200a0c881b3..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.CodeContainer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class CodeContainersListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"isArchived\":false,\"latestVersion\":\"kbzltnowpajfhx\",\"nextVersion\":\"ubbzadzglmuuzps\",\"description\":\"sypxmul\",\"tags\":{\"p\":\"rerk\",\"bdjkmnxsggnow\":\"fjxkbywsbuqfm\"},\"properties\":{\"hbtyc\":\"vdbrdvsv\",\"rcthypepxs\":\"lkusgiik\"}},\"id\":\"rdis\",\"name\":\"sdvkym\",\"type\":\"tcwmivoxgzeg\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("r", "tqnk", "qjftvltj", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("sypxmul", response.iterator().next().properties().description()); - Assertions.assertEquals("rerk", response.iterator().next().properties().tags().get("p")); - Assertions.assertEquals("vdbrdvsv", response.iterator().next().properties().properties().get("hbtyc")); - 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 3bb75c6fd3657..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsDeleteWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class CodeVersionsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("wowqsnixxwdqz", "rvuk", "zkmxbh", "p", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsPublishMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsPublishMockTests.java deleted file mode 100644 index aaa1a16623a03..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsPublishMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class CodeVersionsPublishMockTests { - @Test - public void testPublish() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.codeVersions() - .publish("mq", "vbksksmqm", "owrmhm", "fhfutjyxntmgtg", - new DestinationAsset().withRegistryName("aem") - .withDestinationName("gcaxjymdqrfvgicx") - .withDestinationVersion("llqgnsydksvj"), - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CollectionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CollectionTests.java deleted file mode 100644 index 297698e7bdbd3..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CollectionTests.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.Collection; -import com.azure.resourcemanager.machinelearning.models.DataCollectionMode; -import org.junit.jupiter.api.Assertions; - -public final class CollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Collection model = BinaryData.fromString( - "{\"samplingRate\":14.031026456945018,\"dataCollectionMode\":\"Disabled\",\"dataId\":\"lmgnlqxsjx\",\"clientId\":\"lexhv\"}") - .toObject(Collection.class); - Assertions.assertEquals(14.031026456945018D, model.samplingRate()); - Assertions.assertEquals(DataCollectionMode.DISABLED, model.dataCollectionMode()); - Assertions.assertEquals("lmgnlqxsjx", model.dataId()); - Assertions.assertEquals("lexhv", model.clientId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Collection model = new Collection().withSamplingRate(14.031026456945018D) - .withDataCollectionMode(DataCollectionMode.DISABLED) - .withDataId("lmgnlqxsjx") - .withClientId("lexhv"); - model = BinaryData.fromObject(model).toObject(Collection.class); - Assertions.assertEquals(14.031026456945018D, model.samplingRate()); - Assertions.assertEquals(DataCollectionMode.DISABLED, model.dataCollectionMode()); - Assertions.assertEquals("lmgnlqxsjx", model.dataId()); - Assertions.assertEquals("lexhv", model.clientId()); - } -} 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 dc91a0dc1cc0b..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\":[\"psdudgco\",\"zomehxlantolam\",\"bijux\",\"qllczipvwdtgckz\"],\"parameters\":\"dataiqdlratrkw\"}") - .toObject(ColumnTransformer.class); - Assertions.assertEquals("psdudgco", model.fields().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ColumnTransformer model = new ColumnTransformer() - .withFields(Arrays.asList("psdudgco", "zomehxlantolam", "bijux", "qllczipvwdtgckz")) - .withParameters("dataiqdlratrkw"); - model = BinaryData.fromObject(model).toObject(ColumnTransformer.class); - Assertions.assertEquals("psdudgco", 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 0798a96a7c146..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CommandJobLimitsTests.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.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\":\"PT211H51M18S\"}") - .toObject(CommandJobLimits.class); - Assertions.assertEquals(Duration.parse("PT211H51M18S"), model.timeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CommandJobLimits model = new CommandJobLimits().withTimeout(Duration.parse("PT211H51M18S")); - model = BinaryData.fromObject(model).toObject(CommandJobLimits.class); - Assertions.assertEquals(Duration.parse("PT211H51M18S"), 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 8e73d1982e982..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerInnerTests.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.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\":{\"provisioningState\":\"Failed\",\"isArchived\":true,\"latestVersion\":\"phqamvdkfwynwcvt\",\"nextVersion\":\"kayh\",\"description\":\"nvyq\",\"tags\":{\"cjaesgvvs\":\"kzwpcnpw\",\"wygzlvdnkfxusem\":\"cyajguqf\",\"pfcqdp\":\"wzrmuh\"},\"properties\":{\"celve\":\"qvpsvuoymg\"}},\"id\":\"ypql\",\"name\":\"feo\",\"type\":\"erqwkyhkobopg\"}") - .toObject(ComponentContainerInner.class); - Assertions.assertEquals("nvyq", model.properties().description()); - Assertions.assertEquals("kzwpcnpw", model.properties().tags().get("cjaesgvvs")); - Assertions.assertEquals("qvpsvuoymg", model.properties().properties().get("celve")); - Assertions.assertEquals(true, model.properties().isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComponentContainerInner model - = new ComponentContainerInner().withProperties(new ComponentContainerProperties().withDescription("nvyq") - .withTags(mapOf("cjaesgvvs", "kzwpcnpw", "wygzlvdnkfxusem", "cyajguqf", "pfcqdp", "wzrmuh")) - .withProperties(mapOf("celve", "qvpsvuoymg")) - .withIsArchived(true)); - model = BinaryData.fromObject(model).toObject(ComponentContainerInner.class); - Assertions.assertEquals("nvyq", model.properties().description()); - Assertions.assertEquals("kzwpcnpw", model.properties().tags().get("cjaesgvvs")); - Assertions.assertEquals("qvpsvuoymg", model.properties().properties().get("celve")); - Assertions.assertEquals(true, model.properties().isArchived()); - } - - // 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/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 8e0af55f95c0c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerPropertiesTests.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.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( - "{\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"latestVersion\":\"epbqpcrfkbw\",\"nextVersion\":\"snjvcdwxlpqekftn\",\"description\":\"tjsyin\",\"tags\":{\"gikdgsz\":\"qatmtdhtmdvy\"},\"properties\":{\"kj\":\"birryuzhl\"}}") - .toObject(ComponentContainerProperties.class); - Assertions.assertEquals("tjsyin", model.description()); - Assertions.assertEquals("qatmtdhtmdvy", model.tags().get("gikdgsz")); - Assertions.assertEquals("birryuzhl", model.properties().get("kj")); - Assertions.assertEquals(true, model.isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComponentContainerProperties model = new ComponentContainerProperties().withDescription("tjsyin") - .withTags(mapOf("gikdgsz", "qatmtdhtmdvy")) - .withProperties(mapOf("kj", "birryuzhl")) - .withIsArchived(true); - model = BinaryData.fromObject(model).toObject(ComponentContainerProperties.class); - Assertions.assertEquals("tjsyin", model.description()); - Assertions.assertEquals("qatmtdhtmdvy", model.tags().get("gikdgsz")); - Assertions.assertEquals("birryuzhl", model.properties().get("kj")); - Assertions.assertEquals(true, model.isArchived()); - } - - // 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/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 07d11a4d8a93b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerResourceArmPaginatedResultTests.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.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( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"mwutwbdsre\",\"nextVersion\":\"drhneuyow\",\"description\":\"d\",\"tags\":{\"ib\":\"i\"},\"properties\":{\"lfzxiavrmbzonoki\":\"gpikpzimejza\",\"rgz\":\"rjqc\"}},\"id\":\"rlazszrnw\",\"name\":\"iin\",\"type\":\"fpwpjylwbt\"},{\"properties\":{\"provisioningState\":\"Failed\",\"isArchived\":false,\"latestVersion\":\"cdhszf\",\"nextVersion\":\"fbgofeljagrqmqh\",\"description\":\"vriiio\",\"tags\":{\"fk\":\"lg\"},\"properties\":{\"ueluqhhahhxvrhmz\":\"sexso\",\"ughftqsx\":\"wpjgwws\",\"grjguufzd\":\"qxujxukndxd\"}},\"id\":\"yqtfihwh\",\"name\":\"otzi\",\"type\":\"gamv\"}],\"nextLink\":\"ho\"}") - .toObject(ComponentContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("d", model.value().get(0).properties().description()); - Assertions.assertEquals("i", model.value().get(0).properties().tags().get("ib")); - Assertions.assertEquals("gpikpzimejza", model.value().get(0).properties().properties().get("lfzxiavrmbzonoki")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("ho", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComponentContainerResourceArmPaginatedResult model - = new ComponentContainerResourceArmPaginatedResult().withValue(Arrays.asList( - new ComponentContainerInner().withProperties(new ComponentContainerProperties().withDescription("d") - .withTags(mapOf("ib", "i")) - .withProperties(mapOf("lfzxiavrmbzonoki", "gpikpzimejza", "rgz", "rjqc")) - .withIsArchived(false)), - new ComponentContainerInner() - .withProperties(new ComponentContainerProperties().withDescription("vriiio") - .withTags(mapOf("fk", "lg")) - .withProperties( - mapOf("ueluqhhahhxvrhmz", "sexso", "ughftqsx", "wpjgwws", "grjguufzd", "qxujxukndxd")) - .withIsArchived(false)))) - .withNextLink("ho"); - model = BinaryData.fromObject(model).toObject(ComponentContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("d", model.value().get(0).properties().description()); - Assertions.assertEquals("i", model.value().get(0).properties().tags().get("ib")); - Assertions.assertEquals("gpikpzimejza", model.value().get(0).properties().properties().get("lfzxiavrmbzonoki")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("ho", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 f1dc2f7ce6ad9..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersCreateOrUpdateWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComponentContainer; -import com.azure.resourcemanager.machinelearning.models.ComponentContainerProperties; -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 reactor.core.publisher.Mono; - -public final class ComponentContainersCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Canceled\",\"isArchived\":false,\"latestVersion\":\"snrgaxoyvg\",\"nextVersion\":\"pfyxhsppvjsduouo\",\"description\":\"enqsom\",\"tags\":{\"reuwv\":\"eqeapaseqcppyp\",\"tqgtllwyoxz\":\"hndyvtoiqofz\",\"mo\":\"hellitpqvpivrsgq\"},\"properties\":{\"acgihnalpc\":\"omebzvtvxxfsfo\",\"zikatywedb\":\"edybkbgdwbmi\"}},\"id\":\"rbzp\",\"name\":\"uzbbhxncs\",\"type\":\"dw\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("jpcroxpp") - .withExistingWorkspace("dfeemxiurpf", "vypmwdz") - .withProperties(new ComponentContainerProperties().withDescription("c") - .withTags(mapOf("nst", "vwlxd", "xklr", "eurd", "dpkihqhnfubev", "atsiznymwz", "evltfebq", "adxcez")) - .withProperties(mapOf("ak", "akl", "ftwrphmr", "stif")) - .withIsArchived(true)) - .create(); - - Assertions.assertEquals("enqsom", response.properties().description()); - Assertions.assertEquals("eqeapaseqcppyp", response.properties().tags().get("reuwv")); - Assertions.assertEquals("omebzvtvxxfsfo", response.properties().properties().get("acgihnalpc")); - Assertions.assertEquals(false, response.properties().isArchived()); - } - - // 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/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 e881aea5968d8..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersDeleteWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ComponentContainersDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("lirybytcaqp", "ohlcbnrv", "yyhhsis", 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 8bfb87dee85e9..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComponentContainer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ComponentContainersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Updating\",\"isArchived\":true,\"latestVersion\":\"imkjzcx\",\"nextVersion\":\"jdfxvksijrjgyin\",\"description\":\"xijovuyxuupzeadd\",\"tags\":{\"vj\":\"pdtphvj\",\"htnyz\":\"ykngqyiyjxzxb\"},\"properties\":{\"koabfcvefbw\":\"nrmd\"}},\"id\":\"mgyqshsasmryuyut\",\"name\":\"bxrgrztkyqgu\",\"type\":\"uuihkybgkyncyzj\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("tq", "rpa", "teqiwd", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("xijovuyxuupzeadd", response.properties().description()); - Assertions.assertEquals("pdtphvj", response.properties().tags().get("vj")); - Assertions.assertEquals("nrmd", response.properties().properties().get("koabfcvefbw")); - Assertions.assertEquals(true, 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 a9a1772c99cbd..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComponentContainer; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ComponentContainersListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"isArchived\":true,\"latestVersion\":\"rijebm\",\"nextVersion\":\"ongmndwohoeas\",\"description\":\"xfvbjimzwyns\",\"tags\":{\"jmjwqdslqreofz\":\"hvkyezwseyuo\",\"xsy\":\"krztpyaymhxlnmw\"},\"properties\":{\"vyotpcvpahhpk\":\"tvqmim\",\"dwtominru\":\"yqpvzxxz\"}},\"id\":\"qau\",\"name\":\"gasfmhbxv\",\"type\":\"wkqnatxvuzcc\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("p", "hz", "pqscu", ListViewType.ARCHIVED_ONLY, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("xfvbjimzwyns", response.iterator().next().properties().description()); - Assertions.assertEquals("hvkyezwseyuo", response.iterator().next().properties().tags().get("jmjwqdslqreofz")); - Assertions.assertEquals("tvqmim", response.iterator().next().properties().properties().get("vyotpcvpahhpk")); - 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 cdf01ef90baf9..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionInnerTests.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.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\":\"datauaibrebqaaysj\",\"provisioningState\":\"Canceled\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"tezlwff\",\"tags\":{\"qqmtedltmmji\":\"kpj\",\"upkvipmdsc\":\"yeozphvwauyqncy\",\"totxhojujb\":\"xqupevzhf\",\"n\":\"pelmcuvhixbjxyf\"},\"properties\":{\"ujrywvtyl\":\"coolsttpkiwkkb\"}},\"id\":\"pncur\",\"name\":\"oiwiithtywub\",\"type\":\"cbihwqk\"}") - .toObject(ComponentVersionInner.class); - Assertions.assertEquals("tezlwff", model.properties().description()); - Assertions.assertEquals("kpj", model.properties().tags().get("qqmtedltmmji")); - Assertions.assertEquals("coolsttpkiwkkb", model.properties().properties().get("ujrywvtyl")); - Assertions.assertEquals(true, model.properties().isArchived()); - Assertions.assertEquals(true, model.properties().isAnonymous()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComponentVersionInner model - = new ComponentVersionInner().withProperties(new ComponentVersionProperties().withDescription("tezlwff") - .withTags(mapOf("qqmtedltmmji", "kpj", "upkvipmdsc", "yeozphvwauyqncy", "totxhojujb", "xqupevzhf", "n", - "pelmcuvhixbjxyf")) - .withProperties(mapOf("ujrywvtyl", "coolsttpkiwkkb")) - .withIsArchived(true) - .withIsAnonymous(true) - .withComponentSpec("datauaibrebqaaysj")); - model = BinaryData.fromObject(model).toObject(ComponentVersionInner.class); - Assertions.assertEquals("tezlwff", model.properties().description()); - Assertions.assertEquals("kpj", model.properties().tags().get("qqmtedltmmji")); - Assertions.assertEquals("coolsttpkiwkkb", model.properties().properties().get("ujrywvtyl")); - Assertions.assertEquals(true, model.properties().isArchived()); - Assertions.assertEquals(true, model.properties().isAnonymous()); - } - - // 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/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 a8950803a80b0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionPropertiesTests.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.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\":\"datadntwjchrdgo\",\"provisioningState\":\"Deleting\",\"isArchived\":true,\"isAnonymous\":false,\"description\":\"ond\",\"tags\":{\"fdlwg\":\"uu\",\"gseinq\":\"ytsbwtovv\",\"nepttwqmsni\":\"iufxqknpir\",\"rxfrddhc\":\"fcdmqnrojlpijn\"},\"properties\":{\"hftwesgog\":\"izzronasxiftozqy\",\"sxkkg\":\"zhonnxkrlgnyhmo\",\"rghxjb\":\"h\"}}") - .toObject(ComponentVersionProperties.class); - Assertions.assertEquals("ond", model.description()); - Assertions.assertEquals("uu", model.tags().get("fdlwg")); - Assertions.assertEquals("izzronasxiftozqy", model.properties().get("hftwesgog")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComponentVersionProperties model = new ComponentVersionProperties().withDescription("ond") - .withTags( - mapOf("fdlwg", "uu", "gseinq", "ytsbwtovv", "nepttwqmsni", "iufxqknpir", "rxfrddhc", "fcdmqnrojlpijn")) - .withProperties(mapOf("hftwesgog", "izzronasxiftozqy", "sxkkg", "zhonnxkrlgnyhmo", "rghxjb", "h")) - .withIsArchived(true) - .withIsAnonymous(false) - .withComponentSpec("datadntwjchrdgo"); - model = BinaryData.fromObject(model).toObject(ComponentVersionProperties.class); - Assertions.assertEquals("ond", model.description()); - Assertions.assertEquals("uu", model.tags().get("fdlwg")); - Assertions.assertEquals("izzronasxiftozqy", model.properties().get("hftwesgog")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - } - - // 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/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 0b000b2dc210e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionResourceArmPaginatedResultTests.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.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( - "{\"value\":[{\"properties\":{\"componentSpec\":\"dataqqaatjinrvgou\",\"provisioningState\":\"Updating\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"gjio\",\"tags\":{\"qwjygvja\":\"rwxkvtkkgl\",\"vkzuhbxvvyhgso\":\"vblm\"},\"properties\":{\"bnhlmc\":\"rqufegxuvwz\",\"dn\":\"l\",\"ijejvegrhbpn\":\"itvgbmhrixkwm\"}},\"id\":\"xexccbdreaxhcexd\",\"name\":\"rvqahqkghtpwi\",\"type\":\"nhyjsv\"},{\"properties\":{\"componentSpec\":\"datacxzbfvoowvr\",\"provisioningState\":\"Updating\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"y\",\"tags\":{\"sxkm\":\"ronzmyhgfip\",\"hjglikk\":\"waekrrjreafxtsgu\",\"uzlm\":\"wslolbqp\"},\"properties\":{\"noigbrnjwmwk\":\"lfktgplcrpwjxe\"}},\"id\":\"bsazejjoqka\",\"name\":\"fhsxttaugz\",\"type\":\"nfaazpxdtnkdmkq\"}],\"nextLink\":\"lwuenvrkp\"}") - .toObject(ComponentVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("gjio", model.value().get(0).properties().description()); - Assertions.assertEquals("rwxkvtkkgl", model.value().get(0).properties().tags().get("qwjygvja")); - Assertions.assertEquals("rqufegxuvwz", model.value().get(0).properties().properties().get("bnhlmc")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(true, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals("lwuenvrkp", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComponentVersionResourceArmPaginatedResult model - = new ComponentVersionResourceArmPaginatedResult() - .withValue( - Arrays - .asList( - new ComponentVersionInner() - .withProperties(new ComponentVersionProperties().withDescription("gjio") - .withTags(mapOf("qwjygvja", "rwxkvtkkgl", "vkzuhbxvvyhgso", "vblm")) - .withProperties( - mapOf("bnhlmc", "rqufegxuvwz", "dn", "l", "ijejvegrhbpn", "itvgbmhrixkwm")) - .withIsArchived(false) - .withIsAnonymous(true) - .withComponentSpec("dataqqaatjinrvgou")), - new ComponentVersionInner() - .withProperties(new ComponentVersionProperties().withDescription("y") - .withTags( - mapOf("sxkm", "ronzmyhgfip", "hjglikk", "waekrrjreafxtsgu", "uzlm", "wslolbqp")) - .withProperties(mapOf("noigbrnjwmwk", "lfktgplcrpwjxe")) - .withIsArchived(true) - .withIsAnonymous(true) - .withComponentSpec("datacxzbfvoowvr")))) - .withNextLink("lwuenvrkp"); - model = BinaryData.fromObject(model).toObject(ComponentVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("gjio", model.value().get(0).properties().description()); - Assertions.assertEquals("rwxkvtkkgl", model.value().get(0).properties().tags().get("qwjygvja")); - Assertions.assertEquals("rqufegxuvwz", model.value().get(0).properties().properties().get("bnhlmc")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(true, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals("lwuenvrkp", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 46cf07456d5ee..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsCreateOrUpdateWithResponseMockTests.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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComponentVersion; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionProperties; -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 reactor.core.publisher.Mono; - -public final class ComponentVersionsCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"componentSpec\":\"datalzrmiukoth\",\"provisioningState\":\"Failed\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"hfrvsi\",\"tags\":{\"f\":\"gnpcjnia\",\"ogdkp\":\"cgjjioqwu\",\"uqjde\":\"mwr\"},\"properties\":{\"cnbgibklscwdko\":\"q\",\"vxmtsmgk\":\"zyvihevb\",\"rceulbyzzcxsyg\":\"etsn\"}},\"id\":\"y\",\"name\":\"yckd\",\"type\":\"z\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("oabthutctcabc") - .withExistingComponent("nclxhwkz", "ggsuzkvd", "ntpzuiwa") - .withProperties(new ComponentVersionProperties().withDescription("wegvuojuwgweccvu") - .withTags(mapOf("fsssmy", "vf", "gpqc", "emkrhbsdgktluifi", "erszsu", "enobqysbeespqbvv", "intz", - "zsautbricvvofe")) - .withProperties(mapOf("nowi", "yyqxckdlxjpisr", "xfiiytqxewjsyute", "cbesfvijnu", "k", "lghkvoxdpor")) - .withIsArchived(false) - .withIsAnonymous(true) - .withComponentSpec("dataabzfihsz")) - .create(); - - Assertions.assertEquals("hfrvsi", response.properties().description()); - Assertions.assertEquals("gnpcjnia", response.properties().tags().get("f")); - Assertions.assertEquals("q", response.properties().properties().get("cnbgibklscwdko")); - Assertions.assertEquals(true, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - } - - // 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/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 06b7e2dbc87ea..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsDeleteWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ComponentVersionsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("cbzvvxd", "phxmwwvxcaicb", "cbogsfovk", "amiyfgunrukcyyaa", - 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 d404827f765ca..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComponentVersion; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ComponentVersionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"componentSpec\":\"datauwj\",\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"llavz\",\"tags\":{\"apqra\":\"gmrodb\",\"tniwfcu\":\"z\"},\"properties\":{\"ceg\":\"xmyibx\",\"xb\":\"ttgxkxt\"}},\"id\":\"beyqohvi\",\"name\":\"wpjfkra\",\"type\":\"er\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("bkubzqazdlrkvi", "zkifqbxmnnid", "tmpumzuhoo", "ttqhpvaru", - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("llavz", response.properties().description()); - Assertions.assertEquals("gmrodb", response.properties().tags().get("apqra")); - Assertions.assertEquals("xmyibx", response.properties().properties().get("ceg")); - Assertions.assertEquals(true, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - } -} 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 384a1043cc8cd..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComponentVersion; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ComponentVersionsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"componentSpec\":\"datadbobmolj\",\"provisioningState\":\"Creating\",\"isArchived\":true,\"isAnonymous\":false,\"description\":\"ih\",\"tags\":{\"pdj\":\"quajpo\",\"raxhntoiwfszkr\":\"yotg\",\"etsluqfgk\":\"kosjwr\",\"imioixviobuwbnge\":\"d\"},\"properties\":{\"ggnqxn\":\"dqngqamhb\"}},\"id\":\"qzaffzqodokst\",\"name\":\"vomdqxnoyzqipapi\",\"type\":\"ccydbjghunqnttrw\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("aveuxgmigs", "ebdltniui", "merf", "hgvcy", 275303341, "doeilhggaj", ListViewType.ARCHIVED_ONLY, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ih", response.iterator().next().properties().description()); - Assertions.assertEquals("quajpo", response.iterator().next().properties().tags().get("pdj")); - Assertions.assertEquals("dqngqamhb", response.iterator().next().properties().properties().get("ggnqxn")); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - Assertions.assertEquals(false, response.iterator().next().properties().isAnonymous()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsPublishMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsPublishMockTests.java deleted file mode 100644 index 32d63e978027f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsPublishMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ComponentVersionsPublishMockTests { - @Test - public void testPublish() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.componentVersions() - .publish("lgbvtpxowgoww", "ocjasuame", "jkfiszhexumfav", "esloblit", - new DestinationAsset().withRegistryName("rsjscos") - .withDestinationName("js") - .withDestinationVersion("trztogujg"), - com.azure.core.util.Context.NONE); - - } -} 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 88cd60af6f453..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceApplicationTests.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.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\":\"lfr\",\"endpointUri\":\"qownkiuajewnahw\"}") - .toObject(ComputeInstanceApplication.class); - Assertions.assertEquals("lfr", model.displayName()); - Assertions.assertEquals("qownkiuajewnahw", model.endpointUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceApplication model - = new ComputeInstanceApplication().withDisplayName("lfr").withEndpointUri("qownkiuajewnahw"); - model = BinaryData.fromObject(model).toObject(ComputeInstanceApplication.class); - Assertions.assertEquals("lfr", model.displayName()); - Assertions.assertEquals("qownkiuajewnahw", 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 6fecaec00c4f3..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceConnectivityEndpointsTests.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.ComputeInstanceConnectivityEndpoints; - -public final class ComputeInstanceConnectivityEndpointsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeInstanceConnectivityEndpoints model - = BinaryData.fromString("{\"publicIpAddress\":\"ffbbcngkegxcypxb\",\"privateIpAddress\":\"etwilyrzoxpd\"}") - .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 e9f6249c21222..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceContainerTests.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.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\":\"fxlapjajodmkrrw\",\"autosave\":\"Remote\",\"gpu\":\"vqokql\",\"network\":\"Bridge\",\"environment\":{\"name\":\"rabwlyvxc\",\"version\":\"qvctsfa\"},\"services\":[\"datawwsknstvzu\",\"datahasupmlppdpgzvz\"]}") - .toObject(ComputeInstanceContainer.class); - Assertions.assertEquals("fxlapjajodmkrrw", model.name()); - Assertions.assertEquals(Autosave.REMOTE, model.autosave()); - Assertions.assertEquals("vqokql", model.gpu()); - Assertions.assertEquals(Network.BRIDGE, model.network()); - Assertions.assertEquals("rabwlyvxc", model.environment().name()); - Assertions.assertEquals("qvctsfa", model.environment().version()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceContainer model = new ComputeInstanceContainer().withName("fxlapjajodmkrrw") - .withAutosave(Autosave.REMOTE) - .withGpu("vqokql") - .withNetwork(Network.BRIDGE) - .withEnvironment(new ComputeInstanceEnvironmentInfo().withName("rabwlyvxc").withVersion("qvctsfa")); - model = BinaryData.fromObject(model).toObject(ComputeInstanceContainer.class); - Assertions.assertEquals("fxlapjajodmkrrw", model.name()); - Assertions.assertEquals(Autosave.REMOTE, model.autosave()); - Assertions.assertEquals("vqokql", model.gpu()); - Assertions.assertEquals(Network.BRIDGE, model.network()); - Assertions.assertEquals("rabwlyvxc", model.environment().name()); - Assertions.assertEquals("qvctsfa", 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 34b3ab67cdef0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceCreatedByTests.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.ComputeInstanceCreatedBy; - -public final class ComputeInstanceCreatedByTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeInstanceCreatedBy model = BinaryData - .fromString("{\"userName\":\"jjmztnlmsoodtmv\",\"userOrgId\":\"dhdyswcrptveaj\",\"userId\":\"xvl\"}") - .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 da87b2d1e8240..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceDataDiskTests.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.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\":\"ReadOnly\",\"diskSizeGB\":1600644874,\"lun\":1444787709,\"storageAccountType\":\"Premium_LRS\"}") - .toObject(ComputeInstanceDataDisk.class); - Assertions.assertEquals(Caching.READ_ONLY, model.caching()); - Assertions.assertEquals(1600644874, model.diskSizeGB()); - Assertions.assertEquals(1444787709, 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_ONLY) - .withDiskSizeGB(1600644874) - .withLun(1444787709) - .withStorageAccountType(StorageAccountType.PREMIUM_LRS); - model = BinaryData.fromObject(model).toObject(ComputeInstanceDataDisk.class); - Assertions.assertEquals(Caching.READ_ONLY, model.caching()); - Assertions.assertEquals(1600644874, model.diskSizeGB()); - Assertions.assertEquals(1444787709, 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 300dbdc5f622b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceDataMountTests.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.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\":\"y\",\"sourceType\":\"Datastore\",\"mountName\":\"enigbe\",\"mountAction\":\"Unmount\",\"createdBy\":\"ba\",\"mountPath\":\"jdeayscse\",\"mountState\":\"Unmounted\",\"mountedOn\":\"2021-06-04T19:11:23Z\",\"error\":\"exmnv\"}") - .toObject(ComputeInstanceDataMount.class); - Assertions.assertEquals("y", model.source()); - Assertions.assertEquals(SourceType.DATASTORE, model.sourceType()); - Assertions.assertEquals("enigbe", model.mountName()); - Assertions.assertEquals(MountAction.UNMOUNT, model.mountAction()); - Assertions.assertEquals("ba", model.createdBy()); - Assertions.assertEquals("jdeayscse", model.mountPath()); - Assertions.assertEquals(MountState.UNMOUNTED, model.mountState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-04T19:11:23Z"), model.mountedOn()); - Assertions.assertEquals("exmnv", model.error()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceDataMount model = new ComputeInstanceDataMount().withSource("y") - .withSourceType(SourceType.DATASTORE) - .withMountName("enigbe") - .withMountAction(MountAction.UNMOUNT) - .withCreatedBy("ba") - .withMountPath("jdeayscse") - .withMountState(MountState.UNMOUNTED) - .withMountedOn(OffsetDateTime.parse("2021-06-04T19:11:23Z")) - .withError("exmnv"); - model = BinaryData.fromObject(model).toObject(ComputeInstanceDataMount.class); - Assertions.assertEquals("y", model.source()); - Assertions.assertEquals(SourceType.DATASTORE, model.sourceType()); - Assertions.assertEquals("enigbe", model.mountName()); - Assertions.assertEquals(MountAction.UNMOUNT, model.mountAction()); - Assertions.assertEquals("ba", model.createdBy()); - Assertions.assertEquals("jdeayscse", model.mountPath()); - Assertions.assertEquals(MountState.UNMOUNTED, model.mountState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-04T19:11:23Z"), model.mountedOn()); - Assertions.assertEquals("exmnv", 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 afbd83807f60e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceEnvironmentInfoTests.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.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\":\"z\",\"version\":\"karkptg\"}") - .toObject(ComputeInstanceEnvironmentInfo.class); - Assertions.assertEquals("z", model.name()); - Assertions.assertEquals("karkptg", model.version()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceEnvironmentInfo model - = new ComputeInstanceEnvironmentInfo().withName("z").withVersion("karkptg"); - model = BinaryData.fromObject(model).toObject(ComputeInstanceEnvironmentInfo.class); - Assertions.assertEquals("z", model.name()); - Assertions.assertEquals("karkptg", 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 93264639a73e9..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceLastOperationTests.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.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\":\"Restart\",\"operationTime\":\"2021-12-02T04:09:17Z\",\"operationStatus\":\"StartFailed\",\"operationTrigger\":\"IdleShutdown\"}") - .toObject(ComputeInstanceLastOperation.class); - Assertions.assertEquals(OperationName.RESTART, model.operationName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-02T04:09:17Z"), model.operationTime()); - Assertions.assertEquals(OperationStatus.START_FAILED, 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.RESTART) - .withOperationTime(OffsetDateTime.parse("2021-12-02T04:09:17Z")) - .withOperationStatus(OperationStatus.START_FAILED) - .withOperationTrigger(OperationTrigger.IDLE_SHUTDOWN); - model = BinaryData.fromObject(model).toObject(ComputeInstanceLastOperation.class); - Assertions.assertEquals(OperationName.RESTART, model.operationName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-12-02T04:09:17Z"), model.operationTime()); - Assertions.assertEquals(OperationStatus.START_FAILED, 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 d5ca3c74d4d7e..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\":\"muwrx\"}").toObject(ComputeInstanceVersion.class); - Assertions.assertEquals("muwrx", model.runtime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceVersion model = new ComputeInstanceVersion().withRuntime("muwrx"); - model = BinaryData.fromObject(model).toObject(ComputeInstanceVersion.class); - Assertions.assertEquals("muwrx", model.runtime()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeRecurrenceScheduleTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeRecurrenceScheduleTests.java deleted file mode 100644 index 152c29212161f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeRecurrenceScheduleTests.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.ComputeRecurrenceSchedule; -import com.azure.resourcemanager.machinelearning.models.ComputeWeekDay; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ComputeRecurrenceScheduleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeRecurrenceSchedule model = BinaryData.fromString( - "{\"hours\":[753616806,1022299740,1887588693],\"minutes\":[746933234,1500436017,185352211],\"monthDays\":[469087656,551431025,1504133018],\"weekDays\":[\"Thursday\",\"Wednesday\",\"Tuesday\",\"Sunday\"]}") - .toObject(ComputeRecurrenceSchedule.class); - Assertions.assertEquals(753616806, model.hours().get(0)); - Assertions.assertEquals(746933234, model.minutes().get(0)); - Assertions.assertEquals(469087656, model.monthDays().get(0)); - Assertions.assertEquals(ComputeWeekDay.THURSDAY, model.weekDays().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeRecurrenceSchedule model - = new ComputeRecurrenceSchedule().withHours(Arrays.asList(753616806, 1022299740, 1887588693)) - .withMinutes(Arrays.asList(746933234, 1500436017, 185352211)) - .withMonthDays(Arrays.asList(469087656, 551431025, 1504133018)) - .withWeekDays(Arrays.asList(ComputeWeekDay.THURSDAY, ComputeWeekDay.WEDNESDAY, ComputeWeekDay.TUESDAY, - ComputeWeekDay.SUNDAY)); - model = BinaryData.fromObject(model).toObject(ComputeRecurrenceSchedule.class); - Assertions.assertEquals(753616806, model.hours().get(0)); - Assertions.assertEquals(746933234, model.minutes().get(0)); - Assertions.assertEquals(469087656, model.monthDays().get(0)); - Assertions.assertEquals(ComputeWeekDay.THURSDAY, model.weekDays().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeRuntimeDtoTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeRuntimeDtoTests.java deleted file mode 100644 index e59180a703191..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeRuntimeDtoTests.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.ComputeRuntimeDto; -import org.junit.jupiter.api.Assertions; - -public final class ComputeRuntimeDtoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeRuntimeDto model - = BinaryData.fromString("{\"sparkRuntimeVersion\":\"mglougpbkw\"}").toObject(ComputeRuntimeDto.class); - Assertions.assertEquals("mglougpbkw", model.sparkRuntimeVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeRuntimeDto model = new ComputeRuntimeDto().withSparkRuntimeVersion("mglougpbkw"); - model = BinaryData.fromObject(model).toObject(ComputeRuntimeDto.class); - Assertions.assertEquals("mglougpbkw", model.sparkRuntimeVersion()); - } -} 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 a29d67f4bc1b6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeSchedulesTests.java +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated 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.ComputeRecurrenceFrequency; -import com.azure.resourcemanager.machinelearning.models.ComputeRecurrenceSchedule; -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.ComputeWeekDay; -import com.azure.resourcemanager.machinelearning.models.Cron; -import com.azure.resourcemanager.machinelearning.models.Recurrence; -import com.azure.resourcemanager.machinelearning.models.ScheduleBase; -import com.azure.resourcemanager.machinelearning.models.ScheduleProvisioningState; -import com.azure.resourcemanager.machinelearning.models.ScheduleStatus; -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\":\"g\",\"provisioningStatus\":\"Failed\",\"status\":\"Enabled\",\"action\":\"Stop\",\"triggerType\":\"Cron\",\"recurrence\":{\"frequency\":\"Month\",\"interval\":49803923,\"startTime\":\"bjmlreesrfwssz\",\"timeZone\":\"cwlisolntfxxcrqm\",\"schedule\":{\"hours\":[351599598,690611810,1156649488,1996694399],\"minutes\":[1847045848,246360701,778853988],\"monthDays\":[1390318472],\"weekDays\":[\"Tuesday\",\"Saturday\"]}},\"cron\":{\"startTime\":\"abuln\",\"timeZone\":\"skjto\",\"expression\":\"dzjs\"},\"schedule\":{\"id\":\"vhxqqmqipaydhfnz\",\"provisioningStatus\":\"Failed\",\"status\":\"Disabled\"}},{\"id\":\"shksny\",\"provisioningStatus\":\"Provisioning\",\"status\":\"Disabled\",\"action\":\"Stop\",\"triggerType\":\"Recurrence\",\"recurrence\":{\"frequency\":\"Minute\",\"interval\":976329767,\"startTime\":\"cefiqdkt\",\"timeZone\":\"kvi\",\"schedule\":{\"hours\":[1629072439,2029515706],\"minutes\":[1835241061,776692976],\"monthDays\":[1239574934,1328728868,2058931853],\"weekDays\":[\"Friday\",\"Tuesday\"]}},\"cron\":{\"startTime\":\"dpcmhjh\",\"timeZone\":\"sybkekymffzt\",\"expression\":\"lscvqsyeiihf\"},\"schedule\":{\"id\":\"ouihy\",\"provisioningStatus\":\"Completed\",\"status\":\"Enabled\"}}]}") - .toObject(ComputeSchedules.class); - Assertions.assertEquals(ScheduleStatus.ENABLED, model.computeStartStop().get(0).status()); - Assertions.assertEquals(ComputePowerAction.STOP, model.computeStartStop().get(0).action()); - Assertions.assertEquals(ComputeTriggerType.CRON, model.computeStartStop().get(0).triggerType()); - Assertions.assertEquals(ComputeRecurrenceFrequency.MONTH, - model.computeStartStop().get(0).recurrence().frequency()); - Assertions.assertEquals(49803923, model.computeStartStop().get(0).recurrence().interval()); - Assertions.assertEquals("bjmlreesrfwssz", model.computeStartStop().get(0).recurrence().startTime()); - Assertions.assertEquals("cwlisolntfxxcrqm", model.computeStartStop().get(0).recurrence().timeZone()); - Assertions.assertEquals(351599598, model.computeStartStop().get(0).recurrence().schedule().hours().get(0)); - Assertions.assertEquals(1847045848, model.computeStartStop().get(0).recurrence().schedule().minutes().get(0)); - Assertions.assertEquals(1390318472, model.computeStartStop().get(0).recurrence().schedule().monthDays().get(0)); - Assertions.assertEquals(ComputeWeekDay.TUESDAY, - model.computeStartStop().get(0).recurrence().schedule().weekDays().get(0)); - Assertions.assertEquals("abuln", model.computeStartStop().get(0).cron().startTime()); - Assertions.assertEquals("skjto", model.computeStartStop().get(0).cron().timeZone()); - Assertions.assertEquals("dzjs", model.computeStartStop().get(0).cron().expression()); - Assertions.assertEquals("vhxqqmqipaydhfnz", model.computeStartStop().get(0).schedule().id()); - Assertions.assertEquals(ScheduleProvisioningState.FAILED, - model.computeStartStop().get(0).schedule().provisioningStatus()); - Assertions.assertEquals(ScheduleStatus.DISABLED, 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.ENABLED) - .withAction(ComputePowerAction.STOP) - .withTriggerType(ComputeTriggerType.CRON) - .withRecurrence(new Recurrence().withFrequency(ComputeRecurrenceFrequency.MONTH) - .withInterval(49803923) - .withStartTime("bjmlreesrfwssz") - .withTimeZone("cwlisolntfxxcrqm") - .withSchedule(new ComputeRecurrenceSchedule() - .withHours(Arrays.asList(351599598, 690611810, 1156649488, 1996694399)) - .withMinutes(Arrays.asList(1847045848, 246360701, 778853988)) - .withMonthDays(Arrays.asList(1390318472)) - .withWeekDays(Arrays.asList(ComputeWeekDay.TUESDAY, ComputeWeekDay.SATURDAY)))) - .withCron(new Cron().withStartTime("abuln").withTimeZone("skjto").withExpression("dzjs")) - .withSchedule(new ScheduleBase().withId("vhxqqmqipaydhfnz") - .withProvisioningStatus(ScheduleProvisioningState.FAILED) - .withStatus(ScheduleStatus.DISABLED)), - new ComputeStartStopSchedule().withStatus(ScheduleStatus.DISABLED) - .withAction(ComputePowerAction.STOP) - .withTriggerType(ComputeTriggerType.RECURRENCE) - .withRecurrence(new Recurrence().withFrequency(ComputeRecurrenceFrequency.MINUTE) - .withInterval(976329767) - .withStartTime("cefiqdkt") - .withTimeZone("kvi") - .withSchedule(new ComputeRecurrenceSchedule().withHours(Arrays.asList(1629072439, 2029515706)) - .withMinutes(Arrays.asList(1835241061, 776692976)) - .withMonthDays(Arrays.asList(1239574934, 1328728868, 2058931853)) - .withWeekDays(Arrays.asList(ComputeWeekDay.FRIDAY, ComputeWeekDay.TUESDAY)))) - .withCron( - new Cron().withStartTime("dpcmhjh").withTimeZone("sybkekymffzt").withExpression("lscvqsyeiihf")) - .withSchedule(new ScheduleBase().withId("ouihy") - .withProvisioningStatus(ScheduleProvisioningState.COMPLETED) - .withStatus(ScheduleStatus.ENABLED)))); - model = BinaryData.fromObject(model).toObject(ComputeSchedules.class); - Assertions.assertEquals(ScheduleStatus.ENABLED, model.computeStartStop().get(0).status()); - Assertions.assertEquals(ComputePowerAction.STOP, model.computeStartStop().get(0).action()); - Assertions.assertEquals(ComputeTriggerType.CRON, model.computeStartStop().get(0).triggerType()); - Assertions.assertEquals(ComputeRecurrenceFrequency.MONTH, - model.computeStartStop().get(0).recurrence().frequency()); - Assertions.assertEquals(49803923, model.computeStartStop().get(0).recurrence().interval()); - Assertions.assertEquals("bjmlreesrfwssz", model.computeStartStop().get(0).recurrence().startTime()); - Assertions.assertEquals("cwlisolntfxxcrqm", model.computeStartStop().get(0).recurrence().timeZone()); - Assertions.assertEquals(351599598, model.computeStartStop().get(0).recurrence().schedule().hours().get(0)); - Assertions.assertEquals(1847045848, model.computeStartStop().get(0).recurrence().schedule().minutes().get(0)); - Assertions.assertEquals(1390318472, model.computeStartStop().get(0).recurrence().schedule().monthDays().get(0)); - Assertions.assertEquals(ComputeWeekDay.TUESDAY, - model.computeStartStop().get(0).recurrence().schedule().weekDays().get(0)); - Assertions.assertEquals("abuln", model.computeStartStop().get(0).cron().startTime()); - Assertions.assertEquals("skjto", model.computeStartStop().get(0).cron().timeZone()); - Assertions.assertEquals("dzjs", model.computeStartStop().get(0).cron().expression()); - Assertions.assertEquals("vhxqqmqipaydhfnz", model.computeStartStop().get(0).schedule().id()); - Assertions.assertEquals(ScheduleProvisioningState.FAILED, - model.computeStartStop().get(0).schedule().provisioningStatus()); - Assertions.assertEquals(ScheduleStatus.DISABLED, 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 d832eb8be01f6..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 3b54e09c0493c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeStartStopScheduleTests.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.models.ComputePowerAction; -import com.azure.resourcemanager.machinelearning.models.ComputeRecurrenceFrequency; -import com.azure.resourcemanager.machinelearning.models.ComputeRecurrenceSchedule; -import com.azure.resourcemanager.machinelearning.models.ComputeStartStopSchedule; -import com.azure.resourcemanager.machinelearning.models.ComputeTriggerType; -import com.azure.resourcemanager.machinelearning.models.ComputeWeekDay; -import com.azure.resourcemanager.machinelearning.models.Cron; -import com.azure.resourcemanager.machinelearning.models.Recurrence; -import com.azure.resourcemanager.machinelearning.models.ScheduleBase; -import com.azure.resourcemanager.machinelearning.models.ScheduleProvisioningState; -import com.azure.resourcemanager.machinelearning.models.ScheduleStatus; -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\":\"cigzhogsmgbv\",\"provisioningStatus\":\"Provisioning\",\"status\":\"Disabled\",\"action\":\"Start\",\"triggerType\":\"Recurrence\",\"recurrence\":{\"frequency\":\"Month\",\"interval\":2023900183,\"startTime\":\"labt\",\"timeZone\":\"biwznhtfgficudy\",\"schedule\":{\"hours\":[1642375695,1415375083],\"minutes\":[1908555069,674933767],\"monthDays\":[1444212135,2050942222,1385585116,1561771824],\"weekDays\":[\"Thursday\",\"Saturday\"]}},\"cron\":{\"startTime\":\"oitwhrjsdmmazdnc\",\"timeZone\":\"dbjp\",\"expression\":\"hzqpxzbawkikcdgf\"},\"schedule\":{\"id\":\"sd\",\"provisioningStatus\":\"Completed\",\"status\":\"Enabled\"}}") - .toObject(ComputeStartStopSchedule.class); - Assertions.assertEquals(ScheduleStatus.DISABLED, model.status()); - Assertions.assertEquals(ComputePowerAction.START, model.action()); - Assertions.assertEquals(ComputeTriggerType.RECURRENCE, model.triggerType()); - Assertions.assertEquals(ComputeRecurrenceFrequency.MONTH, model.recurrence().frequency()); - Assertions.assertEquals(2023900183, model.recurrence().interval()); - Assertions.assertEquals("labt", model.recurrence().startTime()); - Assertions.assertEquals("biwznhtfgficudy", model.recurrence().timeZone()); - Assertions.assertEquals(1642375695, model.recurrence().schedule().hours().get(0)); - Assertions.assertEquals(1908555069, model.recurrence().schedule().minutes().get(0)); - Assertions.assertEquals(1444212135, model.recurrence().schedule().monthDays().get(0)); - Assertions.assertEquals(ComputeWeekDay.THURSDAY, model.recurrence().schedule().weekDays().get(0)); - Assertions.assertEquals("oitwhrjsdmmazdnc", model.cron().startTime()); - Assertions.assertEquals("dbjp", model.cron().timeZone()); - Assertions.assertEquals("hzqpxzbawkikcdgf", model.cron().expression()); - Assertions.assertEquals("sd", model.schedule().id()); - Assertions.assertEquals(ScheduleProvisioningState.COMPLETED, model.schedule().provisioningStatus()); - Assertions.assertEquals(ScheduleStatus.ENABLED, model.schedule().status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeStartStopSchedule model = new ComputeStartStopSchedule().withStatus(ScheduleStatus.DISABLED) - .withAction(ComputePowerAction.START) - .withTriggerType(ComputeTriggerType.RECURRENCE) - .withRecurrence(new Recurrence().withFrequency(ComputeRecurrenceFrequency.MONTH) - .withInterval(2023900183) - .withStartTime("labt") - .withTimeZone("biwznhtfgficudy") - .withSchedule(new ComputeRecurrenceSchedule().withHours(Arrays.asList(1642375695, 1415375083)) - .withMinutes(Arrays.asList(1908555069, 674933767)) - .withMonthDays(Arrays.asList(1444212135, 2050942222, 1385585116, 1561771824)) - .withWeekDays(Arrays.asList(ComputeWeekDay.THURSDAY, ComputeWeekDay.SATURDAY)))) - .withCron( - new Cron().withStartTime("oitwhrjsdmmazdnc").withTimeZone("dbjp").withExpression("hzqpxzbawkikcdgf")) - .withSchedule(new ScheduleBase().withId("sd") - .withProvisioningStatus(ScheduleProvisioningState.COMPLETED) - .withStatus(ScheduleStatus.ENABLED)); - model = BinaryData.fromObject(model).toObject(ComputeStartStopSchedule.class); - Assertions.assertEquals(ScheduleStatus.DISABLED, model.status()); - Assertions.assertEquals(ComputePowerAction.START, model.action()); - Assertions.assertEquals(ComputeTriggerType.RECURRENCE, model.triggerType()); - Assertions.assertEquals(ComputeRecurrenceFrequency.MONTH, model.recurrence().frequency()); - Assertions.assertEquals(2023900183, model.recurrence().interval()); - Assertions.assertEquals("labt", model.recurrence().startTime()); - Assertions.assertEquals("biwznhtfgficudy", model.recurrence().timeZone()); - Assertions.assertEquals(1642375695, model.recurrence().schedule().hours().get(0)); - Assertions.assertEquals(1908555069, model.recurrence().schedule().minutes().get(0)); - Assertions.assertEquals(1444212135, model.recurrence().schedule().monthDays().get(0)); - Assertions.assertEquals(ComputeWeekDay.THURSDAY, model.recurrence().schedule().weekDays().get(0)); - Assertions.assertEquals("oitwhrjsdmmazdnc", model.cron().startTime()); - Assertions.assertEquals("dbjp", model.cron().timeZone()); - Assertions.assertEquals("hzqpxzbawkikcdgf", model.cron().expression()); - Assertions.assertEquals("sd", model.schedule().id()); - Assertions.assertEquals(ScheduleProvisioningState.COMPLETED, model.schedule().provisioningStatus()); - Assertions.assertEquals(ScheduleStatus.ENABLED, model.schedule().status()); - } -} 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 7581562d2202d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.UnderlyingResourceAction; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ComputesDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("fdfupktwp", "pse", "ivytabvbbkflewg", UnderlyingResourceAction.DETACH, - com.azure.core.util.Context.NONE); - - } -} 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 149a42d602651..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesListKeysWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComputeSecrets; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ComputesListKeysWithResponseMockTests { - @Test - public void testListKeysWithResponse() throws Exception { - String responseStr = "{\"computeType\":\"ComputeSecrets\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("aqlmihnmtrdlpxi", "wgecpvfpnrzikvo", "loeohy", com.azure.core.util.Context.NONE) - .getValue(); - - } -} 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 629c9a6590783..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesListNodesMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.AmlComputeNodeInformation; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ComputesListNodesMockTests { - @Test - public void testListNodes() throws Exception { - String responseStr - = "{\"nodes\":[{\"nodeId\":\"ekkbnj\",\"privateIpAddress\":\"vmptedeue\",\"publicIpAddress\":\"hshnfiygpg\",\"port\":316442953,\"nodeState\":\"unusable\",\"runId\":\"ng\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("tutbuvedwuu", "bmenxcqs", "wclykcr", 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 418bbed713615..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContainerResourceRequirementsTests.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.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( - "{\"containerResourceRequests\":{\"cpu\":\"cnxtpzdlysei\",\"memory\":\"oa\",\"gpu\":\"t\"},\"containerResourceLimits\":{\"cpu\":\"tgrhz\",\"memory\":\"fdpfawrptvcsht\",\"gpu\":\"tzc\"}}") - .toObject(ContainerResourceRequirements.class); - Assertions.assertEquals("cnxtpzdlysei", model.containerResourceRequests().cpu()); - Assertions.assertEquals("oa", model.containerResourceRequests().memory()); - Assertions.assertEquals("t", model.containerResourceRequests().gpu()); - Assertions.assertEquals("tgrhz", model.containerResourceLimits().cpu()); - Assertions.assertEquals("fdpfawrptvcsht", model.containerResourceLimits().memory()); - Assertions.assertEquals("tzc", model.containerResourceLimits().gpu()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerResourceRequirements model = new ContainerResourceRequirements() - .withContainerResourceRequests( - new ContainerResourceSettings().withCpu("cnxtpzdlysei").withMemory("oa").withGpu("t")) - .withContainerResourceLimits( - new ContainerResourceSettings().withCpu("tgrhz").withMemory("fdpfawrptvcsht").withGpu("tzc")); - model = BinaryData.fromObject(model).toObject(ContainerResourceRequirements.class); - Assertions.assertEquals("cnxtpzdlysei", model.containerResourceRequests().cpu()); - Assertions.assertEquals("oa", model.containerResourceRequests().memory()); - Assertions.assertEquals("t", model.containerResourceRequests().gpu()); - Assertions.assertEquals("tgrhz", model.containerResourceLimits().cpu()); - Assertions.assertEquals("fdpfawrptvcsht", model.containerResourceLimits().memory()); - Assertions.assertEquals("tzc", model.containerResourceLimits().gpu()); - } -} 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 cba58d9287665..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContainerResourceSettingsTests.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.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\":\"bqgdird\",\"memory\":\"m\",\"gpu\":\"jgcf\"}") - .toObject(ContainerResourceSettings.class); - Assertions.assertEquals("bqgdird", model.cpu()); - Assertions.assertEquals("m", model.memory()); - Assertions.assertEquals("jgcf", model.gpu()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerResourceSettings model - = new ContainerResourceSettings().withCpu("bqgdird").withMemory("m").withGpu("jgcf"); - model = BinaryData.fromObject(model).toObject(ContainerResourceSettings.class); - Assertions.assertEquals("bqgdird", model.cpu()); - Assertions.assertEquals("m", model.memory()); - Assertions.assertEquals("jgcf", model.gpu()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContentSafetyTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContentSafetyTests.java deleted file mode 100644 index 568c289a2b81e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContentSafetyTests.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.ContentSafety; -import com.azure.resourcemanager.machinelearning.models.ContentSafetyStatus; -import org.junit.jupiter.api.Assertions; - -public final class ContentSafetyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContentSafety model - = BinaryData.fromString("{\"contentSafetyStatus\":\"Enabled\"}").toObject(ContentSafety.class); - Assertions.assertEquals(ContentSafetyStatus.ENABLED, model.contentSafetyStatus()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContentSafety model = new ContentSafety().withContentSafetyStatus(ContentSafetyStatus.ENABLED); - model = BinaryData.fromObject(model).toObject(ContentSafety.class); - Assertions.assertEquals(ContentSafetyStatus.ENABLED, model.contentSafetyStatus()); - } -} 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 4e62864f0203b..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\":1838469652}").toObject(CosmosDbSettings.class); - Assertions.assertEquals(1838469652, model.collectionsThroughput()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CosmosDbSettings model = new CosmosDbSettings().withCollectionsThroughput(1838469652); - model = BinaryData.fromObject(model).toObject(CosmosDbSettings.class); - Assertions.assertEquals(1838469652, model.collectionsThroughput()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CreateMonitorActionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CreateMonitorActionTests.java deleted file mode 100644 index 8c804e523b6fa..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CreateMonitorActionTests.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.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CreateMonitorAction; -import com.azure.resourcemanager.machinelearning.models.ModelTaskType; -import com.azure.resourcemanager.machinelearning.models.MonitorComputeConfigurationBase; -import com.azure.resourcemanager.machinelearning.models.MonitorDefinition; -import com.azure.resourcemanager.machinelearning.models.MonitorEmailNotificationSettings; -import com.azure.resourcemanager.machinelearning.models.MonitoringNotificationType; -import com.azure.resourcemanager.machinelearning.models.MonitoringSignalBase; -import com.azure.resourcemanager.machinelearning.models.MonitoringTarget; -import com.azure.resourcemanager.machinelearning.models.MonitorNotificationSettings; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class CreateMonitorActionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CreateMonitorAction model = BinaryData.fromString( - "{\"actionType\":\"CreateMonitor\",\"monitorDefinition\":{\"monitoringTarget\":{\"modelId\":\"tbwjjirmuydgftt\",\"deploymentId\":\"ofgeoagf\",\"taskType\":\"Regression\"},\"signals\":{\"gsevmdm\":{\"signalType\":\"MonitoringSignalBase\",\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\",\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"g\":\"dajwi\"}},\"ssgpgvo\":{\"signalType\":\"MonitoringSignalBase\",\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"ljdncidtjvamy\":\"gfc\",\"to\":\"znmrgcdogcvucg\",\"szp\":\"uwhttnzqsaqmeb\",\"z\":\"usdekpd\"}},\"dofuckclb\":{\"signalType\":\"MonitoringSignalBase\",\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"wztlvvwsnmrkky\":\"qzsquny\",\"wfkcauxuvavcpf\":\"trepw\"}},\"xydgtokvqbvwg\":{\"signalType\":\"MonitoringSignalBase\",\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\",\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"fsqebuuxjxhfxf\":\"zwilfngo\",\"wgzzxljb\":\"wpdkktpmbmxbmb\",\"jf\":\"hxsdplaumydmhwe\"}}},\"computeConfiguration\":{\"computeType\":\"MonitorComputeConfigurationBase\"},\"alertNotificationSettings\":{\"emailNotificationSettings\":{\"emails\":[\"vxakglh\",\"ses\",\"fga\",\"qiy\"]}}}}") - .toObject(CreateMonitorAction.class); - Assertions.assertEquals("tbwjjirmuydgftt", model.monitorDefinition().monitoringTarget().modelId()); - Assertions.assertEquals("ofgeoagf", model.monitorDefinition().monitoringTarget().deploymentId()); - Assertions.assertEquals(ModelTaskType.REGRESSION, model.monitorDefinition().monitoringTarget().taskType()); - Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, - model.monitorDefinition().signals().get("gsevmdm").notificationTypes().get(0)); - Assertions.assertEquals("dajwi", model.monitorDefinition().signals().get("gsevmdm").properties().get("g")); - Assertions.assertEquals("vxakglh", - model.monitorDefinition().alertNotificationSettings().emailNotificationSettings().emails().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CreateMonitorAction model = new CreateMonitorAction().withMonitorDefinition(new MonitorDefinition() - .withMonitoringTarget(new MonitoringTarget().withModelId("tbwjjirmuydgftt") - .withDeploymentId("ofgeoagf") - .withTaskType(ModelTaskType.REGRESSION)) - .withSignals(mapOf("gsevmdm", - new MonitoringSignalBase() - .withNotificationTypes(Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION, - MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION, - MonitoringNotificationType.AML_NOTIFICATION)) - .withProperties(mapOf("g", "dajwi")), - "ssgpgvo", - new MonitoringSignalBase() - .withNotificationTypes(Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION, - MonitoringNotificationType.AML_NOTIFICATION)) - .withProperties( - mapOf("ljdncidtjvamy", "gfc", "to", "znmrgcdogcvucg", "szp", "uwhttnzqsaqmeb", "z", "usdekpd")), - "dofuckclb", - new MonitoringSignalBase() - .withNotificationTypes(Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION, - MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION)) - .withProperties(mapOf("wztlvvwsnmrkky", "qzsquny", "wfkcauxuvavcpf", "trepw")), - "xydgtokvqbvwg", - new MonitoringSignalBase() - .withNotificationTypes(Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION, - MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION, - MonitoringNotificationType.AML_NOTIFICATION)) - .withProperties( - mapOf("fsqebuuxjxhfxf", "zwilfngo", "wgzzxljb", "wpdkktpmbmxbmb", "jf", "hxsdplaumydmhwe")))) - .withComputeConfiguration(new MonitorComputeConfigurationBase()) - .withAlertNotificationSettings(new MonitorNotificationSettings().withEmailNotificationSettings( - new MonitorEmailNotificationSettings().withEmails(Arrays.asList("vxakglh", "ses", "fga", "qiy"))))); - model = BinaryData.fromObject(model).toObject(CreateMonitorAction.class); - Assertions.assertEquals("tbwjjirmuydgftt", model.monitorDefinition().monitoringTarget().modelId()); - Assertions.assertEquals("ofgeoagf", model.monitorDefinition().monitoringTarget().deploymentId()); - Assertions.assertEquals(ModelTaskType.REGRESSION, model.monitorDefinition().monitoringTarget().taskType()); - Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, - model.monitorDefinition().signals().get("gsevmdm").notificationTypes().get(0)); - Assertions.assertEquals("dajwi", model.monitorDefinition().signals().get("gsevmdm").properties().get("g")); - Assertions.assertEquals("vxakglh", - model.monitorDefinition().alertNotificationSettings().emailNotificationSettings().emails().get(0)); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CronTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CronTests.java deleted file mode 100644 index c01aa7c48568a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CronTests.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.Cron; -import org.junit.jupiter.api.Assertions; - -public final class CronTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Cron model - = BinaryData.fromString("{\"startTime\":\"ivj\",\"timeZone\":\"erdqqigd\",\"expression\":\"kghpcv\"}") - .toObject(Cron.class); - Assertions.assertEquals("ivj", model.startTime()); - Assertions.assertEquals("erdqqigd", model.timeZone()); - Assertions.assertEquals("kghpcv", model.expression()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Cron model = new Cron().withStartTime("ivj").withTimeZone("erdqqigd").withExpression("kghpcv"); - model = BinaryData.fromObject(model).toObject(Cron.class); - Assertions.assertEquals("ivj", model.startTime()); - Assertions.assertEquals("erdqqigd", model.timeZone()); - Assertions.assertEquals("kghpcv", model.expression()); - } -} 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 be36491f565a9..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CronTriggerTests.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.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\":\"rbgpxeb\",\"endTime\":\"udcaytujrax\",\"startTime\":\"pryj\",\"timeZone\":\"tnsewou\"}") - .toObject(CronTrigger.class); - Assertions.assertEquals("udcaytujrax", model.endTime()); - Assertions.assertEquals("pryj", model.startTime()); - Assertions.assertEquals("tnsewou", model.timeZone()); - Assertions.assertEquals("rbgpxeb", model.expression()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CronTrigger model = new CronTrigger().withEndTime("udcaytujrax") - .withStartTime("pryj") - .withTimeZone("tnsewou") - .withExpression("rbgpxeb"); - model = BinaryData.fromObject(model).toObject(CronTrigger.class); - Assertions.assertEquals("udcaytujrax", model.endTime()); - Assertions.assertEquals("pryj", model.startTime()); - Assertions.assertEquals("tnsewou", model.timeZone()); - Assertions.assertEquals("rbgpxeb", 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 7db7f737739ca..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\":521751095}").toObject(CustomForecastHorizon.class); - Assertions.assertEquals(521751095, model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomForecastHorizon model = new CustomForecastHorizon().withValue(521751095); - model = BinaryData.fromObject(model).toObject(CustomForecastHorizon.class); - Assertions.assertEquals(521751095, model.value()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomMetricThresholdTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomMetricThresholdTests.java deleted file mode 100644 index 57cd72ae0c0e2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomMetricThresholdTests.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.CustomMetricThreshold; -import com.azure.resourcemanager.machinelearning.models.MonitoringThreshold; -import org.junit.jupiter.api.Assertions; - -public final class CustomMetricThresholdTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomMetricThreshold model - = BinaryData.fromString("{\"threshold\":{\"value\":1.9267227965499623},\"metric\":\"vyljurkeposehqq\"}") - .toObject(CustomMetricThreshold.class); - Assertions.assertEquals(1.9267227965499623D, model.threshold().value()); - Assertions.assertEquals("vyljurkeposehqq", model.metric()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomMetricThreshold model - = new CustomMetricThreshold().withThreshold(new MonitoringThreshold().withValue(1.9267227965499623D)) - .withMetric("vyljurkeposehqq"); - model = BinaryData.fromObject(model).toObject(CustomMetricThreshold.class); - Assertions.assertEquals(1.9267227965499623D, model.threshold().value()); - Assertions.assertEquals("vyljurkeposehqq", model.metric()); - } -} 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 f2ee303b4167f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomModelJobInputTests.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.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\",\"uri\":\"lmpctwj\",\"mode\":\"ReadWriteMount\",\"description\":\"lzmkxerxxxotee\"}") - .toObject(CustomModelJobInput.class); - Assertions.assertEquals("lzmkxerxxxotee", model.description()); - Assertions.assertEquals("lmpctwj", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomModelJobInput model = new CustomModelJobInput().withDescription("lzmkxerxxxotee") - .withUri("lmpctwj") - .withMode(InputDeliveryMode.READ_WRITE_MOUNT); - model = BinaryData.fromObject(model).toObject(CustomModelJobInput.class); - Assertions.assertEquals("lzmkxerxxxotee", model.description()); - Assertions.assertEquals("lmpctwj", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } -} 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 5caf5b63090b3..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomModelJobOutputTests.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.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\",\"uri\":\"howgomvvhxo\",\"mode\":\"ReadWriteMount\",\"description\":\"apnpxraqawbmp\"}") - .toObject(CustomModelJobOutput.class); - Assertions.assertEquals("apnpxraqawbmp", model.description()); - Assertions.assertEquals("howgomvvhxo", model.uri()); - Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomModelJobOutput model = new CustomModelJobOutput().withDescription("apnpxraqawbmp") - .withUri("howgomvvhxo") - .withMode(OutputDeliveryMode.READ_WRITE_MOUNT); - model = BinaryData.fromObject(model).toObject(CustomModelJobOutput.class); - Assertions.assertEquals("apnpxraqawbmp", model.description()); - Assertions.assertEquals("howgomvvhxo", model.uri()); - Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomMonitoringSignalTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomMonitoringSignalTests.java deleted file mode 100644 index 8dc6ab11bac1e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomMonitoringSignalTests.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.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CustomMetricThreshold; -import com.azure.resourcemanager.machinelearning.models.CustomMonitoringSignal; -import com.azure.resourcemanager.machinelearning.models.JobInput; -import com.azure.resourcemanager.machinelearning.models.JobInputType; -import com.azure.resourcemanager.machinelearning.models.MonitoringInputDataBase; -import com.azure.resourcemanager.machinelearning.models.MonitoringNotificationType; -import com.azure.resourcemanager.machinelearning.models.MonitoringThreshold; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class CustomMonitoringSignalTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomMonitoringSignal model = BinaryData.fromString( - "{\"signalType\":\"Custom\",\"inputAssets\":{\"or\":{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"ylqlocvvujexaygl\",\"jobInputType\":\"triton_model\",\"uri\":\"kgjn\",\"columns\":{\"iuofpieidz\":\"aslavxj\",\"vikmfngpmillxgj\":\"vssqywjopackyhy\",\"bijeiydy\":\"cizwgsori\",\"opdweoft\":\"uynhbokayrgwybr\"}}},\"inputs\":{\"octqkmvjanxvzf\":{\"jobInputType\":\"JobInput\",\"description\":\"s\"},\"xx\":{\"jobInputType\":\"JobInput\",\"description\":\"htjnwosstfjxtv\"},\"mxeezwyh\":{\"jobInputType\":\"JobInput\",\"description\":\"fcwrri\"}},\"componentId\":\"mbjiqeg\",\"metricThresholds\":[{\"threshold\":{\"value\":75.0769890262459},\"metric\":\"hc\"},{\"threshold\":{\"value\":63.09814916267899},\"metric\":\"dkgd\"}],\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"nensmuffi\":\"nzbjekwuycky\",\"otdxpo\":\"jbctvbpzujqj\",\"cktybhjuxid\":\"cslhwuusi\",\"ugxwjwilmqrslaat\":\"hxomilddxjx\"}}") - .toObject(CustomMonitoringSignal.class); - Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, model.notificationTypes().get(0)); - Assertions.assertEquals("nzbjekwuycky", model.properties().get("nensmuffi")); - Assertions.assertEquals("ylqlocvvujexaygl", model.inputAssets().get("or").dataContext()); - Assertions.assertEquals(JobInputType.TRITON_MODEL, model.inputAssets().get("or").jobInputType()); - Assertions.assertEquals("kgjn", model.inputAssets().get("or").uri()); - Assertions.assertEquals("aslavxj", model.inputAssets().get("or").columns().get("iuofpieidz")); - Assertions.assertEquals("s", model.inputs().get("octqkmvjanxvzf").description()); - Assertions.assertEquals("mbjiqeg", model.componentId()); - Assertions.assertEquals(75.0769890262459D, model.metricThresholds().get(0).threshold().value()); - Assertions.assertEquals("hc", model.metricThresholds().get(0).metric()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomMonitoringSignal model = new CustomMonitoringSignal() - .withNotificationTypes( - Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION)) - .withProperties(mapOf("nensmuffi", "nzbjekwuycky", "otdxpo", "jbctvbpzujqj", "cktybhjuxid", "cslhwuusi", - "ugxwjwilmqrslaat", "hxomilddxjx")) - .withInputAssets(mapOf("or", - new MonitoringInputDataBase().withDataContext("ylqlocvvujexaygl") - .withJobInputType(JobInputType.TRITON_MODEL) - .withUri("kgjn") - .withColumns(mapOf("iuofpieidz", "aslavxj", "vikmfngpmillxgj", "vssqywjopackyhy", "bijeiydy", - "cizwgsori", "opdweoft", "uynhbokayrgwybr")))) - .withInputs(mapOf("octqkmvjanxvzf", new JobInput().withDescription("s"), "xx", - new JobInput().withDescription("htjnwosstfjxtv"), "mxeezwyh", new JobInput().withDescription("fcwrri"))) - .withComponentId("mbjiqeg") - .withMetricThresholds(Arrays.asList( - new CustomMetricThreshold().withThreshold(new MonitoringThreshold().withValue(75.0769890262459D)) - .withMetric("hc"), - new CustomMetricThreshold().withThreshold(new MonitoringThreshold().withValue(63.09814916267899D)) - .withMetric("dkgd"))); - model = BinaryData.fromObject(model).toObject(CustomMonitoringSignal.class); - Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, model.notificationTypes().get(0)); - Assertions.assertEquals("nzbjekwuycky", model.properties().get("nensmuffi")); - Assertions.assertEquals("ylqlocvvujexaygl", model.inputAssets().get("or").dataContext()); - Assertions.assertEquals(JobInputType.TRITON_MODEL, model.inputAssets().get("or").jobInputType()); - Assertions.assertEquals("kgjn", model.inputAssets().get("or").uri()); - Assertions.assertEquals("aslavxj", model.inputAssets().get("or").columns().get("iuofpieidz")); - Assertions.assertEquals("s", model.inputs().get("octqkmvjanxvzf").description()); - Assertions.assertEquals("mbjiqeg", model.componentId()); - Assertions.assertEquals(75.0769890262459D, model.metricThresholds().get(0).threshold().value()); - Assertions.assertEquals("hc", model.metricThresholds().get(0).metric()); - } - - // 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/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 dfce843881b2c..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\":1824520711}") - .toObject(CustomNCrossValidations.class); - Assertions.assertEquals(1824520711, model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomNCrossValidations model = new CustomNCrossValidations().withValue(1824520711); - model = BinaryData.fromObject(model).toObject(CustomNCrossValidations.class); - Assertions.assertEquals(1824520711, 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 6be6cd94ae8ee..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\":523197972}").toObject(CustomSeasonality.class); - Assertions.assertEquals(523197972, model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomSeasonality model = new CustomSeasonality().withValue(523197972); - model = BinaryData.fromObject(model).toObject(CustomSeasonality.class); - Assertions.assertEquals(523197972, model.value()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomServiceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomServiceTests.java deleted file mode 100644 index ef9ea8a1d75fe..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomServiceTests.java +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BindOptions; -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.TmpfsOptions; -import com.azure.resourcemanager.machinelearning.models.VolumeDefinition; -import com.azure.resourcemanager.machinelearning.models.VolumeDefinitionType; -import com.azure.resourcemanager.machinelearning.models.VolumeOptions; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class CustomServiceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomService model = BinaryData.fromString( - "{\"name\":\"gj\",\"image\":{\"type\":\"docker\",\"reference\":\"pn\",\"\":{\"qqw\":\"datafcb\",\"uxejgwecywnfyszz\":\"datatqsmoxsa\",\"nqbdnddbboz\":\"dataczs\"}},\"environmentVariables\":{\"jpewpyjlfx\":{\"type\":\"local\",\"value\":\"jmyitrchwudl\",\"\":{\"msibzo\":\"dataihtpmnoejhql\",\"mypgfqvmty\":\"datarfgxkyd\",\"kxp\":\"datahl\"}},\"tnqsktx\":{\"type\":\"local\",\"value\":\"crzge\",\"\":{\"iatwfaujegqdtadr\":\"datab\",\"hjkrukizyhgs\":\"datakgd\"}},\"bwjtrdx\":{\"type\":\"local\",\"value\":\"bqggw\",\"\":{\"hdmncgbfz\":\"dataw\",\"bkl\":\"datascstunmlhxd\",\"f\":\"dataiichgjsysmvxodgw\",\"ec\":\"datazsifcuvbdujgcwx\"}},\"vydjufbnk\":{\"type\":\"local\",\"value\":\"gbbgiarksykp\",\"\":{\"dosqkptjqg\":\"dataxwabzrwiqrxhacl\",\"d\":\"dataifmmainwh\",\"qwuntob\":\"datakp\",\"lw\":\"dataizazz\"}}},\"docker\":{\"privileged\":false,\"\":{\"ytlbtlqhopxouvm\":\"dataegjwdabalfdxaglz\"}},\"endpoints\":[{\"protocol\":\"tcp\",\"name\":\"kyypzkgxfxfmy\",\"target\":1057393281,\"published\":1264769175,\"hostIp\":\"oksz\"},{\"protocol\":\"udp\",\"name\":\"wgpterdiuw\",\"target\":1339527688,\"published\":778791021,\"hostIp\":\"wzt\"},{\"protocol\":\"tcp\",\"name\":\"jygowifcqpolz\",\"target\":2140246849,\"published\":1155749309,\"hostIp\":\"zyybzo\"},{\"protocol\":\"udp\",\"name\":\"cptvdxxheig\",\"target\":1706348146,\"published\":1899017507,\"hostIp\":\"ghjhjvmabzzbwa\"}],\"volumes\":[{\"type\":\"bind\",\"readOnly\":false,\"source\":\"gymqtnapreoj\",\"target\":\"jnbscon\",\"consistency\":\"vi\",\"bind\":{\"propagation\":\"yc\",\"createHostPath\":false,\"selinux\":\"zqfsgnwdxzed\"},\"volume\":{\"nocopy\":false},\"tmpfs\":{\"size\":1629298194}},{\"type\":\"bind\",\"readOnly\":false,\"source\":\"lnfyzav\",\"target\":\"bypicdbkpdj\",\"consistency\":\"qh\",\"bind\":{\"propagation\":\"azpdg\",\"createHostPath\":false,\"selinux\":\"xsht\"},\"volume\":{\"nocopy\":true},\"tmpfs\":{\"size\":1082014127}},{\"type\":\"volume\",\"readOnly\":false,\"source\":\"bvcpxtzhi\",\"target\":\"qbtimpk\",\"consistency\":\"lornsihqh\",\"bind\":{\"propagation\":\"musuaawja\",\"createHostPath\":false,\"selinux\":\"nfczmnniixyxvq\"},\"volume\":{\"nocopy\":false},\"tmpfs\":{\"size\":1609830110}},{\"type\":\"bind\",\"readOnly\":false,\"source\":\"gmgmdd\",\"target\":\"gm\",\"consistency\":\"ltwmpftmf\",\"bind\":{\"propagation\":\"jogsyx\",\"createHostPath\":true,\"selinux\":\"mfd\"},\"volume\":{\"nocopy\":true},\"tmpfs\":{\"size\":64531850}}],\"\":{\"drmuhka\":\"datahnrecchd\",\"vkhhwm\":\"datamjedbiu\",\"rihufoihppiybxv\":\"datapjbweunxcq\"}}") - .toObject(CustomService.class); - Assertions.assertEquals("gj", model.name()); - Assertions.assertEquals(ImageType.DOCKER, model.image().type()); - Assertions.assertEquals("pn", model.image().reference()); - Assertions.assertEquals(EnvironmentVariableType.LOCAL, model.environmentVariables().get("jpewpyjlfx").type()); - Assertions.assertEquals("jmyitrchwudl", model.environmentVariables().get("jpewpyjlfx").value()); - Assertions.assertEquals(false, model.docker().privileged()); - Assertions.assertEquals(Protocol.TCP, model.endpoints().get(0).protocol()); - Assertions.assertEquals("kyypzkgxfxfmy", model.endpoints().get(0).name()); - Assertions.assertEquals(1057393281, model.endpoints().get(0).target()); - Assertions.assertEquals(1264769175, model.endpoints().get(0).published()); - Assertions.assertEquals("oksz", model.endpoints().get(0).hostIp()); - Assertions.assertEquals(VolumeDefinitionType.BIND, model.volumes().get(0).type()); - Assertions.assertEquals(false, model.volumes().get(0).readOnly()); - Assertions.assertEquals("gymqtnapreoj", model.volumes().get(0).source()); - Assertions.assertEquals("jnbscon", model.volumes().get(0).target()); - Assertions.assertEquals("vi", model.volumes().get(0).consistency()); - Assertions.assertEquals("yc", model.volumes().get(0).bind().propagation()); - Assertions.assertEquals(false, model.volumes().get(0).bind().createHostPath()); - Assertions.assertEquals("zqfsgnwdxzed", model.volumes().get(0).bind().selinux()); - Assertions.assertEquals(false, model.volumes().get(0).volume().nocopy()); - Assertions.assertEquals(1629298194, model.volumes().get(0).tmpfs().size()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomService model = new CustomService().withName("gj") - .withImage(new Image().withType(ImageType.DOCKER).withReference("pn").withAdditionalProperties(mapOf())) - .withEnvironmentVariables(mapOf("jpewpyjlfx", - new EnvironmentVariable().withType(EnvironmentVariableType.LOCAL) - .withValue("jmyitrchwudl") - .withAdditionalProperties(mapOf()), - "tnqsktx", - new EnvironmentVariable().withType(EnvironmentVariableType.LOCAL) - .withValue("crzge") - .withAdditionalProperties(mapOf()), - "bwjtrdx", - new EnvironmentVariable().withType(EnvironmentVariableType.LOCAL) - .withValue("bqggw") - .withAdditionalProperties(mapOf()), - "vydjufbnk", - new EnvironmentVariable().withType(EnvironmentVariableType.LOCAL) - .withValue("gbbgiarksykp") - .withAdditionalProperties(mapOf()))) - .withDocker(new Docker().withPrivileged(false).withAdditionalProperties(mapOf())) - .withEndpoints(Arrays.asList( - new Endpoint().withProtocol(Protocol.TCP) - .withName("kyypzkgxfxfmy") - .withTarget(1057393281) - .withPublished(1264769175) - .withHostIp("oksz"), - new Endpoint().withProtocol(Protocol.UDP) - .withName("wgpterdiuw") - .withTarget(1339527688) - .withPublished(778791021) - .withHostIp("wzt"), - new Endpoint().withProtocol(Protocol.TCP) - .withName("jygowifcqpolz") - .withTarget(2140246849) - .withPublished(1155749309) - .withHostIp("zyybzo"), - new Endpoint().withProtocol(Protocol.UDP) - .withName("cptvdxxheig") - .withTarget(1706348146) - .withPublished(1899017507) - .withHostIp("ghjhjvmabzzbwa"))) - .withVolumes(Arrays.asList( - new VolumeDefinition().withType(VolumeDefinitionType.BIND) - .withReadOnly(false) - .withSource("gymqtnapreoj") - .withTarget("jnbscon") - .withConsistency("vi") - .withBind( - new BindOptions().withPropagation("yc").withCreateHostPath(false).withSelinux("zqfsgnwdxzed")) - .withVolume(new VolumeOptions().withNocopy(false)) - .withTmpfs(new TmpfsOptions().withSize(1629298194)), - new VolumeDefinition().withType(VolumeDefinitionType.BIND) - .withReadOnly(false) - .withSource("lnfyzav") - .withTarget("bypicdbkpdj") - .withConsistency("qh") - .withBind(new BindOptions().withPropagation("azpdg").withCreateHostPath(false).withSelinux("xsht")) - .withVolume(new VolumeOptions().withNocopy(true)) - .withTmpfs(new TmpfsOptions().withSize(1082014127)), - new VolumeDefinition().withType(VolumeDefinitionType.VOLUME) - .withReadOnly(false) - .withSource("bvcpxtzhi") - .withTarget("qbtimpk") - .withConsistency("lornsihqh") - .withBind(new BindOptions().withPropagation("musuaawja") - .withCreateHostPath(false) - .withSelinux("nfczmnniixyxvq")) - .withVolume(new VolumeOptions().withNocopy(false)) - .withTmpfs(new TmpfsOptions().withSize(1609830110)), - new VolumeDefinition().withType(VolumeDefinitionType.BIND) - .withReadOnly(false) - .withSource("gmgmdd") - .withTarget("gm") - .withConsistency("ltwmpftmf") - .withBind(new BindOptions().withPropagation("jogsyx").withCreateHostPath(true).withSelinux("mfd")) - .withVolume(new VolumeOptions().withNocopy(true)) - .withTmpfs(new TmpfsOptions().withSize(64531850)))) - .withAdditionalProperties(mapOf()); - model = BinaryData.fromObject(model).toObject(CustomService.class); - Assertions.assertEquals("gj", model.name()); - Assertions.assertEquals(ImageType.DOCKER, model.image().type()); - Assertions.assertEquals("pn", model.image().reference()); - Assertions.assertEquals(EnvironmentVariableType.LOCAL, model.environmentVariables().get("jpewpyjlfx").type()); - Assertions.assertEquals("jmyitrchwudl", model.environmentVariables().get("jpewpyjlfx").value()); - Assertions.assertEquals(false, model.docker().privileged()); - Assertions.assertEquals(Protocol.TCP, model.endpoints().get(0).protocol()); - Assertions.assertEquals("kyypzkgxfxfmy", model.endpoints().get(0).name()); - Assertions.assertEquals(1057393281, model.endpoints().get(0).target()); - Assertions.assertEquals(1264769175, model.endpoints().get(0).published()); - Assertions.assertEquals("oksz", model.endpoints().get(0).hostIp()); - Assertions.assertEquals(VolumeDefinitionType.BIND, model.volumes().get(0).type()); - Assertions.assertEquals(false, model.volumes().get(0).readOnly()); - Assertions.assertEquals("gymqtnapreoj", model.volumes().get(0).source()); - Assertions.assertEquals("jnbscon", model.volumes().get(0).target()); - Assertions.assertEquals("vi", model.volumes().get(0).consistency()); - Assertions.assertEquals("yc", model.volumes().get(0).bind().propagation()); - Assertions.assertEquals(false, model.volumes().get(0).bind().createHostPath()); - Assertions.assertEquals("zqfsgnwdxzed", model.volumes().get(0).bind().selinux()); - Assertions.assertEquals(false, model.volumes().get(0).volume().nocopy()); - Assertions.assertEquals(1629298194, model.volumes().get(0).tmpfs().size()); - } - - // 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/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 75c36c362edb9..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomTargetLagsTests.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.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\":[798032974,467459839]}") - .toObject(CustomTargetLags.class); - Assertions.assertEquals(798032974, model.values().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomTargetLags model = new CustomTargetLags().withValues(Arrays.asList(798032974, 467459839)); - model = BinaryData.fromObject(model).toObject(CustomTargetLags.class); - Assertions.assertEquals(798032974, 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 fb1a2b55405ec..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomTargetRollingWindowSizeTests.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.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\":725690227}") - .toObject(CustomTargetRollingWindowSize.class); - Assertions.assertEquals(725690227, model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomTargetRollingWindowSize model = new CustomTargetRollingWindowSize().withValue(725690227); - model = BinaryData.fromObject(model).toObject(CustomTargetRollingWindowSize.class); - Assertions.assertEquals(725690227, model.value()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataCollectorTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataCollectorTests.java deleted file mode 100644 index 6755ee6177b94..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataCollectorTests.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.models.Collection; -import com.azure.resourcemanager.machinelearning.models.DataCollectionMode; -import com.azure.resourcemanager.machinelearning.models.DataCollector; -import com.azure.resourcemanager.machinelearning.models.RequestLogging; -import com.azure.resourcemanager.machinelearning.models.RollingRateType; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DataCollectorTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataCollector model = BinaryData.fromString( - "{\"collections\":{\"jsvkskmqozzkivy\":{\"samplingRate\":40.92657360869598,\"dataCollectionMode\":\"Disabled\",\"dataId\":\"ulgm\",\"clientId\":\"jevdyznf\"}},\"rollingRate\":\"Year\",\"requestLogging\":{\"captureHeaders\":[\"zji\",\"lqfhefkwabs\"]}}") - .toObject(DataCollector.class); - Assertions.assertEquals(40.92657360869598D, model.collections().get("jsvkskmqozzkivy").samplingRate()); - Assertions.assertEquals(DataCollectionMode.DISABLED, - model.collections().get("jsvkskmqozzkivy").dataCollectionMode()); - Assertions.assertEquals("ulgm", model.collections().get("jsvkskmqozzkivy").dataId()); - Assertions.assertEquals("jevdyznf", model.collections().get("jsvkskmqozzkivy").clientId()); - Assertions.assertEquals(RollingRateType.YEAR, model.rollingRate()); - Assertions.assertEquals("zji", model.requestLogging().captureHeaders().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataCollector model = new DataCollector() - .withCollections(mapOf("jsvkskmqozzkivy", - new Collection().withSamplingRate(40.92657360869598D) - .withDataCollectionMode(DataCollectionMode.DISABLED) - .withDataId("ulgm") - .withClientId("jevdyznf"))) - .withRollingRate(RollingRateType.YEAR) - .withRequestLogging(new RequestLogging().withCaptureHeaders(Arrays.asList("zji", "lqfhefkwabs"))); - model = BinaryData.fromObject(model).toObject(DataCollector.class); - Assertions.assertEquals(40.92657360869598D, model.collections().get("jsvkskmqozzkivy").samplingRate()); - Assertions.assertEquals(DataCollectionMode.DISABLED, - model.collections().get("jsvkskmqozzkivy").dataCollectionMode()); - Assertions.assertEquals("ulgm", model.collections().get("jsvkskmqozzkivy").dataId()); - Assertions.assertEquals("jevdyznf", model.collections().get("jsvkskmqozzkivy").clientId()); - Assertions.assertEquals(RollingRateType.YEAR, model.rollingRate()); - Assertions.assertEquals("zji", model.requestLogging().captureHeaders().get(0)); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 adc69060b589e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerInnerTests.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.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\":false,\"latestVersion\":\"fa\",\"nextVersion\":\"vnqqybaryeua\",\"description\":\"kq\",\"tags\":{\"w\":\"gzslesjcbhernnti\",\"uwrbehwagoh\":\"jcvb\"},\"properties\":{\"emvvhm\":\"fkmr\"}},\"id\":\"drjf\",\"name\":\"tac\",\"type\":\"ebjvewzcjzn\"}") - .toObject(DataContainerInner.class); - Assertions.assertEquals("kq", model.properties().description()); - Assertions.assertEquals("gzslesjcbhernnti", model.properties().tags().get("w")); - Assertions.assertEquals("fkmr", model.properties().properties().get("emvvhm")); - Assertions.assertEquals(false, 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("kq") - .withTags(mapOf("w", "gzslesjcbhernnti", "uwrbehwagoh", "jcvb")) - .withProperties(mapOf("emvvhm", "fkmr")) - .withIsArchived(false) - .withDataType(DataType.URI_FOLDER)); - model = BinaryData.fromObject(model).toObject(DataContainerInner.class); - Assertions.assertEquals("kq", model.properties().description()); - Assertions.assertEquals("gzslesjcbhernnti", model.properties().tags().get("w")); - Assertions.assertEquals("fkmr", model.properties().properties().get("emvvhm")); - Assertions.assertEquals(false, model.properties().isArchived()); - Assertions.assertEquals(DataType.URI_FOLDER, model.properties().dataType()); - } - - // 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/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 8f7d90085c1fa..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerPropertiesTests.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.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\":\"uri_folder\",\"isArchived\":true,\"latestVersion\":\"guaadraufactkahz\",\"nextVersion\":\"ajjziuxxpshne\",\"description\":\"ulfgslqu\",\"tags\":{\"o\":\"dlenrdsutujbazpj\",\"uvwpklvxwmyg\":\"minyflnorwm\",\"hiszepnnbjcrxgib\":\"xpgpq\"},\"properties\":{\"kokwbqplhlvnu\":\"xconfozauors\",\"phwzsoldweyuqdu\":\"epzl\",\"biorktal\":\"vmnnrw\"}}") - .toObject(DataContainerProperties.class); - Assertions.assertEquals("ulfgslqu", model.description()); - Assertions.assertEquals("dlenrdsutujbazpj", model.tags().get("o")); - Assertions.assertEquals("xconfozauors", model.properties().get("kokwbqplhlvnu")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(DataType.URI_FOLDER, model.dataType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataContainerProperties model = new DataContainerProperties().withDescription("ulfgslqu") - .withTags(mapOf("o", "dlenrdsutujbazpj", "uvwpklvxwmyg", "minyflnorwm", "hiszepnnbjcrxgib", "xpgpq")) - .withProperties(mapOf("kokwbqplhlvnu", "xconfozauors", "phwzsoldweyuqdu", "epzl", "biorktal", "vmnnrw")) - .withIsArchived(true) - .withDataType(DataType.URI_FOLDER); - model = BinaryData.fromObject(model).toObject(DataContainerProperties.class); - Assertions.assertEquals("ulfgslqu", model.description()); - Assertions.assertEquals("dlenrdsutujbazpj", model.tags().get("o")); - Assertions.assertEquals("xconfozauors", model.properties().get("kokwbqplhlvnu")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(DataType.URI_FOLDER, model.dataType()); - } - - // 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/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 4fa216576179c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerResourceArmPaginatedResultTests.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.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( - "{\"value\":[{\"properties\":{\"dataType\":\"uri_file\",\"isArchived\":false,\"latestVersion\":\"gf\",\"nextVersion\":\"dsofbshrns\",\"description\":\"uswdv\",\"tags\":{\"wnopqgikyzirtx\":\"bycnunvjsrtkf\",\"ilqu\":\"yuxzejntpsewgi\",\"eoxorggufhyao\":\"rydxtqm\"},\"properties\":{\"jzhpjbibgjmfx\":\"ghhavgrvkffo\",\"cluyovwxnbkf\":\"mv\",\"zbomvzzbtdcqvpni\":\"zzxscyhwzdgiruj\"}},\"id\":\"jviylwdshfs\",\"name\":\"n\",\"type\":\"bgye\"},{\"properties\":{\"dataType\":\"mltable\",\"isArchived\":false,\"latestVersion\":\"gaojf\",\"nextVersion\":\"nc\",\"description\":\"mrfhirctymox\",\"tags\":{\"qjlihhyuspska\":\"pipiwyczuhxac\",\"cvpa\":\"dvlmfwdgzxul\",\"zvxurisjnhny\":\"rsre\"},\"properties\":{\"zgxmr\":\"fq\",\"upauut\":\"ublwpcesutrg\"}},\"id\":\"oqh\",\"name\":\"hej\",\"type\":\"g\"},{\"properties\":{\"dataType\":\"uri_file\",\"isArchived\":false,\"latestVersion\":\"qntcypsxjvfoimwk\",\"nextVersion\":\"ircizjxvy\",\"description\":\"ceacvlhvygdy\",\"tags\":{\"jslb\":\"mrtwna\",\"aeqphchqnr\":\"wkojgcyztsfmzn\",\"wrykqgai\":\"rpxeh\"},\"properties\":{\"jdz\":\"iklbydvkhb\",\"srhnjivo\":\"xcv\"}},\"id\":\"tnovqfzgemjdftul\",\"name\":\"ltducea\",\"type\":\"tmczuomejwcwwqi\"},{\"properties\":{\"dataType\":\"uri_folder\",\"isArchived\":false,\"latestVersion\":\"xmojmsvpkjp\",\"nextVersion\":\"kwcf\",\"description\":\"ljyxgtczhe\",\"tags\":{\"xu\":\"sdshmkxmaehvb\",\"n\":\"iplt\",\"xywr\":\"tbaxk\",\"uodpv\":\"kpyklyhp\"},\"properties\":{\"tvdxeclzedqb\":\"dlgzibthostgkt\",\"lhpl\":\"vh\",\"lkxt\":\"dqkdlwwqfbu\",\"fwsrtawcoezbrhu\":\"qjfsmlmbtxhw\"}},\"id\":\"kh\",\"name\":\"dyg\",\"type\":\"ookk\"}],\"nextLink\":\"qjbvleorfmlu\"}") - .toObject(DataContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("uswdv", model.value().get(0).properties().description()); - Assertions.assertEquals("bycnunvjsrtkf", model.value().get(0).properties().tags().get("wnopqgikyzirtx")); - Assertions.assertEquals("ghhavgrvkffo", model.value().get(0).properties().properties().get("jzhpjbibgjmfx")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(DataType.URI_FILE, model.value().get(0).properties().dataType()); - Assertions.assertEquals("qjbvleorfmlu", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataContainerResourceArmPaginatedResult model - = new DataContainerResourceArmPaginatedResult() - .withValue(Arrays.asList( - new DataContainerInner().withProperties(new DataContainerProperties() - .withDescription("uswdv") - .withTags(mapOf("wnopqgikyzirtx", "bycnunvjsrtkf", "ilqu", "yuxzejntpsewgi", "eoxorggufhyao", - "rydxtqm")) - .withProperties(mapOf("jzhpjbibgjmfx", "ghhavgrvkffo", "cluyovwxnbkf", "mv", "zbomvzzbtdcqvpni", - "zzxscyhwzdgiruj")) - .withIsArchived(false) - .withDataType(DataType.URI_FILE)), - new DataContainerInner() - .withProperties(new DataContainerProperties().withDescription("mrfhirctymox") - .withTags( - mapOf("qjlihhyuspska", "pipiwyczuhxac", "cvpa", "dvlmfwdgzxul", "zvxurisjnhny", "rsre")) - .withProperties(mapOf("zgxmr", "fq", "upauut", "ublwpcesutrg")) - .withIsArchived(false) - .withDataType(DataType.MLTABLE)), - new DataContainerInner() - .withProperties(new DataContainerProperties().withDescription("ceacvlhvygdy") - .withTags(mapOf("jslb", "mrtwna", "aeqphchqnr", "wkojgcyztsfmzn", "wrykqgai", "rpxeh")) - .withProperties(mapOf("jdz", "iklbydvkhb", "srhnjivo", "xcv")) - .withIsArchived(false) - .withDataType(DataType.URI_FILE)), - new DataContainerInner().withProperties(new DataContainerProperties().withDescription("ljyxgtczhe") - .withTags(mapOf("xu", "sdshmkxmaehvb", "n", "iplt", "xywr", "tbaxk", "uodpv", "kpyklyhp")) - .withProperties(mapOf("tvdxeclzedqb", "dlgzibthostgkt", "lhpl", "vh", "lkxt", "dqkdlwwqfbu", - "fwsrtawcoezbrhu", "qjfsmlmbtxhw")) - .withIsArchived(false) - .withDataType(DataType.URI_FOLDER)))) - .withNextLink("qjbvleorfmlu"); - model = BinaryData.fromObject(model).toObject(DataContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("uswdv", model.value().get(0).properties().description()); - Assertions.assertEquals("bycnunvjsrtkf", model.value().get(0).properties().tags().get("wnopqgikyzirtx")); - Assertions.assertEquals("ghhavgrvkffo", model.value().get(0).properties().properties().get("jzhpjbibgjmfx")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(DataType.URI_FILE, model.value().get(0).properties().dataType()); - Assertions.assertEquals("qjbvleorfmlu", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 f42a4ba0fcef6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersCreateOrUpdateWithResponseMockTests.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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -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.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 reactor.core.publisher.Mono; - -public final class DataContainersCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"dataType\":\"mltable\",\"isArchived\":false,\"latestVersion\":\"cukboc\",\"nextVersion\":\"t\",\"description\":\"hvsgzpwqieyxjkc\",\"tags\":{\"qepeftmub\":\"sttam\"},\"properties\":{\"zeq\":\"oepeqlhbtysy\",\"gyzwfyfdbvoo\":\"ctpqnofkw\",\"iyqmlmw\":\"lmikdsqqykgjjsmv\",\"cvemmriyz\":\"wsmnwbm\"}},\"id\":\"quesxplcsinbulo\",\"name\":\"xxhcynnmvaiz\",\"type\":\"kwqqpwcids\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("qon") - .withExistingWorkspace("sxblmnxrxkuly", "ivvi") - .withProperties(new DataContainerProperties().withDescription("pnkzimqaxt") - .withTags(mapOf("paxjdqvv", "ycv", "mrdvhbgtuhwhx", "jehyvnfjngo")) - .withProperties(mapOf("nuzgzrxxduseb", "enbphy")) - .withIsArchived(false) - .withDataType(DataType.URI_FILE)) - .create(); - - Assertions.assertEquals("hvsgzpwqieyxjkc", response.properties().description()); - Assertions.assertEquals("sttam", response.properties().tags().get("qepeftmub")); - Assertions.assertEquals("oepeqlhbtysy", response.properties().properties().get("zeq")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(DataType.MLTABLE, response.properties().dataType()); - } - - // 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/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 79e8c07d00cd5..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersDeleteWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DataContainersDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("zxqomzdfaupqvei", "zwnkbjqpz", "odwh", 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 bcd114a547018..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DataContainer; -import com.azure.resourcemanager.machinelearning.models.DataType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DataContainersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"dataType\":\"uri_file\",\"isArchived\":false,\"latestVersion\":\"dcaqimodnbjmjx\",\"nextVersion\":\"bucmzkqt\",\"description\":\"jacktav\",\"tags\":{\"secedsoqwexi\":\"godjfyplavb\",\"ikf\":\"bnzot\",\"etqj\":\"jqdfadgywyla\",\"gylyzolrvwsgseqj\":\"ohystdgjtpbtkogf\"},\"properties\":{\"gisw\":\"axir\",\"pvsobamt\":\"jy\"}},\"id\":\"irdzdgv\",\"name\":\"oflzuk\",\"type\":\"gougxpypbmz\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("uxsochtuxapewzwq", "bx", "ynslcvynavwtttsm", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("jacktav", response.properties().description()); - Assertions.assertEquals("godjfyplavb", response.properties().tags().get("secedsoqwexi")); - Assertions.assertEquals("axir", response.properties().properties().get("gisw")); - 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 eace8b48b6ffc..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.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.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DataContainersListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"dataType\":\"uri_file\",\"isArchived\":true,\"latestVersion\":\"qcsotwqtkpdc\",\"nextVersion\":\"fqoermgmgn\",\"description\":\"axaogskhc\",\"tags\":{\"yyb\":\"bipyse\",\"bpgdiwdy\":\"bfjcvmk\",\"wqwvcwcehzrtrg\":\"hdtiemb\"},\"properties\":{\"ktuzrltpe\":\"btbxhyfwjf\",\"njpbhjlugcupcyfr\":\"sdkbqfzbvttqjntv\"}},\"id\":\"oyvmvuxyeeafd\",\"name\":\"suwl\",\"type\":\"nxzhgbspdxbhjqux\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("rxbmljrjyfjleux", "xkpsjldgnim", "oacf", ListViewType.ACTIVE_ONLY, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("axaogskhc", response.iterator().next().properties().description()); - Assertions.assertEquals("bipyse", response.iterator().next().properties().tags().get("yyb")); - Assertions.assertEquals("btbxhyfwjf", response.iterator().next().properties().properties().get("ktuzrltpe")); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - Assertions.assertEquals(DataType.URI_FILE, response.iterator().next().properties().dataType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataDriftMetricThresholdBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataDriftMetricThresholdBaseTests.java deleted file mode 100644 index 2f4e36b0a02a0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataDriftMetricThresholdBaseTests.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.DataDriftMetricThresholdBase; -import com.azure.resourcemanager.machinelearning.models.MonitoringThreshold; -import org.junit.jupiter.api.Assertions; - -public final class DataDriftMetricThresholdBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataDriftMetricThresholdBase model = BinaryData - .fromString("{\"dataType\":\"DataDriftMetricThresholdBase\",\"threshold\":{\"value\":16.657561950971566}}") - .toObject(DataDriftMetricThresholdBase.class); - Assertions.assertEquals(16.657561950971566D, model.threshold().value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataDriftMetricThresholdBase model = new DataDriftMetricThresholdBase() - .withThreshold(new MonitoringThreshold().withValue(16.657561950971566D)); - model = BinaryData.fromObject(model).toObject(DataDriftMetricThresholdBase.class); - Assertions.assertEquals(16.657561950971566D, model.threshold().value()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataDriftMonitoringSignalTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataDriftMonitoringSignalTests.java deleted file mode 100644 index eeef451e5497a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataDriftMonitoringSignalTests.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.models.DataDriftMetricThresholdBase; -import com.azure.resourcemanager.machinelearning.models.DataDriftMonitoringSignal; -import com.azure.resourcemanager.machinelearning.models.FeatureImportanceMode; -import com.azure.resourcemanager.machinelearning.models.FeatureImportanceSettings; -import com.azure.resourcemanager.machinelearning.models.JobInputType; -import com.azure.resourcemanager.machinelearning.models.MonitoringFeatureDataType; -import com.azure.resourcemanager.machinelearning.models.MonitoringFeatureFilterBase; -import com.azure.resourcemanager.machinelearning.models.MonitoringInputDataBase; -import com.azure.resourcemanager.machinelearning.models.MonitoringNotificationType; -import com.azure.resourcemanager.machinelearning.models.MonitoringThreshold; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DataDriftMonitoringSignalTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataDriftMonitoringSignal model = BinaryData.fromString( - "{\"signalType\":\"DataDrift\",\"features\":{\"filterType\":\"MonitoringFeatureFilterBase\"},\"featureImportanceSettings\":{\"mode\":\"Disabled\",\"targetColumn\":\"gbjbhrp\"},\"metricThresholds\":[{\"dataType\":\"DataDriftMetricThresholdBase\",\"threshold\":{\"value\":44.85113411986268}},{\"dataType\":\"DataDriftMetricThresholdBase\",\"threshold\":{\"value\":50.380142949889816}}],\"productionData\":{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"mmaixpqji\",\"jobInputType\":\"mlflow_model\",\"uri\":\"f\",\"columns\":{\"tohqclna\":\"sld\",\"gsiqikvllr\":\"h\",\"wrqkza\":\"tpmglxkoikmtr\",\"paklw\":\"bun\"}},\"referenceData\":{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"wee\",\"jobInputType\":\"uri_folder\",\"uri\":\"nejzltkaszfjsxs\",\"columns\":{\"lnwsbvvdlsf\":\"uxapgrcqebmvrdjo\"}},\"featureDataTypeOverride\":{\"esdfedsb\":\"Numerical\"},\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\",\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"i\":\"phymc\",\"e\":\"kltvdhqnufbx\",\"ntojovfnybydhuih\":\"i\"}}") - .toObject(DataDriftMonitoringSignal.class); - Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, model.notificationTypes().get(0)); - Assertions.assertEquals("phymc", model.properties().get("i")); - Assertions.assertEquals(FeatureImportanceMode.DISABLED, model.featureImportanceSettings().mode()); - Assertions.assertEquals("gbjbhrp", model.featureImportanceSettings().targetColumn()); - Assertions.assertEquals(44.85113411986268D, model.metricThresholds().get(0).threshold().value()); - Assertions.assertEquals("mmaixpqji", model.productionData().dataContext()); - Assertions.assertEquals(JobInputType.MLFLOW_MODEL, model.productionData().jobInputType()); - Assertions.assertEquals("f", model.productionData().uri()); - Assertions.assertEquals("sld", model.productionData().columns().get("tohqclna")); - Assertions.assertEquals("wee", model.referenceData().dataContext()); - Assertions.assertEquals(JobInputType.URI_FOLDER, model.referenceData().jobInputType()); - Assertions.assertEquals("nejzltkaszfjsxs", model.referenceData().uri()); - Assertions.assertEquals("uxapgrcqebmvrdjo", model.referenceData().columns().get("lnwsbvvdlsf")); - Assertions.assertEquals(MonitoringFeatureDataType.NUMERICAL, model.featureDataTypeOverride().get("esdfedsb")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataDriftMonitoringSignal model = new DataDriftMonitoringSignal() - .withNotificationTypes( - Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION, - MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION)) - .withProperties(mapOf("i", "phymc", "e", "kltvdhqnufbx", "ntojovfnybydhuih", "i")) - .withFeatures(new MonitoringFeatureFilterBase()) - .withFeatureImportanceSettings( - new FeatureImportanceSettings().withMode(FeatureImportanceMode.DISABLED).withTargetColumn("gbjbhrp")) - .withMetricThresholds(Arrays.asList( - new DataDriftMetricThresholdBase() - .withThreshold(new MonitoringThreshold().withValue(44.85113411986268D)), - new DataDriftMetricThresholdBase() - .withThreshold(new MonitoringThreshold().withValue(50.380142949889816D)))) - .withProductionData(new MonitoringInputDataBase().withDataContext("mmaixpqji") - .withJobInputType(JobInputType.MLFLOW_MODEL) - .withUri("f") - .withColumns(mapOf("tohqclna", "sld", "gsiqikvllr", "h", "wrqkza", "tpmglxkoikmtr", "paklw", "bun"))) - .withReferenceData(new MonitoringInputDataBase().withDataContext("wee") - .withJobInputType(JobInputType.URI_FOLDER) - .withUri("nejzltkaszfjsxs") - .withColumns(mapOf("lnwsbvvdlsf", "uxapgrcqebmvrdjo"))) - .withFeatureDataTypeOverride(mapOf("esdfedsb", MonitoringFeatureDataType.NUMERICAL)); - model = BinaryData.fromObject(model).toObject(DataDriftMonitoringSignal.class); - Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, model.notificationTypes().get(0)); - Assertions.assertEquals("phymc", model.properties().get("i")); - Assertions.assertEquals(FeatureImportanceMode.DISABLED, model.featureImportanceSettings().mode()); - Assertions.assertEquals("gbjbhrp", model.featureImportanceSettings().targetColumn()); - Assertions.assertEquals(44.85113411986268D, model.metricThresholds().get(0).threshold().value()); - Assertions.assertEquals("mmaixpqji", model.productionData().dataContext()); - Assertions.assertEquals(JobInputType.MLFLOW_MODEL, model.productionData().jobInputType()); - Assertions.assertEquals("f", model.productionData().uri()); - Assertions.assertEquals("sld", model.productionData().columns().get("tohqclna")); - Assertions.assertEquals("wee", model.referenceData().dataContext()); - Assertions.assertEquals(JobInputType.URI_FOLDER, model.referenceData().jobInputType()); - Assertions.assertEquals("nejzltkaszfjsxs", model.referenceData().uri()); - Assertions.assertEquals("uxapgrcqebmvrdjo", model.referenceData().columns().get("lnwsbvvdlsf")); - Assertions.assertEquals(MonitoringFeatureDataType.NUMERICAL, model.featureDataTypeOverride().get("esdfedsb")); - } - - // 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/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 363e5037b4106..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataLakeAnalyticsSchemaPropertiesTests.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.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\":\"wtxzuisam\"}") - .toObject(DataLakeAnalyticsSchemaProperties.class); - Assertions.assertEquals("wtxzuisam", model.dataLakeStoreAccountName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataLakeAnalyticsSchemaProperties model - = new DataLakeAnalyticsSchemaProperties().withDataLakeStoreAccountName("wtxzuisam"); - model = BinaryData.fromObject(model).toObject(DataLakeAnalyticsSchemaProperties.class); - Assertions.assertEquals("wtxzuisam", 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 a0304a36f0714..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataLakeAnalyticsSchemaTests.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.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\":\"dbmp\"}}") - .toObject(DataLakeAnalyticsSchema.class); - Assertions.assertEquals("dbmp", model.properties().dataLakeStoreAccountName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataLakeAnalyticsSchema model = new DataLakeAnalyticsSchema() - .withProperties(new DataLakeAnalyticsSchemaProperties().withDataLakeStoreAccountName("dbmp")); - model = BinaryData.fromObject(model).toObject(DataLakeAnalyticsSchema.class); - Assertions.assertEquals("dbmp", 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 b0de8cbf43c84..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataPathAssetReferenceTests.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.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\",\"path\":\"wvumosqircamqprl\",\"datastoreId\":\"rugejcvjkjy\"}") - .toObject(DataPathAssetReference.class); - Assertions.assertEquals("wvumosqircamqprl", model.path()); - Assertions.assertEquals("rugejcvjkjy", model.datastoreId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataPathAssetReference model - = new DataPathAssetReference().withPath("wvumosqircamqprl").withDatastoreId("rugejcvjkjy"); - model = BinaryData.fromObject(model).toObject(DataPathAssetReference.class); - Assertions.assertEquals("wvumosqircamqprl", model.path()); - Assertions.assertEquals("rugejcvjkjy", model.datastoreId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataQualityMetricThresholdBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataQualityMetricThresholdBaseTests.java deleted file mode 100644 index bc62a16c55b1f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataQualityMetricThresholdBaseTests.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.DataQualityMetricThresholdBase; -import com.azure.resourcemanager.machinelearning.models.MonitoringThreshold; -import org.junit.jupiter.api.Assertions; - -public final class DataQualityMetricThresholdBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataQualityMetricThresholdBase model = BinaryData - .fromString("{\"dataType\":\"DataQualityMetricThresholdBase\",\"threshold\":{\"value\":1.952782612587045}}") - .toObject(DataQualityMetricThresholdBase.class); - Assertions.assertEquals(1.952782612587045D, model.threshold().value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataQualityMetricThresholdBase model = new DataQualityMetricThresholdBase() - .withThreshold(new MonitoringThreshold().withValue(1.952782612587045D)); - model = BinaryData.fromObject(model).toObject(DataQualityMetricThresholdBase.class); - Assertions.assertEquals(1.952782612587045D, model.threshold().value()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataQualityMonitoringSignalTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataQualityMonitoringSignalTests.java deleted file mode 100644 index edbee6f80163b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataQualityMonitoringSignalTests.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.DataQualityMetricThresholdBase; -import com.azure.resourcemanager.machinelearning.models.DataQualityMonitoringSignal; -import com.azure.resourcemanager.machinelearning.models.FeatureImportanceMode; -import com.azure.resourcemanager.machinelearning.models.FeatureImportanceSettings; -import com.azure.resourcemanager.machinelearning.models.JobInputType; -import com.azure.resourcemanager.machinelearning.models.MonitoringFeatureDataType; -import com.azure.resourcemanager.machinelearning.models.MonitoringFeatureFilterBase; -import com.azure.resourcemanager.machinelearning.models.MonitoringInputDataBase; -import com.azure.resourcemanager.machinelearning.models.MonitoringNotificationType; -import com.azure.resourcemanager.machinelearning.models.MonitoringThreshold; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DataQualityMonitoringSignalTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataQualityMonitoringSignal model = BinaryData.fromString( - "{\"signalType\":\"DataQuality\",\"features\":{\"filterType\":\"MonitoringFeatureFilterBase\"},\"featureImportanceSettings\":{\"mode\":\"Disabled\",\"targetColumn\":\"gelajdyolje\"},\"metricThresholds\":[{\"dataType\":\"DataQualityMetricThresholdBase\",\"threshold\":{\"value\":72.15525185747076}},{\"dataType\":\"DataQualityMetricThresholdBase\",\"threshold\":{\"value\":73.54011054612096}},{\"dataType\":\"DataQualityMetricThresholdBase\",\"threshold\":{\"value\":63.244267432137526}},{\"dataType\":\"DataQualityMetricThresholdBase\",\"threshold\":{\"value\":6.228835392523502}}],\"productionData\":{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"jymgqbgcxhn\",\"jobInputType\":\"literal\",\"uri\":\"gzxlermkmerghski\",\"columns\":{\"jqnvtsdyd\":\"pupkcbkfukd\",\"yuf\":\"hkpafyaloowwzizz\",\"ti\":\"qz\"}},\"referenceData\":{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"uf\",\"jobInputType\":\"mltable\",\"uri\":\"fdk\",\"columns\":{\"qh\":\"vndjokgwesym\",\"ujqbbgsimwejl\":\"qpfzlpejtznxlue\",\"bcpr\":\"bkbpjzobd\",\"ydtnaczkfwfatgaw\":\"swku\"}},\"featureDataTypeOverride\":{\"kivdwgtqcume\":\"Categorical\",\"aaqgoqbdiuycs\":\"Numerical\",\"kowkrbhzhr\":\"Categorical\"},\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"gucyhfaimqvdruo\":\"wiuasfg\",\"kk\":\"kgyfpeoehgfmqm\",\"vzjyielb\":\"xvlzjxplhpevasyn\"}}") - .toObject(DataQualityMonitoringSignal.class); - Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, model.notificationTypes().get(0)); - Assertions.assertEquals("wiuasfg", model.properties().get("gucyhfaimqvdruo")); - Assertions.assertEquals(FeatureImportanceMode.DISABLED, model.featureImportanceSettings().mode()); - Assertions.assertEquals("gelajdyolje", model.featureImportanceSettings().targetColumn()); - Assertions.assertEquals(72.15525185747076D, model.metricThresholds().get(0).threshold().value()); - Assertions.assertEquals("jymgqbgcxhn", model.productionData().dataContext()); - Assertions.assertEquals(JobInputType.LITERAL, model.productionData().jobInputType()); - Assertions.assertEquals("gzxlermkmerghski", model.productionData().uri()); - Assertions.assertEquals("pupkcbkfukd", model.productionData().columns().get("jqnvtsdyd")); - Assertions.assertEquals("uf", model.referenceData().dataContext()); - Assertions.assertEquals(JobInputType.MLTABLE, model.referenceData().jobInputType()); - Assertions.assertEquals("fdk", model.referenceData().uri()); - Assertions.assertEquals("vndjokgwesym", model.referenceData().columns().get("qh")); - Assertions.assertEquals(MonitoringFeatureDataType.CATEGORICAL, - model.featureDataTypeOverride().get("kivdwgtqcume")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataQualityMonitoringSignal model = new DataQualityMonitoringSignal() - .withNotificationTypes( - Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION)) - .withProperties(mapOf("gucyhfaimqvdruo", "wiuasfg", "kk", "kgyfpeoehgfmqm", "vzjyielb", "xvlzjxplhpevasyn")) - .withFeatures(new MonitoringFeatureFilterBase()) - .withFeatureImportanceSettings(new FeatureImportanceSettings().withMode(FeatureImportanceMode.DISABLED) - .withTargetColumn("gelajdyolje")) - .withMetricThresholds(Arrays.asList( - new DataQualityMetricThresholdBase() - .withThreshold(new MonitoringThreshold().withValue(72.15525185747076D)), - new DataQualityMetricThresholdBase() - .withThreshold(new MonitoringThreshold().withValue(73.54011054612096D)), - new DataQualityMetricThresholdBase() - .withThreshold(new MonitoringThreshold().withValue(63.244267432137526D)), - new DataQualityMetricThresholdBase() - .withThreshold(new MonitoringThreshold().withValue(6.228835392523502D)))) - .withProductionData(new MonitoringInputDataBase().withDataContext("jymgqbgcxhn") - .withJobInputType(JobInputType.LITERAL) - .withUri("gzxlermkmerghski") - .withColumns(mapOf("jqnvtsdyd", "pupkcbkfukd", "yuf", "hkpafyaloowwzizz", "ti", "qz"))) - .withReferenceData(new MonitoringInputDataBase().withDataContext("uf") - .withJobInputType(JobInputType.MLTABLE) - .withUri("fdk") - .withColumns(mapOf("qh", "vndjokgwesym", "ujqbbgsimwejl", "qpfzlpejtznxlue", "bcpr", "bkbpjzobd", - "ydtnaczkfwfatgaw", "swku"))) - .withFeatureDataTypeOverride(mapOf("kivdwgtqcume", MonitoringFeatureDataType.CATEGORICAL, "aaqgoqbdiuycs", - MonitoringFeatureDataType.NUMERICAL, "kowkrbhzhr", MonitoringFeatureDataType.CATEGORICAL)); - model = BinaryData.fromObject(model).toObject(DataQualityMonitoringSignal.class); - Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, model.notificationTypes().get(0)); - Assertions.assertEquals("wiuasfg", model.properties().get("gucyhfaimqvdruo")); - Assertions.assertEquals(FeatureImportanceMode.DISABLED, model.featureImportanceSettings().mode()); - Assertions.assertEquals("gelajdyolje", model.featureImportanceSettings().targetColumn()); - Assertions.assertEquals(72.15525185747076D, model.metricThresholds().get(0).threshold().value()); - Assertions.assertEquals("jymgqbgcxhn", model.productionData().dataContext()); - Assertions.assertEquals(JobInputType.LITERAL, model.productionData().jobInputType()); - Assertions.assertEquals("gzxlermkmerghski", model.productionData().uri()); - Assertions.assertEquals("pupkcbkfukd", model.productionData().columns().get("jqnvtsdyd")); - Assertions.assertEquals("uf", model.referenceData().dataContext()); - Assertions.assertEquals(JobInputType.MLTABLE, model.referenceData().jobInputType()); - Assertions.assertEquals("fdk", model.referenceData().uri()); - Assertions.assertEquals("vndjokgwesym", model.referenceData().columns().get("qh")); - Assertions.assertEquals(MonitoringFeatureDataType.CATEGORICAL, - model.featureDataTypeOverride().get("kivdwgtqcume")); - } - - // 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/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 dac5e4fa54a7a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBaseInnerTests.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.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\":\"widf\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"unnoxyhk\",\"tags\":{\"oqcaaewdaomdj\":\"ddrihpf\",\"jxxkzbrmsgei\":\"l\",\"ggcula\":\"siykzkdncjdxonbz\",\"y\":\"z\"},\"properties\":{\"ajlyjtlvofqzhv\":\"ogtqxepnylbf\",\"fmo\":\"cib\",\"dwxf\":\"uxrkjp\",\"rkambt\":\"wiivwzjbhyzsx\"}},\"id\":\"egv\",\"name\":\"nvuqeqvldspa\",\"type\":\"tjb\"}") - .toObject(DataVersionBaseInner.class); - Assertions.assertEquals("unnoxyhk", model.properties().description()); - Assertions.assertEquals("ddrihpf", model.properties().tags().get("oqcaaewdaomdj")); - Assertions.assertEquals("ogtqxepnylbf", model.properties().properties().get("ajlyjtlvofqzhv")); - Assertions.assertEquals(true, model.properties().isArchived()); - Assertions.assertEquals(true, model.properties().isAnonymous()); - Assertions.assertEquals("widf", model.properties().dataUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataVersionBaseInner model = new DataVersionBaseInner().withProperties(new DataVersionBaseProperties() - .withDescription("unnoxyhk") - .withTags(mapOf("oqcaaewdaomdj", "ddrihpf", "jxxkzbrmsgei", "l", "ggcula", "siykzkdncjdxonbz", "y", "z")) - .withProperties( - mapOf("ajlyjtlvofqzhv", "ogtqxepnylbf", "fmo", "cib", "dwxf", "uxrkjp", "rkambt", "wiivwzjbhyzsx")) - .withIsArchived(true) - .withIsAnonymous(true) - .withDataUri("widf")); - model = BinaryData.fromObject(model).toObject(DataVersionBaseInner.class); - Assertions.assertEquals("unnoxyhk", model.properties().description()); - Assertions.assertEquals("ddrihpf", model.properties().tags().get("oqcaaewdaomdj")); - Assertions.assertEquals("ogtqxepnylbf", model.properties().properties().get("ajlyjtlvofqzhv")); - Assertions.assertEquals(true, model.properties().isArchived()); - Assertions.assertEquals(true, model.properties().isAnonymous()); - Assertions.assertEquals("widf", model.properties().dataUri()); - } - - // 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/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 3a7e34d14cb7c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBasePropertiesTests.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.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\":\"kdmflvestmjlx\",\"isArchived\":true,\"isAnonymous\":false,\"description\":\"apeewchpxlkt\",\"tags\":{\"yhjtqedcgzu\":\"ziycslevufuztck\",\"zrrjvpgly\":\"wmmrq\"},\"properties\":{\"ev\":\"krvq\",\"t\":\"oepry\",\"fvaawzqa\":\"wytpzdmovz\"}}") - .toObject(DataVersionBaseProperties.class); - Assertions.assertEquals("apeewchpxlkt", model.description()); - Assertions.assertEquals("ziycslevufuztck", model.tags().get("yhjtqedcgzu")); - Assertions.assertEquals("krvq", model.properties().get("ev")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals("kdmflvestmjlx", model.dataUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataVersionBaseProperties model = new DataVersionBaseProperties().withDescription("apeewchpxlkt") - .withTags(mapOf("yhjtqedcgzu", "ziycslevufuztck", "zrrjvpgly", "wmmrq")) - .withProperties(mapOf("ev", "krvq", "t", "oepry", "fvaawzqa", "wytpzdmovz")) - .withIsArchived(true) - .withIsAnonymous(false) - .withDataUri("kdmflvestmjlx"); - model = BinaryData.fromObject(model).toObject(DataVersionBaseProperties.class); - Assertions.assertEquals("apeewchpxlkt", model.description()); - Assertions.assertEquals("ziycslevufuztck", model.tags().get("yhjtqedcgzu")); - Assertions.assertEquals("krvq", model.properties().get("ev")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals("kdmflvestmjlx", model.dataUri()); - } - - // 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/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 789ff4ea9ee21..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBaseResourceArmPaginatedResultTests.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.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( - "{\"value\":[{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"hhg\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"ivfomiloxgg\",\"tags\":{\"hvcyyysfg\":\"iqndieuzaofj\"},\"properties\":{\"qonmacj\":\"cubiipuipw\",\"izsh\":\"k\",\"gmblrri\":\"vcimpev\",\"rwfscjfnynszquj\":\"bywdxsmicc\"}},\"id\":\"dvoqyt\",\"name\":\"byowbblgyavutp\",\"type\":\"hjoxo\"},{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"smsks\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"oljxkcgx\",\"tags\":{\"l\":\"sffgcvizqzd\",\"youpfgfbkj\":\"w\",\"ttsttktlahbqact\":\"bdyhgkfminsgowz\"},\"properties\":{\"x\":\"zukxitmmqtgqq\",\"isavok\":\"rnxrxcpj\",\"azivjlfrqttbajl\":\"dzf\"}},\"id\":\"tnwxy\",\"name\":\"opidkqqfkuv\",\"type\":\"cxkdmligovi\"},{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"rxkpmloazuruoc\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"te\",\"tags\":{\"ordilmywwtkgkxny\":\"fhjxakvvjgs\",\"vudtjuewbcihx\":\"dabg\",\"ayakkudzpx\":\"uwhcjyxccybv\",\"stcyohpfkyrkdbd\":\"wjplma\"},\"properties\":{\"mnwqj\":\"gsj\",\"n\":\"obaiyhddviaceg\",\"dwvvba\":\"ntfpmvmemfnc\"}},\"id\":\"lllchpodb\",\"name\":\"evwrdnhfuk\",\"type\":\"vsjcswsmystuluqy\"}],\"nextLink\":\"cvlerchpqbmfpjba\"}") - .toObject(DataVersionBaseResourceArmPaginatedResult.class); - Assertions.assertEquals("ivfomiloxgg", model.value().get(0).properties().description()); - Assertions.assertEquals("iqndieuzaofj", model.value().get(0).properties().tags().get("hvcyyysfg")); - Assertions.assertEquals("cubiipuipw", model.value().get(0).properties().properties().get("qonmacj")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(false, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals("hhg", model.value().get(0).properties().dataUri()); - Assertions.assertEquals("cvlerchpqbmfpjba", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataVersionBaseResourceArmPaginatedResult model - = new DataVersionBaseResourceArmPaginatedResult().withValue(Arrays.asList( - new DataVersionBaseInner().withProperties(new DataVersionBaseProperties().withDescription("ivfomiloxgg") - .withTags(mapOf("hvcyyysfg", "iqndieuzaofj")) - .withProperties(mapOf("qonmacj", "cubiipuipw", "izsh", "k", "gmblrri", "vcimpev", "rwfscjfnynszquj", - "bywdxsmicc")) - .withIsArchived(false) - .withIsAnonymous(false) - .withDataUri("hhg")), - new DataVersionBaseInner().withProperties(new DataVersionBaseProperties().withDescription("oljxkcgx") - .withTags(mapOf("l", "sffgcvizqzd", "youpfgfbkj", "w", "ttsttktlahbqact", "bdyhgkfminsgowz")) - .withProperties(mapOf("x", "zukxitmmqtgqq", "isavok", "rnxrxcpj", "azivjlfrqttbajl", "dzf")) - .withIsArchived(false) - .withIsAnonymous(false) - .withDataUri("smsks")), - new DataVersionBaseInner().withProperties(new DataVersionBaseProperties().withDescription("te") - .withTags(mapOf("ordilmywwtkgkxny", "fhjxakvvjgs", "vudtjuewbcihx", "dabg", "ayakkudzpx", - "uwhcjyxccybv", "stcyohpfkyrkdbd", "wjplma")) - .withProperties(mapOf("mnwqj", "gsj", "n", "obaiyhddviaceg", "dwvvba", "ntfpmvmemfnc")) - .withIsArchived(false) - .withIsAnonymous(false) - .withDataUri("rxkpmloazuruoc")))) - .withNextLink("cvlerchpqbmfpjba"); - model = BinaryData.fromObject(model).toObject(DataVersionBaseResourceArmPaginatedResult.class); - Assertions.assertEquals("ivfomiloxgg", model.value().get(0).properties().description()); - Assertions.assertEquals("iqndieuzaofj", model.value().get(0).properties().tags().get("hvcyyysfg")); - Assertions.assertEquals("cubiipuipw", model.value().get(0).properties().properties().get("qonmacj")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(false, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals("hhg", model.value().get(0).properties().dataUri()); - Assertions.assertEquals("cvlerchpqbmfpjba", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 b8ab3cf6f4342..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsCreateOrUpdateWithResponseMockTests.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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DataVersionBase; -import com.azure.resourcemanager.machinelearning.models.DataVersionBaseProperties; -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 reactor.core.publisher.Mono; - -public final class DataVersionsCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"znqqkqxkdglse\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"yakr\",\"tags\":{\"nnvxouhdcf\":\"nwgokrllbec\",\"g\":\"ptfcjapmfwxmcxhw\",\"mgadhmqyufpfo\":\"hifoyo\"},\"properties\":{\"qcypm\":\"ylszrtng\",\"cigcbmayhdtjfrp\":\"nfcorcnhf\"}},\"id\":\"ajzdj\",\"name\":\"zbrwrfrmhouf\",\"type\":\"krbgvojcks\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("rru") - .withExistingData("rucwzc", "judhgw", "qeglym") - .withProperties(new DataVersionBaseProperties().withDescription("lfi") - .withTags(mapOf("e", "nnyxwdpm")) - .withProperties(mapOf("mmvdpavc", "vzxgbamqrbbsnp", "wdtunpcskdlrfo", "kbyjuwhizcbqjxm")) - .withIsArchived(false) - .withIsAnonymous(true) - .withDataUri("sqpiyxkmqm")) - .create(); - - Assertions.assertEquals("yakr", response.properties().description()); - Assertions.assertEquals("nwgokrllbec", response.properties().tags().get("nnvxouhdcf")); - Assertions.assertEquals("ylszrtng", response.properties().properties().get("qcypm")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals("znqqkqxkdglse", response.properties().dataUri()); - } - - // 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/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 7f76761391563..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsDeleteWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DataVersionsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("nm", "niqw", "qxyxfknjqss", "nwvravntv", 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 c9eaabcf88c1a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DataVersionBase; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DataVersionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"regykjmpad\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"hcz\",\"tags\":{\"af\":\"itydljgrpq\",\"sihumwafapctglj\":\"gjqqbactffxdb\",\"qdd\":\"pizqqihvbkufq\",\"ajlfpsvrljlhe\":\"ynpgomzmkj\"},\"properties\":{\"bnwitafjjevp\":\"cp\",\"vkparskplqft\":\"vitghzq\"}},\"id\":\"xqmbsu\",\"name\":\"cykgulellfwrmsux\",\"type\":\"qbmqo\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("lkwqisnlpaymket", "tkt", "mewwlkryz", "pgqqdhtctx", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("hcz", response.properties().description()); - Assertions.assertEquals("itydljgrpq", response.properties().tags().get("af")); - Assertions.assertEquals("cp", response.properties().properties().get("bnwitafjjevp")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals("regykjmpad", 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 5ad27d199a958..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DataVersionBase; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DataVersionsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"rwpekiprjb\",\"isArchived\":true,\"isAnonymous\":false,\"description\":\"airpwj\",\"tags\":{\"jtvqopugrsergiuz\":\"iwsywp\",\"mcbcen\":\"qefzypult\"},\"properties\":{\"kiynbf\":\"huepikwcxoasgukq\",\"irgyutexnzh\":\"kiwmqnwmytcc\",\"ybfarkhkoqcudn\":\"mcgvjb\"}},\"id\":\"oyh\",\"name\":\"pjj\",\"type\":\"qnzcbjfpxoy\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("qcqyzmrtfdl", "pryyjlikalbcyu", "ahwzagvai", "zcephnhnu", 213380066, "y", "zkhi", ListViewType.ALL, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("airpwj", response.iterator().next().properties().description()); - Assertions.assertEquals("iwsywp", response.iterator().next().properties().tags().get("jtvqopugrsergiuz")); - Assertions.assertEquals("huepikwcxoasgukq", response.iterator().next().properties().properties().get("kiynbf")); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - Assertions.assertEquals(false, response.iterator().next().properties().isAnonymous()); - Assertions.assertEquals("rwpekiprjb", response.iterator().next().properties().dataUri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsPublishMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsPublishMockTests.java deleted file mode 100644 index 6f8faf3bda781..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsPublishMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DataVersionsPublishMockTests { - @Test - public void testPublish() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.dataVersions() - .publish("bxlpkdsnbqoy", "sdlraduhgwaxz", "rppoy", "ijribeskkopbksri", - new DestinationAsset().withRegistryName("btmorikczerq") - .withDestinationName("qxgwsfr") - .withDestinationVersion("vzlljydgmdoq"), - com.azure.core.util.Context.NONE); - - } -} 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 d5b7636b4f1d9..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DatastoresDeleteWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DatastoresDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("ecmgukywdpuowl", "ex", "rpitqzqnbseujc", 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 a69cbaa8189d0..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 8359ffb10cb93..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentLogsInnerTests.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.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\":\"jqu\"}").toObject(DeploymentLogsInner.class); - Assertions.assertEquals("jqu", model.content()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeploymentLogsInner model = new DeploymentLogsInner().withContent("jqu"); - model = BinaryData.fromObject(model).toObject(DeploymentLogsInner.class); - Assertions.assertEquals("jqu", 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 c1d1f13e51738..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentLogsRequestTests.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.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\":\"InferenceServer\",\"tail\":1245703985}") - .toObject(DeploymentLogsRequest.class); - Assertions.assertEquals(ContainerType.INFERENCE_SERVER, model.containerType()); - Assertions.assertEquals(1245703985, model.tail()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeploymentLogsRequest model - = new DeploymentLogsRequest().withContainerType(ContainerType.INFERENCE_SERVER).withTail(1245703985); - model = BinaryData.fromObject(model).toObject(DeploymentLogsRequest.class); - Assertions.assertEquals(ContainerType.INFERENCE_SERVER, model.containerType()); - Assertions.assertEquals(1245703985, 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 73911b21f7254..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentResourceConfigurationTests.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.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\":1387875327,\"instanceType\":\"qaclnapxbiy\",\"properties\":{\"smfcttuxuuyilfl\":\"datagjkn\",\"jztczytqj\":\"dataoiquvrehmrnjhvs\"}}") - .toObject(DeploymentResourceConfiguration.class); - Assertions.assertEquals(1387875327, model.instanceCount()); - Assertions.assertEquals("qaclnapxbiy", model.instanceType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeploymentResourceConfiguration model = new DeploymentResourceConfiguration().withInstanceCount(1387875327) - .withInstanceType("qaclnapxbiy") - .withProperties(mapOf("smfcttuxuuyilfl", "datagjkn", "jztczytqj", "dataoiquvrehmrnjhvs")); - model = BinaryData.fromObject(model).toObject(DeploymentResourceConfiguration.class); - Assertions.assertEquals(1387875327, model.instanceCount()); - Assertions.assertEquals("qaclnapxbiy", model.instanceType()); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/DestinationAssetTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DestinationAssetTests.java deleted file mode 100644 index 82e343493aac1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DestinationAssetTests.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.DestinationAsset; -import org.junit.jupiter.api.Assertions; - -public final class DestinationAssetTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DestinationAsset model = BinaryData - .fromString("{\"registryName\":\"yp\",\"destinationName\":\"ubcpzgpxti\",\"destinationVersion\":\"j\"}") - .toObject(DestinationAsset.class); - Assertions.assertEquals("yp", model.registryName()); - Assertions.assertEquals("ubcpzgpxti", model.destinationName()); - Assertions.assertEquals("j", model.destinationVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DestinationAsset model = new DestinationAsset().withRegistryName("yp") - .withDestinationName("ubcpzgpxti") - .withDestinationVersion("j"); - model = BinaryData.fromObject(model).toObject(DestinationAsset.class); - Assertions.assertEquals("yp", model.registryName()); - Assertions.assertEquals("ubcpzgpxti", model.destinationName()); - Assertions.assertEquals("j", model.destinationVersion()); - } -} 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 c442a9b668365..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DistributionConfigurationTests.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.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/DockerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DockerTests.java deleted file mode 100644 index 6019b7dcfc0f5..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DockerTests.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.Docker; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DockerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Docker model = BinaryData.fromString( - "{\"privileged\":true,\"\":{\"vzadbwenn\":\"datadrwjcljbrhlh\",\"vztiucwviqllukh\":\"datanafhxrzfr\",\"po\":\"datarcqxgcbvzarmqc\",\"vjyhdrxbrdvc\":\"datastsinvag\"}}") - .toObject(Docker.class); - Assertions.assertEquals(true, model.privileged()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Docker model = new Docker().withPrivileged(true).withAdditionalProperties(mapOf()); - model = BinaryData.fromObject(model).toObject(Docker.class); - Assertions.assertEquals(true, model.privileged()); - } - - // 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/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 577e22528c922..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EarlyTerminationPolicyTests.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.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\",\"evaluationInterval\":1134110366,\"delayEvaluation\":1352080232}") - .toObject(EarlyTerminationPolicy.class); - Assertions.assertEquals(1134110366, model.evaluationInterval()); - Assertions.assertEquals(1352080232, model.delayEvaluation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EarlyTerminationPolicy model - = new EarlyTerminationPolicy().withEvaluationInterval(1134110366).withDelayEvaluation(1352080232); - model = BinaryData.fromObject(model).toObject(EarlyTerminationPolicy.class); - Assertions.assertEquals(1134110366, model.evaluationInterval()); - Assertions.assertEquals(1352080232, model.delayEvaluation()); - } -} 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 1f528f275e975..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointScheduleActionTests.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.EndpointScheduleAction; - -public final class EndpointScheduleActionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EndpointScheduleAction model = BinaryData - .fromString( - "{\"actionType\":\"InvokeBatchEndpoint\",\"endpointInvocationDefinition\":\"datarvvbqvknmpecqxg\"}") - .toObject(EndpointScheduleAction.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EndpointScheduleAction model - = new EndpointScheduleAction().withEndpointInvocationDefinition("datarvvbqvknmpecqxg"); - model = BinaryData.fromObject(model).toObject(EndpointScheduleAction.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointTests.java deleted file mode 100644 index a321709e936d7..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointTests.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.Endpoint; -import com.azure.resourcemanager.machinelearning.models.Protocol; -import org.junit.jupiter.api.Assertions; - -public final class EndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Endpoint model = BinaryData.fromString( - "{\"protocol\":\"udp\",\"name\":\"hitxnm\",\"target\":2115255313,\"published\":1374259249,\"hostIp\":\"zbuwvorbalkjnbk\"}") - .toObject(Endpoint.class); - Assertions.assertEquals(Protocol.UDP, model.protocol()); - Assertions.assertEquals("hitxnm", model.name()); - Assertions.assertEquals(2115255313, model.target()); - Assertions.assertEquals(1374259249, model.published()); - Assertions.assertEquals("zbuwvorbalkjnbk", model.hostIp()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Endpoint model = new Endpoint().withProtocol(Protocol.UDP) - .withName("hitxnm") - .withTarget(2115255313) - .withPublished(1374259249) - .withHostIp("zbuwvorbalkjnbk"); - model = BinaryData.fromObject(model).toObject(Endpoint.class); - Assertions.assertEquals(Protocol.UDP, model.protocol()); - Assertions.assertEquals("hitxnm", model.name()); - Assertions.assertEquals(2115255313, model.target()); - Assertions.assertEquals(1374259249, model.published()); - Assertions.assertEquals("zbuwvorbalkjnbk", model.hostIp()); - } -} 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 934b9efddeeec..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerInnerTests.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.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\":{\"provisioningState\":\"Updating\",\"isArchived\":false,\"latestVersion\":\"ieypef\",\"nextVersion\":\"yqdhcuplcplcw\",\"description\":\"ihih\",\"tags\":{\"gmvecactxmw\":\"dsqtzbsrgnowcjh\",\"ovekqvgqouwi\":\"teyowclu\",\"ikf\":\"zmpjwyiv\",\"uagrttikteusqc\":\"cvhrfsp\"},\"properties\":{\"qcuubgqibrta\":\"yklxubyjaffmmfbl\",\"lqxihhrmooiz\":\"metttwgd\"}},\"id\":\"eypxiutcxapzhyr\",\"name\":\"etoge\",\"type\":\"joxslhvnhla\"}") - .toObject(EnvironmentContainerInner.class); - Assertions.assertEquals("ihih", model.properties().description()); - Assertions.assertEquals("dsqtzbsrgnowcjh", model.properties().tags().get("gmvecactxmw")); - Assertions.assertEquals("yklxubyjaffmmfbl", model.properties().properties().get("qcuubgqibrta")); - Assertions.assertEquals(false, model.properties().isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentContainerInner model = new EnvironmentContainerInner() - .withProperties(new EnvironmentContainerProperties().withDescription("ihih") - .withTags(mapOf("gmvecactxmw", "dsqtzbsrgnowcjh", "ovekqvgqouwi", "teyowclu", "ikf", "zmpjwyiv", - "uagrttikteusqc", "cvhrfsp")) - .withProperties(mapOf("qcuubgqibrta", "yklxubyjaffmmfbl", "lqxihhrmooiz", "metttwgd")) - .withIsArchived(false)); - model = BinaryData.fromObject(model).toObject(EnvironmentContainerInner.class); - Assertions.assertEquals("ihih", model.properties().description()); - Assertions.assertEquals("dsqtzbsrgnowcjh", model.properties().tags().get("gmvecactxmw")); - Assertions.assertEquals("yklxubyjaffmmfbl", model.properties().properties().get("qcuubgqibrta")); - Assertions.assertEquals(false, model.properties().isArchived()); - } - - // 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/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 a9fb13e515dd3..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerPropertiesTests.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.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( - "{\"provisioningState\":\"Deleting\",\"isArchived\":true,\"latestVersion\":\"zjcjbtr\",\"nextVersion\":\"ehvvib\",\"description\":\"jj\",\"tags\":{\"lftidgfcwqmpim\":\"qbeitpkxztmoob\",\"yhohujswtwkozzwc\":\"qxzhem\",\"wpfaj\":\"lkb\"},\"properties\":{\"vkcdmxzr\":\"ltlwtjjguktalhs\",\"aaomylweazu\":\"oaimlnw\",\"hwwn\":\"cse\",\"ousnfepgfewe\":\"jhlfzswpchwahf\"}}") - .toObject(EnvironmentContainerProperties.class); - Assertions.assertEquals("jj", model.description()); - Assertions.assertEquals("qbeitpkxztmoob", model.tags().get("lftidgfcwqmpim")); - Assertions.assertEquals("ltlwtjjguktalhs", model.properties().get("vkcdmxzr")); - Assertions.assertEquals(true, model.isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentContainerProperties model = new EnvironmentContainerProperties().withDescription("jj") - .withTags(mapOf("lftidgfcwqmpim", "qbeitpkxztmoob", "yhohujswtwkozzwc", "qxzhem", "wpfaj", "lkb")) - .withProperties(mapOf("vkcdmxzr", "ltlwtjjguktalhs", "aaomylweazu", "oaimlnw", "hwwn", "cse", - "ousnfepgfewe", "jhlfzswpchwahf")) - .withIsArchived(true); - model = BinaryData.fromObject(model).toObject(EnvironmentContainerProperties.class); - Assertions.assertEquals("jj", model.description()); - Assertions.assertEquals("qbeitpkxztmoob", model.tags().get("lftidgfcwqmpim")); - Assertions.assertEquals("ltlwtjjguktalhs", model.properties().get("vkcdmxzr")); - Assertions.assertEquals(true, model.isArchived()); - } - - // 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/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 07f37acf4096c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"isArchived\":true,\"latestVersion\":\"qvkjlmxho\",\"nextVersion\":\"ynhdwdigum\",\"description\":\"raauzzpt\",\"tags\":{\"wva\":\"ysdzhez\",\"hqyikvy\":\"qyuvvfonkp\"},\"properties\":{\"jfybvpoekrsgsgb\":\"yavluwmncstt\"}},\"id\":\"uzqgnjdgkynsc\",\"name\":\"i\",\"type\":\"hzvhxnkomtkubo\"},{\"properties\":{\"provisioningState\":\"Creating\",\"isArchived\":true,\"latestVersion\":\"xz\",\"nextVersion\":\"ihfrbbcevqa\",\"description\":\"ltd\",\"tags\":{\"py\":\"kqo\",\"ymbrnysuxmpraf\":\"vgtrdcnifmzzs\"},\"properties\":{\"roud\":\"khocxvdfffwaf\"}},\"id\":\"pavehhr\",\"name\":\"kbunzoz\",\"type\":\"dhcxgkmoy\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"latestVersion\":\"bhmfdnbz\",\"nextVersion\":\"vfvfcj\",\"description\":\"eoisrvhmgor\",\"tags\":{\"faxvxil\":\"kiscvwmzhwpl\",\"nzeyqxtjj\":\"btgn\",\"vodggxdbee\":\"zqlqhyc\"},\"properties\":{\"iaa\":\"eknlra\",\"agt\":\"iuagydwqfbylyrfg\"}},\"id\":\"jocqwogfnzjvusf\",\"name\":\"ld\",\"type\":\"ozuxylfsbtkadpys\"}],\"nextLink\":\"nbtgkbugrjqctoj\"}") - .toObject(EnvironmentContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("raauzzpt", model.value().get(0).properties().description()); - Assertions.assertEquals("ysdzhez", model.value().get(0).properties().tags().get("wva")); - Assertions.assertEquals("yavluwmncstt", model.value().get(0).properties().properties().get("jfybvpoekrsgsgb")); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("nbtgkbugrjqctoj", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentContainerResourceArmPaginatedResult model - = new EnvironmentContainerResourceArmPaginatedResult().withValue(Arrays.asList( - new EnvironmentContainerInner() - .withProperties(new EnvironmentContainerProperties().withDescription("raauzzpt") - .withTags(mapOf("wva", "ysdzhez", "hqyikvy", "qyuvvfonkp")) - .withProperties(mapOf("jfybvpoekrsgsgb", "yavluwmncstt")) - .withIsArchived(true)), - new EnvironmentContainerInner() - .withProperties(new EnvironmentContainerProperties().withDescription("ltd") - .withTags(mapOf("py", "kqo", "ymbrnysuxmpraf", "vgtrdcnifmzzs")) - .withProperties(mapOf("roud", "khocxvdfffwaf")) - .withIsArchived(true)), - new EnvironmentContainerInner() - .withProperties(new EnvironmentContainerProperties().withDescription("eoisrvhmgor") - .withTags(mapOf("faxvxil", "kiscvwmzhwpl", "nzeyqxtjj", "btgn", "vodggxdbee", "zqlqhyc")) - .withProperties(mapOf("iaa", "eknlra", "agt", "iuagydwqfbylyrfg")) - .withIsArchived(true)))) - .withNextLink("nbtgkbugrjqctoj"); - model = BinaryData.fromObject(model).toObject(EnvironmentContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("raauzzpt", model.value().get(0).properties().description()); - Assertions.assertEquals("ysdzhez", model.value().get(0).properties().tags().get("wva")); - Assertions.assertEquals("yavluwmncstt", model.value().get(0).properties().properties().get("jfybvpoekrsgsgb")); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("nbtgkbugrjqctoj", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 90da11514061b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersCreateOrUpdateWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainer; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties; -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 reactor.core.publisher.Mono; - -public final class EnvironmentContainersCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Deleting\",\"isArchived\":true,\"latestVersion\":\"ydemccqdssbmge\",\"nextVersion\":\"dudh\",\"description\":\"smnfgzmxtxfuhxy\",\"tags\":{\"e\":\"y\",\"sffrpjfxsyx\":\"cknglffnozzf\",\"ufrspreyilqcskxk\":\"dosyhhw\"},\"properties\":{\"dimnacklyrbv\":\"ykqrqtxqogr\"}},\"id\":\"dgexpnphtqwfpjp\",\"name\":\"b\",\"type\":\"x\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("emqcbnkiv") - .withExistingWorkspace("nqlwogq", "bjuaiu") - .withProperties(new EnvironmentContainerProperties().withDescription("dmxokbutb") - .withTags(mapOf("ayvcsejdh", "x", "oppybseckgaxmhas", "odyiitreddjt", "st", "jiet")) - .withProperties(mapOf("wrjtkrei", "dvzcnlk", "swmgrbkobmg", "ojh", "widteb", "avzmqpaa", "r", "ed")) - .withIsArchived(true)) - .create(); - - Assertions.assertEquals("smnfgzmxtxfuhxy", response.properties().description()); - Assertions.assertEquals("y", response.properties().tags().get("e")); - Assertions.assertEquals("ykqrqtxqogr", response.properties().properties().get("dimnacklyrbv")); - Assertions.assertEquals(true, response.properties().isArchived()); - } - - // 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/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 bc3e7538876ee..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersDeleteWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class EnvironmentContainersDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("bwlbqn", "dderrxyiwuzpsvcm", "sfstyyy", 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 4f6fe4157fb69..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class EnvironmentContainersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Deleting\",\"isArchived\":true,\"latestVersion\":\"kzqbvhvdulymkg\",\"nextVersion\":\"ryhxf\",\"description\":\"a\",\"tags\":{\"ghps\":\"ftkgmbmvxbiub\",\"rbusnaq\":\"tbame\",\"erlurgipvnbxle\":\"vruuhyncppmmwh\",\"gpxd\":\"smc\"},\"properties\":{\"iihrfcowlase\":\"qmguvdk\",\"vf\":\"ifywxjjylaqhx\"}},\"id\":\"rvjhwgkynxlwrj\",\"name\":\"otdtmcktkal\",\"type\":\"piybfnkylzri\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("qnwnlc", "zfjd", "kfthsydphdb", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("a", response.properties().description()); - Assertions.assertEquals("ftkgmbmvxbiub", response.properties().tags().get("ghps")); - Assertions.assertEquals("qmguvdk", response.properties().properties().get("iihrfcowlase")); - Assertions.assertEquals(true, 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 70fd11b82ea7e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainer; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class EnvironmentContainersListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"ucqehyrnzmj\",\"nextVersion\":\"fbmpszwk\",\"description\":\"stzu\",\"tags\":{\"smaxdwxr\":\"a\",\"akxy\":\"qtbvwsd\",\"u\":\"lkgjhomywlypghhu\",\"b\":\"yfvgpqwgiqmbrisk\"},\"properties\":{\"vyqmmczuguvlieeg\":\"tq\",\"jscgqcr\":\"nqwhfjoxse\",\"uhffjjqvjyqmpmsk\":\"aucftotedhjxdl\",\"udpypboqlefxf\":\"axrhljwqu\"}},\"id\":\"majvwfi\",\"name\":\"f\",\"type\":\"jjrvsvhmsmrihdd\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("nvpdvctqdapy", "sfp", "pj", ListViewType.ACTIVE_ONLY, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("stzu", response.iterator().next().properties().description()); - Assertions.assertEquals("a", response.iterator().next().properties().tags().get("smaxdwxr")); - Assertions.assertEquals("tq", response.iterator().next().properties().properties().get("vyqmmczuguvlieeg")); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVariableTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVariableTests.java deleted file mode 100644 index 5973cdb59f71e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVariableTests.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.models.EnvironmentVariable; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVariableType; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class EnvironmentVariableTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EnvironmentVariable model = BinaryData.fromString( - "{\"type\":\"local\",\"value\":\"vbgikyj\",\"\":{\"kaoizjixw\":\"datakvlbishjvpzaptuo\",\"c\":\"datagcdiyk\",\"tmdmuqohhihr\":\"datawnujvqynvav\"}}") - .toObject(EnvironmentVariable.class); - Assertions.assertEquals(EnvironmentVariableType.LOCAL, model.type()); - Assertions.assertEquals("vbgikyj", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentVariable model = new EnvironmentVariable().withType(EnvironmentVariableType.LOCAL) - .withValue("vbgikyj") - .withAdditionalProperties(mapOf()); - model = BinaryData.fromObject(model).toObject(EnvironmentVariable.class); - Assertions.assertEquals(EnvironmentVariableType.LOCAL, model.type()); - Assertions.assertEquals("vbgikyj", model.value()); - } - - // 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/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 bd369e06db743..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionInnerTests.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.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 com.azure.resourcemanager.machinelearning.models.Route; -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\":{\"environmentType\":\"UserCreated\",\"image\":\"fhqlyvi\",\"condaFile\":\"uwivkxoy\",\"build\":{\"contextUri\":\"nbixxrti\",\"dockerfilePath\":\"cpwpg\"},\"osType\":\"Linux\",\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"vtsoxf\",\"port\":967528675},\"readinessRoute\":{\"path\":\"nxpmyyefrpmpdnq\",\"port\":663766748},\"scoringRoute\":{\"path\":\"awaoqvmmbnpqfrt\",\"port\":1516123032}},\"autoRebuild\":\"OnBaseImageUpdate\",\"provisioningState\":\"Canceled\",\"stage\":\"nitgvkxlz\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"gcealzxwh\",\"tags\":{\"lwigdivbkbx\":\"symoyq\",\"wasqvdaeyyg\":\"omfaj\",\"zkgimsid\":\"xakjsqzhzb\",\"ddyvvjskgfmo\":\"asi\"},\"properties\":{\"hnakzyb\":\"hpqgatjeaahhvj\"}},\"id\":\"jid\",\"name\":\"ksyxkyxvxevblbje\",\"type\":\"nljlageuaulx\"}") - .toObject(EnvironmentVersionInner.class); - Assertions.assertEquals("gcealzxwh", model.properties().description()); - Assertions.assertEquals("symoyq", model.properties().tags().get("lwigdivbkbx")); - Assertions.assertEquals("hpqgatjeaahhvj", model.properties().properties().get("hnakzyb")); - Assertions.assertEquals(false, model.properties().isArchived()); - Assertions.assertEquals(false, model.properties().isAnonymous()); - Assertions.assertEquals("fhqlyvi", model.properties().image()); - Assertions.assertEquals("uwivkxoy", model.properties().condaFile()); - Assertions.assertEquals("nbixxrti", model.properties().build().contextUri()); - Assertions.assertEquals("cpwpg", model.properties().build().dockerfilePath()); - Assertions.assertEquals(OperatingSystemType.LINUX, model.properties().osType()); - Assertions.assertEquals("vtsoxf", model.properties().inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(967528675, model.properties().inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("nxpmyyefrpmpdnq", model.properties().inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(663766748, model.properties().inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("awaoqvmmbnpqfrt", model.properties().inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(1516123032, model.properties().inferenceConfig().scoringRoute().port()); - Assertions.assertEquals(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE, model.properties().autoRebuild()); - Assertions.assertEquals("nitgvkxlz", model.properties().stage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentVersionInner model = new EnvironmentVersionInner().withProperties(new EnvironmentVersionProperties() - .withDescription("gcealzxwh") - .withTags( - mapOf("lwigdivbkbx", "symoyq", "wasqvdaeyyg", "omfaj", "zkgimsid", "xakjsqzhzb", "ddyvvjskgfmo", "asi")) - .withProperties(mapOf("hnakzyb", "hpqgatjeaahhvj")) - .withIsArchived(false) - .withIsAnonymous(false) - .withImage("fhqlyvi") - .withCondaFile("uwivkxoy") - .withBuild(new BuildContext().withContextUri("nbixxrti").withDockerfilePath("cpwpg")) - .withOsType(OperatingSystemType.LINUX) - .withInferenceConfig( - new InferenceContainerProperties().withLivenessRoute(new Route().withPath("vtsoxf").withPort(967528675)) - .withReadinessRoute(new Route().withPath("nxpmyyefrpmpdnq").withPort(663766748)) - .withScoringRoute(new Route().withPath("awaoqvmmbnpqfrt").withPort(1516123032))) - .withAutoRebuild(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE) - .withStage("nitgvkxlz")); - model = BinaryData.fromObject(model).toObject(EnvironmentVersionInner.class); - Assertions.assertEquals("gcealzxwh", model.properties().description()); - Assertions.assertEquals("symoyq", model.properties().tags().get("lwigdivbkbx")); - Assertions.assertEquals("hpqgatjeaahhvj", model.properties().properties().get("hnakzyb")); - Assertions.assertEquals(false, model.properties().isArchived()); - Assertions.assertEquals(false, model.properties().isAnonymous()); - Assertions.assertEquals("fhqlyvi", model.properties().image()); - Assertions.assertEquals("uwivkxoy", model.properties().condaFile()); - Assertions.assertEquals("nbixxrti", model.properties().build().contextUri()); - Assertions.assertEquals("cpwpg", model.properties().build().dockerfilePath()); - Assertions.assertEquals(OperatingSystemType.LINUX, model.properties().osType()); - Assertions.assertEquals("vtsoxf", model.properties().inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(967528675, model.properties().inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("nxpmyyefrpmpdnq", model.properties().inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(663766748, model.properties().inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("awaoqvmmbnpqfrt", model.properties().inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(1516123032, model.properties().inferenceConfig().scoringRoute().port()); - Assertions.assertEquals(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE, model.properties().autoRebuild()); - Assertions.assertEquals("nitgvkxlz", model.properties().stage()); - } - - // 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/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 43045b1138232..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionPropertiesTests.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.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( - "{\"environmentType\":\"UserCreated\",\"image\":\"jbnkpp\",\"condaFile\":\"nenlsvxeizzg\",\"build\":{\"contextUri\":\"lnsrmffe\",\"dockerfilePath\":\"xcktpiymerteeamm\"},\"osType\":\"Windows\",\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"kkzddrtkgdojbmx\",\"port\":37780018},\"readinessRoute\":{\"path\":\"refdee\",\"port\":2124341165},\"scoringRoute\":{\"path\":\"cuijpxt\",\"port\":214563643}},\"autoRebuild\":\"Disabled\",\"provisioningState\":\"Creating\",\"stage\":\"ujwsawddjibabxvi\",\"isArchived\":true,\"isAnonymous\":false,\"description\":\"eexavo\",\"tags\":{\"gsfjac\":\"glecdmdqbwpypq\",\"d\":\"slhhxudbxv\",\"ud\":\"tnsi\"},\"properties\":{\"kdlpa\":\"mes\"}}") - .toObject(EnvironmentVersionProperties.class); - Assertions.assertEquals("eexavo", model.description()); - Assertions.assertEquals("glecdmdqbwpypq", model.tags().get("gsfjac")); - Assertions.assertEquals("mes", model.properties().get("kdlpa")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals("jbnkpp", model.image()); - Assertions.assertEquals("nenlsvxeizzg", model.condaFile()); - Assertions.assertEquals("lnsrmffe", model.build().contextUri()); - Assertions.assertEquals("xcktpiymerteeamm", model.build().dockerfilePath()); - Assertions.assertEquals(OperatingSystemType.WINDOWS, model.osType()); - Assertions.assertEquals("kkzddrtkgdojbmx", model.inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(37780018, model.inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("refdee", model.inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(2124341165, model.inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("cuijpxt", model.inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(214563643, model.inferenceConfig().scoringRoute().port()); - Assertions.assertEquals(AutoRebuildSetting.DISABLED, model.autoRebuild()); - Assertions.assertEquals("ujwsawddjibabxvi", model.stage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentVersionProperties model = new EnvironmentVersionProperties().withDescription("eexavo") - .withTags(mapOf("gsfjac", "glecdmdqbwpypq", "d", "slhhxudbxv", "ud", "tnsi")) - .withProperties(mapOf("kdlpa", "mes")) - .withIsArchived(true) - .withIsAnonymous(false) - .withImage("jbnkpp") - .withCondaFile("nenlsvxeizzg") - .withBuild(new BuildContext().withContextUri("lnsrmffe").withDockerfilePath("xcktpiymerteeamm")) - .withOsType(OperatingSystemType.WINDOWS) - .withInferenceConfig(new InferenceContainerProperties() - .withLivenessRoute(new Route().withPath("kkzddrtkgdojbmx").withPort(37780018)) - .withReadinessRoute(new Route().withPath("refdee").withPort(2124341165)) - .withScoringRoute(new Route().withPath("cuijpxt").withPort(214563643))) - .withAutoRebuild(AutoRebuildSetting.DISABLED) - .withStage("ujwsawddjibabxvi"); - model = BinaryData.fromObject(model).toObject(EnvironmentVersionProperties.class); - Assertions.assertEquals("eexavo", model.description()); - Assertions.assertEquals("glecdmdqbwpypq", model.tags().get("gsfjac")); - Assertions.assertEquals("mes", model.properties().get("kdlpa")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals("jbnkpp", model.image()); - Assertions.assertEquals("nenlsvxeizzg", model.condaFile()); - Assertions.assertEquals("lnsrmffe", model.build().contextUri()); - Assertions.assertEquals("xcktpiymerteeamm", model.build().dockerfilePath()); - Assertions.assertEquals(OperatingSystemType.WINDOWS, model.osType()); - Assertions.assertEquals("kkzddrtkgdojbmx", model.inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(37780018, model.inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("refdee", model.inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(2124341165, model.inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("cuijpxt", model.inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(214563643, model.inferenceConfig().scoringRoute().port()); - Assertions.assertEquals(AutoRebuildSetting.DISABLED, model.autoRebuild()); - Assertions.assertEquals("ujwsawddjibabxvi", model.stage()); - } - - // 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/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 0434e39dbaa5e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code 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.EnvironmentVersionResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.InferenceContainerProperties; -import com.azure.resourcemanager.machinelearning.models.OperatingSystemType; -import com.azure.resourcemanager.machinelearning.models.Route; -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( - "{\"value\":[{\"properties\":{\"environmentType\":\"Curated\",\"image\":\"ncxykxhdjhlimm\",\"condaFile\":\"x\",\"build\":{\"contextUri\":\"bcporxvxcjzhqizx\",\"dockerfilePath\":\"xtgqscjavftjuh\"},\"osType\":\"Windows\",\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"mtggu\",\"port\":1404234385},\"readinessRoute\":{\"path\":\"jrajcivm\",\"port\":1977689221},\"scoringRoute\":{\"path\":\"f\",\"port\":2030059777}},\"autoRebuild\":\"OnBaseImageUpdate\",\"provisioningState\":\"Deleting\",\"stage\":\"kneuvyinzqo\",\"isArchived\":true,\"isAnonymous\":false,\"description\":\"hoxgsgbpf\",\"tags\":{\"lgafcqusrdve\":\"jtxvzflbqvgaq\",\"uzhyrmewipmvekdx\":\"nwsdtutnwlduyc\",\"zhhzjhfjmhvvmu\":\"kuqgsjjxundxgket\"},\"properties\":{\"qsxvmhf\":\"mun\",\"yue\":\"uzjyihsasbhudypo\"}},\"id\":\"lynsqyrpf\",\"name\":\"obrltt\",\"type\":\"msjnygqdnfw\"}],\"nextLink\":\"dzgtil\"}") - .toObject(EnvironmentVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("hoxgsgbpf", model.value().get(0).properties().description()); - Assertions.assertEquals("jtxvzflbqvgaq", model.value().get(0).properties().tags().get("lgafcqusrdve")); - Assertions.assertEquals("mun", model.value().get(0).properties().properties().get("qsxvmhf")); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(false, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals("ncxykxhdjhlimm", model.value().get(0).properties().image()); - Assertions.assertEquals("x", model.value().get(0).properties().condaFile()); - Assertions.assertEquals("bcporxvxcjzhqizx", model.value().get(0).properties().build().contextUri()); - Assertions.assertEquals("xtgqscjavftjuh", model.value().get(0).properties().build().dockerfilePath()); - Assertions.assertEquals(OperatingSystemType.WINDOWS, model.value().get(0).properties().osType()); - Assertions.assertEquals("mtggu", model.value().get(0).properties().inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(1404234385, model.value().get(0).properties().inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("jrajcivm", - model.value().get(0).properties().inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(1977689221, - model.value().get(0).properties().inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("f", model.value().get(0).properties().inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(2030059777, model.value().get(0).properties().inferenceConfig().scoringRoute().port()); - Assertions.assertEquals(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE, - model.value().get(0).properties().autoRebuild()); - Assertions.assertEquals("kneuvyinzqo", model.value().get(0).properties().stage()); - Assertions.assertEquals("dzgtil", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentVersionResourceArmPaginatedResult model = new EnvironmentVersionResourceArmPaginatedResult() - .withValue(Arrays.asList(new EnvironmentVersionInner().withProperties(new EnvironmentVersionProperties() - .withDescription("hoxgsgbpf") - .withTags(mapOf("lgafcqusrdve", "jtxvzflbqvgaq", "uzhyrmewipmvekdx", "nwsdtutnwlduyc", "zhhzjhfjmhvvmu", - "kuqgsjjxundxgket")) - .withProperties(mapOf("qsxvmhf", "mun", "yue", "uzjyihsasbhudypo")) - .withIsArchived(true) - .withIsAnonymous(false) - .withImage("ncxykxhdjhlimm") - .withCondaFile("x") - .withBuild(new BuildContext().withContextUri("bcporxvxcjzhqizx").withDockerfilePath("xtgqscjavftjuh")) - .withOsType(OperatingSystemType.WINDOWS) - .withInferenceConfig(new InferenceContainerProperties() - .withLivenessRoute(new Route().withPath("mtggu").withPort(1404234385)) - .withReadinessRoute(new Route().withPath("jrajcivm").withPort(1977689221)) - .withScoringRoute(new Route().withPath("f").withPort(2030059777))) - .withAutoRebuild(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE) - .withStage("kneuvyinzqo")))) - .withNextLink("dzgtil"); - model = BinaryData.fromObject(model).toObject(EnvironmentVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("hoxgsgbpf", model.value().get(0).properties().description()); - Assertions.assertEquals("jtxvzflbqvgaq", model.value().get(0).properties().tags().get("lgafcqusrdve")); - Assertions.assertEquals("mun", model.value().get(0).properties().properties().get("qsxvmhf")); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(false, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals("ncxykxhdjhlimm", model.value().get(0).properties().image()); - Assertions.assertEquals("x", model.value().get(0).properties().condaFile()); - Assertions.assertEquals("bcporxvxcjzhqizx", model.value().get(0).properties().build().contextUri()); - Assertions.assertEquals("xtgqscjavftjuh", model.value().get(0).properties().build().dockerfilePath()); - Assertions.assertEquals(OperatingSystemType.WINDOWS, model.value().get(0).properties().osType()); - Assertions.assertEquals("mtggu", model.value().get(0).properties().inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(1404234385, model.value().get(0).properties().inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("jrajcivm", - model.value().get(0).properties().inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(1977689221, - model.value().get(0).properties().inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("f", model.value().get(0).properties().inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(2030059777, model.value().get(0).properties().inferenceConfig().scoringRoute().port()); - Assertions.assertEquals(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE, - model.value().get(0).properties().autoRebuild()); - Assertions.assertEquals("kneuvyinzqo", model.value().get(0).properties().stage()); - Assertions.assertEquals("dzgtil", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 e73e506273cae..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsCreateOrUpdateWithResponseMockTests.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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -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 com.azure.resourcemanager.machinelearning.models.Route; -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 reactor.core.publisher.Mono; - -public final class EnvironmentVersionsCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"environmentType\":\"UserCreated\",\"image\":\"jgrepbrbmc\",\"condaFile\":\"vxjwpvqrexlui\",\"build\":{\"contextUri\":\"lqwbrfiovpdl\",\"dockerfilePath\":\"drfiwerlbcetrvir\"},\"osType\":\"Linux\",\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"wpvnloop\",\"port\":940990727},\"readinessRoute\":{\"path\":\"egchtabhacjlf\",\"port\":856600088},\"scoringRoute\":{\"path\":\"klvvwvpfqtpvzhml\",\"port\":474864730}},\"autoRebuild\":\"Disabled\",\"provisioningState\":\"Failed\",\"stage\":\"ffnsdmhawbx\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"hlewyroksayehf\",\"tags\":{\"tmdhbctk\":\"py\"},\"properties\":{\"hxope\":\"xzlphzujkqaxbe\",\"sykhdapxdiibjj\":\"el\",\"yhx\":\"uekhh\",\"ffajh\":\"uhhnrmmfzfkhfnz\"}},\"id\":\"bskgciedlqvpd\",\"name\":\"rlsmsrwlfgbu\",\"type\":\"gchjtpszcawf\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("lcbbu") - .withExistingEnvironment("vgjynuwcque", "anqdmmrodpgtblm", "blcbwvsqpea") - .withProperties(new EnvironmentVersionProperties().withDescription("oafdvxrlrsrfrxyl") - .withTags(mapOf("asnc", "pspipkpcvhqadj", "tkvoivcktjscjkex", "quixuqvat")) - .withProperties(mapOf("yunwmbfjjs", "yrcjgptxvz", "s", "eqvefnzvhmiwba", "ktytrivf", "fm")) - .withIsArchived(false) - .withIsAnonymous(true) - .withImage("girsfilxusyzcn") - .withCondaFile("vipeh") - .withBuild(new BuildContext().withContextUri("bburbxovgjipbnn").withDockerfilePath("sjxwjnw")) - .withOsType(OperatingSystemType.WINDOWS) - .withInferenceConfig(new InferenceContainerProperties() - .withLivenessRoute(new Route().withPath("hpyixibr").withPort(987704652)) - .withReadinessRoute(new Route().withPath("uzsojblyygftic").withPort(644261840)) - .withScoringRoute(new Route().withPath("rswqmteu").withPort(155856060))) - .withAutoRebuild(AutoRebuildSetting.DISABLED) - .withStage("otrbnvoe")) - .create(); - - Assertions.assertEquals("hlewyroksayehf", response.properties().description()); - Assertions.assertEquals("py", response.properties().tags().get("tmdhbctk")); - Assertions.assertEquals("xzlphzujkqaxbe", response.properties().properties().get("hxope")); - Assertions.assertEquals(true, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals("jgrepbrbmc", response.properties().image()); - Assertions.assertEquals("vxjwpvqrexlui", response.properties().condaFile()); - Assertions.assertEquals("lqwbrfiovpdl", response.properties().build().contextUri()); - Assertions.assertEquals("drfiwerlbcetrvir", response.properties().build().dockerfilePath()); - Assertions.assertEquals(OperatingSystemType.LINUX, response.properties().osType()); - Assertions.assertEquals("wpvnloop", response.properties().inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(940990727, response.properties().inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("egchtabhacjlf", response.properties().inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(856600088, response.properties().inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("klvvwvpfqtpvzhml", response.properties().inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(474864730, response.properties().inferenceConfig().scoringRoute().port()); - Assertions.assertEquals(AutoRebuildSetting.DISABLED, response.properties().autoRebuild()); - Assertions.assertEquals("ffnsdmhawbx", response.properties().stage()); - } - - // 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/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 e37cf57f79b70..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsDeleteWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class EnvironmentVersionsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("nypktgslkokqa", "gzcojgdq", "hzfec", "gpjnydkkgbvs", 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 ae84875411a37..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.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.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class EnvironmentVersionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"environmentType\":\"Curated\",\"image\":\"yrpwzsmwgebpsk\",\"condaFile\":\"cifdvtwuncn\",\"build\":{\"contextUri\":\"yjwjmyubhtmlgjai\",\"dockerfilePath\":\"ymjdwirglqibj\"},\"osType\":\"Linux\",\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"w\",\"port\":375117512},\"readinessRoute\":{\"path\":\"bzfhu\",\"port\":1172708430},\"scoringRoute\":{\"path\":\"k\",\"port\":777274816}},\"autoRebuild\":\"OnBaseImageUpdate\",\"provisioningState\":\"Failed\",\"stage\":\"xxiglehylbna\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"hoem\",\"tags\":{\"vfgukrxumwdqwy\":\"mmpvo\",\"umhaeqboig\":\"nawzeleqpnkqxk\",\"fhivsytidzvvndp\":\"jxatwxiya\",\"uexhgdhpkplas\":\"w\"},\"properties\":{\"oiddv\":\"tqxfpfopekyzdzvh\",\"sifixolvny\":\"qyjekvzpqr\",\"bpwpuayx\":\"fut\"}},\"id\":\"piultybwwmj\",\"name\":\"smkjalorxeegiczr\",\"type\":\"n\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("ks", "gkvga", "nrhrqqiwfysujcv", "clgp", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("hoem", response.properties().description()); - Assertions.assertEquals("mmpvo", response.properties().tags().get("vfgukrxumwdqwy")); - Assertions.assertEquals("tqxfpfopekyzdzvh", response.properties().properties().get("oiddv")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(false, response.properties().isAnonymous()); - Assertions.assertEquals("yrpwzsmwgebpsk", response.properties().image()); - Assertions.assertEquals("cifdvtwuncn", response.properties().condaFile()); - Assertions.assertEquals("yjwjmyubhtmlgjai", response.properties().build().contextUri()); - Assertions.assertEquals("ymjdwirglqibj", response.properties().build().dockerfilePath()); - Assertions.assertEquals(OperatingSystemType.LINUX, response.properties().osType()); - Assertions.assertEquals("w", response.properties().inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(375117512, response.properties().inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("bzfhu", response.properties().inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(1172708430, response.properties().inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("k", response.properties().inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(777274816, response.properties().inferenceConfig().scoringRoute().port()); - Assertions.assertEquals(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE, response.properties().autoRebuild()); - Assertions.assertEquals("xxiglehylbna", response.properties().stage()); - } -} 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 cf8dc11105fd6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsListMockTests.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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.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.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class EnvironmentVersionsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"environmentType\":\"UserCreated\",\"image\":\"aljomgzorprrap\",\"condaFile\":\"bjenylgebrsnvof\",\"build\":{\"contextUri\":\"zvbploazc\",\"dockerfilePath\":\"hgermm\"},\"osType\":\"Linux\",\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"uipsoawxugpu\",\"port\":1995117934},\"readinessRoute\":{\"path\":\"kwxzmuzg\",\"port\":1007623800},\"scoringRoute\":{\"path\":\"ygpbhauhej\",\"port\":803038260}},\"autoRebuild\":\"Disabled\",\"provisioningState\":\"Deleting\",\"stage\":\"xxzxwrnqwdjvlw\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"wsfxqc\",\"tags\":{\"cbciu\":\"ez\",\"jguzsyfwamhmeo\":\"gakmxgwwmavllp\",\"nzcufysalbjfkje\":\"xbzagwnompvyis\"},\"properties\":{\"ridipw\":\"zmh\",\"jqhjenbdupfp\":\"zjnnmpi\",\"rsfghyye\":\"losadjffl\"}},\"id\":\"adzu\",\"name\":\"dcccls\",\"type\":\"flcxxp\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("iyapifcjl", "ugnrzowc", "r", "afqsozawqxnhlv", 633579364, "ugwxdwtfmfjk", ListViewType.ACTIVE_ONLY, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("wsfxqc", response.iterator().next().properties().description()); - Assertions.assertEquals("ez", response.iterator().next().properties().tags().get("cbciu")); - Assertions.assertEquals("zmh", response.iterator().next().properties().properties().get("ridipw")); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); - Assertions.assertEquals(false, response.iterator().next().properties().isAnonymous()); - Assertions.assertEquals("aljomgzorprrap", response.iterator().next().properties().image()); - Assertions.assertEquals("bjenylgebrsnvof", response.iterator().next().properties().condaFile()); - Assertions.assertEquals("zvbploazc", response.iterator().next().properties().build().contextUri()); - Assertions.assertEquals("hgermm", response.iterator().next().properties().build().dockerfilePath()); - Assertions.assertEquals(OperatingSystemType.LINUX, response.iterator().next().properties().osType()); - Assertions.assertEquals("uipsoawxugpu", - response.iterator().next().properties().inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(1995117934, - response.iterator().next().properties().inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("kwxzmuzg", - response.iterator().next().properties().inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(1007623800, - response.iterator().next().properties().inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("ygpbhauhej", - response.iterator().next().properties().inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(803038260, - response.iterator().next().properties().inferenceConfig().scoringRoute().port()); - Assertions.assertEquals(AutoRebuildSetting.DISABLED, response.iterator().next().properties().autoRebuild()); - Assertions.assertEquals("xxzxwrnqwdjvlw", response.iterator().next().properties().stage()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsPublishMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsPublishMockTests.java deleted file mode 100644 index 9289a518c7848..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsPublishMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class EnvironmentVersionsPublishMockTests { - @Test - public void testPublish() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.environmentVersions() - .publish("zlcvndihkph", "zgkkucwmjmgsw", "w", "skuqgneorqtr", - new DestinationAsset().withRegistryName("eikqvaagnzbkqq") - .withDestinationName("cd") - .withDestinationVersion("csom"), - com.azure.core.util.Context.NONE); - - } -} 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 effb318ba1793..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EstimatedVMPriceTests.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.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\":17.81756965941649,\"osType\":\"Windows\",\"vmTier\":\"Standard\"}") - .toObject(EstimatedVMPrice.class); - Assertions.assertEquals(17.81756965941649, model.retailPrice()); - Assertions.assertEquals(VMPriceOSType.WINDOWS, model.osType()); - Assertions.assertEquals(VMTier.STANDARD, model.vmTier()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EstimatedVMPrice model = new EstimatedVMPrice().withRetailPrice(17.81756965941649) - .withOsType(VMPriceOSType.WINDOWS) - .withVmTier(VMTier.STANDARD); - model = BinaryData.fromObject(model).toObject(EstimatedVMPrice.class); - Assertions.assertEquals(17.81756965941649, model.retailPrice()); - Assertions.assertEquals(VMPriceOSType.WINDOWS, model.osType()); - Assertions.assertEquals(VMTier.STANDARD, 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 0211ec8825d02..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EstimatedVMPricesTests.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.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\":51.60313899930067,\"osType\":\"Linux\",\"vmTier\":\"Spot\"},{\"retailPrice\":9.272665097148082,\"osType\":\"Windows\",\"vmTier\":\"LowPriority\"},{\"retailPrice\":45.65930032967857,\"osType\":\"Linux\",\"vmTier\":\"Spot\"},{\"retailPrice\":12.242522151631585,\"osType\":\"Linux\",\"vmTier\":\"LowPriority\"}]}") - .toObject(EstimatedVMPrices.class); - Assertions.assertEquals(BillingCurrency.USD, model.billingCurrency()); - Assertions.assertEquals(UnitOfMeasure.ONE_HOUR, model.unitOfMeasure()); - Assertions.assertEquals(51.60313899930067, model.values().get(0).retailPrice()); - Assertions.assertEquals(VMPriceOSType.LINUX, model.values().get(0).osType()); - Assertions.assertEquals(VMTier.SPOT, 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(51.60313899930067) - .withOsType(VMPriceOSType.LINUX) - .withVmTier(VMTier.SPOT), - new EstimatedVMPrice().withRetailPrice(9.272665097148082) - .withOsType(VMPriceOSType.WINDOWS) - .withVmTier(VMTier.LOW_PRIORITY), - new EstimatedVMPrice().withRetailPrice(45.65930032967857) - .withOsType(VMPriceOSType.LINUX) - .withVmTier(VMTier.SPOT), - new EstimatedVMPrice().withRetailPrice(12.242522151631585) - .withOsType(VMPriceOSType.LINUX) - .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(51.60313899930067, model.values().get(0).retailPrice()); - Assertions.assertEquals(VMPriceOSType.LINUX, model.values().get(0).osType()); - Assertions.assertEquals(VMTier.SPOT, 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 a46a5b94f31f0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ExternalFqdnResponseInnerTests.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.ExternalFqdnResponseInner; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpoint; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpointDetail; -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\":\"knso\",\"endpoints\":[{\"domainName\":\"xbldtlwwrlkdmtn\",\"endpointDetails\":[{}]},{\"domainName\":\"otllxdyhgsyo\",\"endpointDetails\":[{},{},{},{}]}]}},{\"properties\":{\"category\":\"tdtbnnhadooc\",\"endpoints\":[{\"domainName\":\"ikhnvpamqgxqq\",\"endpointDetails\":[{},{}]},{\"domainName\":\"kywggxkallatmel\",\"endpointDetails\":[{},{}]},{\"domainName\":\"iccjzkzivgvvcna\",\"endpointDetails\":[{},{}]},{\"domainName\":\"rnxxmueed\",\"endpointDetails\":[{},{},{}]}]}}]}") - .toObject(ExternalFqdnResponseInner.class); - Assertions.assertEquals("knso", model.value().get(0).properties().category()); - Assertions.assertEquals("xbldtlwwrlkdmtn", model.value().get(0).properties().endpoints().get(0).domainName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExternalFqdnResponseInner model - = new ExternalFqdnResponseInner() - .withValue( - Arrays.asList(new FqdnEndpoints().withProperties(new FqdnEndpointsProperties().withCategory("knso") - .withEndpoints(Arrays.asList( - new FqdnEndpoint().withDomainName("xbldtlwwrlkdmtn") - .withEndpointDetails(Arrays.asList(new FqdnEndpointDetail())), - new FqdnEndpoint().withDomainName("otllxdyhgsyo") - .withEndpointDetails(Arrays.asList(new FqdnEndpointDetail(), new FqdnEndpointDetail(), - new FqdnEndpointDetail(), new FqdnEndpointDetail()))))), - new FqdnEndpoints() - .withProperties( - new FqdnEndpointsProperties().withCategory("tdtbnnhadooc") - .withEndpoints( - Arrays - .asList( - new FqdnEndpoint().withDomainName("ikhnvpamqgxqq") - .withEndpointDetails(Arrays.asList(new FqdnEndpointDetail(), - new FqdnEndpointDetail())), - new FqdnEndpoint().withDomainName("kywggxkallatmel") - .withEndpointDetails(Arrays.asList(new FqdnEndpointDetail(), - new FqdnEndpointDetail())), - new FqdnEndpoint().withDomainName("iccjzkzivgvvcna") - .withEndpointDetails(Arrays.asList(new FqdnEndpointDetail(), - new FqdnEndpointDetail())), - new FqdnEndpoint().withDomainName("rnxxmueed") - .withEndpointDetails(Arrays.asList(new FqdnEndpointDetail(), - new FqdnEndpointDetail(), new FqdnEndpointDetail()))))))); - model = BinaryData.fromObject(model).toObject(ExternalFqdnResponseInner.class); - Assertions.assertEquals("knso", model.value().get(0).properties().category()); - Assertions.assertEquals("xbldtlwwrlkdmtn", model.value().get(0).properties().endpoints().get(0).domainName()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureAttributionDriftMonitoringSignalTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureAttributionDriftMonitoringSignalTests.java deleted file mode 100644 index 06c7ce622f677..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureAttributionDriftMonitoringSignalTests.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FeatureAttributionDriftMonitoringSignal; -import com.azure.resourcemanager.machinelearning.models.FeatureAttributionMetric; -import com.azure.resourcemanager.machinelearning.models.FeatureAttributionMetricThreshold; -import com.azure.resourcemanager.machinelearning.models.FeatureImportanceMode; -import com.azure.resourcemanager.machinelearning.models.FeatureImportanceSettings; -import com.azure.resourcemanager.machinelearning.models.JobInputType; -import com.azure.resourcemanager.machinelearning.models.MonitoringFeatureDataType; -import com.azure.resourcemanager.machinelearning.models.MonitoringInputDataBase; -import com.azure.resourcemanager.machinelearning.models.MonitoringNotificationType; -import com.azure.resourcemanager.machinelearning.models.MonitoringThreshold; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FeatureAttributionDriftMonitoringSignalTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeatureAttributionDriftMonitoringSignal model = BinaryData.fromString( - "{\"signalType\":\"FeatureAttributionDrift\",\"metricThreshold\":{\"threshold\":{\"value\":39.98706908901154},\"metric\":\"NormalizedDiscountedCumulativeGain\"},\"featureImportanceSettings\":{\"mode\":\"Disabled\",\"targetColumn\":\"snstl\"},\"productionData\":[{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"pjnx\",\"jobInputType\":\"uri_file\",\"uri\":\"htupsvyouweuiy\",\"columns\":{\"sf\":\"kzts\",\"ztadopgfz\":\"evyllznfhkqyt\",\"gqkzjuqw\":\"gjfcycrsvloyyh\",\"nfdbgsoscienezf\":\"ajquzxpixhyoi\"}},{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"ennmf\",\"jobInputType\":\"mltable\",\"uri\":\"pjnrtekwwnthro\",\"columns\":{\"yiurztvktjh\":\"ud\",\"hpuzxkpye\":\"fecqkoqyouerga\",\"zfz\":\"hfdyldhgye\",\"tdereunokakzw\":\"iyuq\"}},{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"jlwyxedzn\",\"jobInputType\":\"custom_model\",\"uri\":\"rfo\",\"columns\":{\"xfjjtpdyzout\":\"ewvmyifo\",\"gvad\":\"fptofhgnuywez\",\"pytpmpvdnogehlu\":\"aaqwvkg\",\"rtbnu\":\"b\"}},{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"faxzsvbxxyjissk\",\"jobInputType\":\"mlflow_model\",\"uri\":\"qocl\",\"columns\":{\"sqeq\":\"oewyhxessmvrkd\",\"esbrujbjpppktl\":\"bdxmd\",\"at\":\"dibfmthi\"}}],\"referenceData\":{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"jrnm\",\"jobInputType\":\"triton_model\",\"uri\":\"zqpl\",\"columns\":{\"nikzs\":\"ih\",\"gkensckhbmcarmo\":\"zfffjilzfbpnt\"}},\"featureDataTypeOverride\":{\"kwykuqdndxl\":\"Numerical\",\"h\":\"Numerical\",\"gapvdgtfpeerscdx\":\"Numerical\"},\"notificationTypes\":[\"AmlNotification\"],\"properties\":{\"fmbgacn\":\"c\",\"cmspsanmameubkqi\":\"gfdt\",\"hlq\":\"mlf\",\"uugkw\":\"skkqjmxptuei\"}}") - .toObject(FeatureAttributionDriftMonitoringSignal.class); - Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, model.notificationTypes().get(0)); - Assertions.assertEquals("c", model.properties().get("fmbgacn")); - Assertions.assertEquals(39.98706908901154D, model.metricThreshold().threshold().value()); - Assertions.assertEquals(FeatureAttributionMetric.NORMALIZED_DISCOUNTED_CUMULATIVE_GAIN, - model.metricThreshold().metric()); - Assertions.assertEquals(FeatureImportanceMode.DISABLED, model.featureImportanceSettings().mode()); - Assertions.assertEquals("snstl", model.featureImportanceSettings().targetColumn()); - Assertions.assertEquals("pjnx", model.productionData().get(0).dataContext()); - Assertions.assertEquals(JobInputType.URI_FILE, model.productionData().get(0).jobInputType()); - Assertions.assertEquals("htupsvyouweuiy", model.productionData().get(0).uri()); - Assertions.assertEquals("kzts", model.productionData().get(0).columns().get("sf")); - Assertions.assertEquals("jrnm", model.referenceData().dataContext()); - Assertions.assertEquals(JobInputType.TRITON_MODEL, model.referenceData().jobInputType()); - Assertions.assertEquals("zqpl", model.referenceData().uri()); - Assertions.assertEquals("ih", model.referenceData().columns().get("nikzs")); - Assertions.assertEquals(MonitoringFeatureDataType.NUMERICAL, - model.featureDataTypeOverride().get("kwykuqdndxl")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeatureAttributionDriftMonitoringSignal model = new FeatureAttributionDriftMonitoringSignal() - .withNotificationTypes(Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION)) - .withProperties(mapOf("fmbgacn", "c", "cmspsanmameubkqi", "gfdt", "hlq", "mlf", "uugkw", "skkqjmxptuei")) - .withMetricThreshold(new FeatureAttributionMetricThreshold() - .withThreshold(new MonitoringThreshold().withValue(39.98706908901154D)) - .withMetric(FeatureAttributionMetric.NORMALIZED_DISCOUNTED_CUMULATIVE_GAIN)) - .withFeatureImportanceSettings( - new FeatureImportanceSettings().withMode(FeatureImportanceMode.DISABLED).withTargetColumn("snstl")) - .withProductionData(Arrays.asList( - new MonitoringInputDataBase().withDataContext("pjnx") - .withJobInputType(JobInputType.URI_FILE) - .withUri("htupsvyouweuiy") - .withColumns(mapOf("sf", "kzts", "ztadopgfz", "evyllznfhkqyt", "gqkzjuqw", "gjfcycrsvloyyh", - "nfdbgsoscienezf", "ajquzxpixhyoi")), - new MonitoringInputDataBase().withDataContext("ennmf") - .withJobInputType(JobInputType.MLTABLE) - .withUri("pjnrtekwwnthro") - .withColumns(mapOf("yiurztvktjh", "ud", "hpuzxkpye", "fecqkoqyouerga", "zfz", "hfdyldhgye", - "tdereunokakzw", "iyuq")), - new MonitoringInputDataBase().withDataContext("jlwyxedzn") - .withJobInputType(JobInputType.CUSTOM_MODEL) - .withUri("rfo") - .withColumns(mapOf("xfjjtpdyzout", "ewvmyifo", "gvad", "fptofhgnuywez", "pytpmpvdnogehlu", - "aaqwvkg", "rtbnu", "b")), - new MonitoringInputDataBase().withDataContext("faxzsvbxxyjissk") - .withJobInputType(JobInputType.MLFLOW_MODEL) - .withUri("qocl") - .withColumns(mapOf("sqeq", "oewyhxessmvrkd", "esbrujbjpppktl", "bdxmd", "at", "dibfmthi")))) - .withReferenceData(new MonitoringInputDataBase().withDataContext("jrnm") - .withJobInputType(JobInputType.TRITON_MODEL) - .withUri("zqpl") - .withColumns(mapOf("nikzs", "ih", "gkensckhbmcarmo", "zfffjilzfbpnt"))) - .withFeatureDataTypeOverride(mapOf("kwykuqdndxl", MonitoringFeatureDataType.NUMERICAL, "h", - MonitoringFeatureDataType.NUMERICAL, "gapvdgtfpeerscdx", MonitoringFeatureDataType.NUMERICAL)); - model = BinaryData.fromObject(model).toObject(FeatureAttributionDriftMonitoringSignal.class); - Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, model.notificationTypes().get(0)); - Assertions.assertEquals("c", model.properties().get("fmbgacn")); - Assertions.assertEquals(39.98706908901154D, model.metricThreshold().threshold().value()); - Assertions.assertEquals(FeatureAttributionMetric.NORMALIZED_DISCOUNTED_CUMULATIVE_GAIN, - model.metricThreshold().metric()); - Assertions.assertEquals(FeatureImportanceMode.DISABLED, model.featureImportanceSettings().mode()); - Assertions.assertEquals("snstl", model.featureImportanceSettings().targetColumn()); - Assertions.assertEquals("pjnx", model.productionData().get(0).dataContext()); - Assertions.assertEquals(JobInputType.URI_FILE, model.productionData().get(0).jobInputType()); - Assertions.assertEquals("htupsvyouweuiy", model.productionData().get(0).uri()); - Assertions.assertEquals("kzts", model.productionData().get(0).columns().get("sf")); - Assertions.assertEquals("jrnm", model.referenceData().dataContext()); - Assertions.assertEquals(JobInputType.TRITON_MODEL, model.referenceData().jobInputType()); - Assertions.assertEquals("zqpl", model.referenceData().uri()); - Assertions.assertEquals("ih", model.referenceData().columns().get("nikzs")); - Assertions.assertEquals(MonitoringFeatureDataType.NUMERICAL, - model.featureDataTypeOverride().get("kwykuqdndxl")); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureAttributionMetricThresholdTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureAttributionMetricThresholdTests.java deleted file mode 100644 index eb8f10218a122..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureAttributionMetricThresholdTests.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.FeatureAttributionMetric; -import com.azure.resourcemanager.machinelearning.models.FeatureAttributionMetricThreshold; -import com.azure.resourcemanager.machinelearning.models.MonitoringThreshold; -import org.junit.jupiter.api.Assertions; - -public final class FeatureAttributionMetricThresholdTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeatureAttributionMetricThreshold model = BinaryData - .fromString( - "{\"threshold\":{\"value\":57.97533067862126},\"metric\":\"NormalizedDiscountedCumulativeGain\"}") - .toObject(FeatureAttributionMetricThreshold.class); - Assertions.assertEquals(57.97533067862126D, model.threshold().value()); - Assertions.assertEquals(FeatureAttributionMetric.NORMALIZED_DISCOUNTED_CUMULATIVE_GAIN, model.metric()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeatureAttributionMetricThreshold model = new FeatureAttributionMetricThreshold() - .withThreshold(new MonitoringThreshold().withValue(57.97533067862126D)) - .withMetric(FeatureAttributionMetric.NORMALIZED_DISCOUNTED_CUMULATIVE_GAIN); - model = BinaryData.fromObject(model).toObject(FeatureAttributionMetricThreshold.class); - Assertions.assertEquals(57.97533067862126D, model.threshold().value()); - Assertions.assertEquals(FeatureAttributionMetric.NORMALIZED_DISCOUNTED_CUMULATIVE_GAIN, model.metric()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureImportanceSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureImportanceSettingsTests.java deleted file mode 100644 index 2f094382acb5e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureImportanceSettingsTests.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.FeatureImportanceMode; -import com.azure.resourcemanager.machinelearning.models.FeatureImportanceSettings; -import org.junit.jupiter.api.Assertions; - -public final class FeatureImportanceSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeatureImportanceSettings model - = BinaryData.fromString("{\"mode\":\"Enabled\",\"targetColumn\":\"udhuaorhjk\"}") - .toObject(FeatureImportanceSettings.class); - Assertions.assertEquals(FeatureImportanceMode.ENABLED, model.mode()); - Assertions.assertEquals("udhuaorhjk", model.targetColumn()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeatureImportanceSettings model - = new FeatureImportanceSettings().withMode(FeatureImportanceMode.ENABLED).withTargetColumn("udhuaorhjk"); - model = BinaryData.fromObject(model).toObject(FeatureImportanceSettings.class); - Assertions.assertEquals(FeatureImportanceMode.ENABLED, model.mode()); - Assertions.assertEquals("udhuaorhjk", model.targetColumn()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureInnerTests.java deleted file mode 100644 index 73b59adbbd60d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureInnerTests.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.fluent.models.FeatureInner; -import com.azure.resourcemanager.machinelearning.models.FeatureDataType; -import com.azure.resourcemanager.machinelearning.models.FeatureProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FeatureInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeatureInner model = BinaryData.fromString( - "{\"properties\":{\"featureName\":\"itacgxmfcsserx\",\"dataType\":\"String\",\"description\":\"oxhlw\",\"tags\":{\"qrsxyp\":\"j\",\"yuel\":\"uuuybnchrsziz\",\"nlgmtrwahzjmu\":\"etndnbfqyggagf\"},\"properties\":{\"fusuckzmkwklsno\":\"byrplrohkpig\"}},\"id\":\"xmqeqalh\",\"name\":\"jnhgwydyyn\",\"type\":\"svkhgbv\"}") - .toObject(FeatureInner.class); - Assertions.assertEquals("oxhlw", model.properties().description()); - Assertions.assertEquals("j", model.properties().tags().get("qrsxyp")); - Assertions.assertEquals("byrplrohkpig", model.properties().properties().get("fusuckzmkwklsno")); - Assertions.assertEquals("itacgxmfcsserx", model.properties().featureName()); - Assertions.assertEquals(FeatureDataType.STRING, model.properties().dataType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeatureInner model = new FeatureInner().withProperties(new FeatureProperties().withDescription("oxhlw") - .withTags(mapOf("qrsxyp", "j", "yuel", "uuuybnchrsziz", "nlgmtrwahzjmu", "etndnbfqyggagf")) - .withProperties(mapOf("fusuckzmkwklsno", "byrplrohkpig")) - .withFeatureName("itacgxmfcsserx") - .withDataType(FeatureDataType.STRING)); - model = BinaryData.fromObject(model).toObject(FeatureInner.class); - Assertions.assertEquals("oxhlw", model.properties().description()); - Assertions.assertEquals("j", model.properties().tags().get("qrsxyp")); - Assertions.assertEquals("byrplrohkpig", model.properties().properties().get("fusuckzmkwklsno")); - Assertions.assertEquals("itacgxmfcsserx", model.properties().featureName()); - Assertions.assertEquals(FeatureDataType.STRING, model.properties().dataType()); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturePropertiesTests.java deleted file mode 100644 index e3724ab33108f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturePropertiesTests.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.FeatureDataType; -import com.azure.resourcemanager.machinelearning.models.FeatureProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FeaturePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeatureProperties model = BinaryData.fromString( - "{\"featureName\":\"anarfdlpukhpyrne\",\"dataType\":\"Binary\",\"description\":\"pe\",\"tags\":{\"dbhfhp\":\"hnmgbroux\",\"zoyw\":\"paz\",\"htuevrhrljy\":\"xhpdulontacnpqwt\"},\"properties\":{\"duugwbsre\":\"wxhn\",\"nlvhhtklnvnafvv\":\"rfqkfuar\",\"lcqxypokk\":\"yfedevjbo\",\"zng\":\"minqcym\"}}") - .toObject(FeatureProperties.class); - Assertions.assertEquals("pe", model.description()); - Assertions.assertEquals("hnmgbroux", model.tags().get("dbhfhp")); - Assertions.assertEquals("wxhn", model.properties().get("duugwbsre")); - Assertions.assertEquals("anarfdlpukhpyrne", model.featureName()); - Assertions.assertEquals(FeatureDataType.BINARY, model.dataType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeatureProperties model = new FeatureProperties().withDescription("pe") - .withTags(mapOf("dbhfhp", "hnmgbroux", "zoyw", "paz", "htuevrhrljy", "xhpdulontacnpqwt")) - .withProperties( - mapOf("duugwbsre", "wxhn", "nlvhhtklnvnafvv", "rfqkfuar", "lcqxypokk", "yfedevjbo", "zng", "minqcym")) - .withFeatureName("anarfdlpukhpyrne") - .withDataType(FeatureDataType.BINARY); - model = BinaryData.fromObject(model).toObject(FeatureProperties.class); - Assertions.assertEquals("pe", model.description()); - Assertions.assertEquals("hnmgbroux", model.tags().get("dbhfhp")); - Assertions.assertEquals("wxhn", model.properties().get("duugwbsre")); - Assertions.assertEquals("anarfdlpukhpyrne", model.featureName()); - Assertions.assertEquals(FeatureDataType.BINARY, model.dataType()); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureResourceArmPaginatedResultTests.java deleted file mode 100644 index 4c65883d342ef..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureResourceArmPaginatedResultTests.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.fluent.models.FeatureInner; -import com.azure.resourcemanager.machinelearning.models.FeatureDataType; -import com.azure.resourcemanager.machinelearning.models.FeatureProperties; -import com.azure.resourcemanager.machinelearning.models.FeatureResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FeatureResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeatureResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"featureName\":\"zonwpngajinnixj\",\"dataType\":\"Long\",\"description\":\"mjfjmyccxlzhcox\",\"tags\":{\"sfnrdtjxt\":\"ekhenl\",\"cq\":\"r\",\"uslvyjtcvuwkasi\":\"jvidttge\",\"tuqfecjxeygtu\":\"iesfuug\"},\"properties\":{\"uewmrswnjlxuzrhw\":\"ic\",\"dohzjq\":\"usxjbaqehg\",\"o\":\"tu\"}},\"id\":\"e\",\"name\":\"xncnwfe\",\"type\":\"bnwgfmxj\"},{\"properties\":{\"featureName\":\"g\",\"dataType\":\"Binary\",\"description\":\"dlfgtdysnaq\",\"tags\":{\"zjrwdkqze\":\"qbctqha\",\"fza\":\"yjleziunjx\",\"eg\":\"tkw\",\"uooqjagmdit\":\"amlbnseqacjjvpil\"},\"properties\":{\"tdtpdelqacslmo\":\"iookjbsah\",\"xofvcjk\":\"oebn\",\"xejw\":\"dirazf\"}},\"id\":\"mdujtmvcopexcm\",\"name\":\"urbuhhlkyqltq\",\"type\":\"rogtuwkf\"},{\"properties\":{\"featureName\":\"jk\",\"dataType\":\"Double\",\"description\":\"idfv\",\"tags\":{\"ikayiansharuj\":\"lxnfuijtkbusqogs\"},\"properties\":{\"qhjpenuygbqe\":\"qxfzyjqttvwk\"}},\"id\":\"ekewvnqvcdlguauc\",\"name\":\"f\",\"type\":\"jwnlax\"}],\"nextLink\":\"njqikcz\"}") - .toObject(FeatureResourceArmPaginatedResult.class); - Assertions.assertEquals("mjfjmyccxlzhcox", model.value().get(0).properties().description()); - Assertions.assertEquals("ekhenl", model.value().get(0).properties().tags().get("sfnrdtjxt")); - Assertions.assertEquals("ic", model.value().get(0).properties().properties().get("uewmrswnjlxuzrhw")); - Assertions.assertEquals("zonwpngajinnixj", model.value().get(0).properties().featureName()); - Assertions.assertEquals(FeatureDataType.LONG, model.value().get(0).properties().dataType()); - Assertions.assertEquals("njqikcz", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeatureResourceArmPaginatedResult model - = new FeatureResourceArmPaginatedResult().withValue(Arrays.asList( - new FeatureInner().withProperties(new FeatureProperties() - .withDescription("mjfjmyccxlzhcox") - .withTags(mapOf("sfnrdtjxt", "ekhenl", "cq", "r", "uslvyjtcvuwkasi", "jvidttge", "tuqfecjxeygtu", - "iesfuug")) - .withProperties(mapOf("uewmrswnjlxuzrhw", "ic", "dohzjq", "usxjbaqehg", "o", "tu")) - .withFeatureName("zonwpngajinnixj") - .withDataType(FeatureDataType.LONG)), - new FeatureInner().withProperties(new FeatureProperties().withDescription("dlfgtdysnaq") - .withTags(mapOf("zjrwdkqze", "qbctqha", "fza", "yjleziunjx", "eg", "tkw", "uooqjagmdit", - "amlbnseqacjjvpil")) - .withProperties(mapOf("tdtpdelqacslmo", "iookjbsah", "xofvcjk", "oebn", "xejw", "dirazf")) - .withFeatureName("g") - .withDataType(FeatureDataType.BINARY)), - new FeatureInner().withProperties(new FeatureProperties().withDescription("idfv") - .withTags(mapOf("ikayiansharuj", "lxnfuijtkbusqogs")) - .withProperties(mapOf("qhjpenuygbqe", "qxfzyjqttvwk")) - .withFeatureName("jk") - .withDataType(FeatureDataType.DOUBLE)))) - .withNextLink("njqikcz"); - model = BinaryData.fromObject(model).toObject(FeatureResourceArmPaginatedResult.class); - Assertions.assertEquals("mjfjmyccxlzhcox", model.value().get(0).properties().description()); - Assertions.assertEquals("ekhenl", model.value().get(0).properties().tags().get("sfnrdtjxt")); - Assertions.assertEquals("ic", model.value().get(0).properties().properties().get("uewmrswnjlxuzrhw")); - Assertions.assertEquals("zonwpngajinnixj", model.value().get(0).properties().featureName()); - Assertions.assertEquals(FeatureDataType.LONG, model.value().get(0).properties().dataType()); - Assertions.assertEquals("njqikcz", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureStoreSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureStoreSettingsTests.java deleted file mode 100644 index f802cd4499cb5..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureStoreSettingsTests.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.ComputeRuntimeDto; -import com.azure.resourcemanager.machinelearning.models.FeatureStoreSettings; -import org.junit.jupiter.api.Assertions; - -public final class FeatureStoreSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeatureStoreSettings model = BinaryData.fromString( - "{\"computeRuntime\":{\"sparkRuntimeVersion\":\"qsrxybzqqed\"},\"offlineStoreConnectionName\":\"tbciqfouflmm\",\"onlineStoreConnectionName\":\"zsm\"}") - .toObject(FeatureStoreSettings.class); - Assertions.assertEquals("qsrxybzqqed", model.computeRuntime().sparkRuntimeVersion()); - Assertions.assertEquals("tbciqfouflmm", model.offlineStoreConnectionName()); - Assertions.assertEquals("zsm", model.onlineStoreConnectionName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeatureStoreSettings model = new FeatureStoreSettings() - .withComputeRuntime(new ComputeRuntimeDto().withSparkRuntimeVersion("qsrxybzqqed")) - .withOfflineStoreConnectionName("tbciqfouflmm") - .withOnlineStoreConnectionName("zsm"); - model = BinaryData.fromObject(model).toObject(FeatureStoreSettings.class); - Assertions.assertEquals("qsrxybzqqed", model.computeRuntime().sparkRuntimeVersion()); - Assertions.assertEquals("tbciqfouflmm", model.offlineStoreConnectionName()); - Assertions.assertEquals("zsm", model.onlineStoreConnectionName()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureSubsetTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureSubsetTests.java deleted file mode 100644 index 5bb094f67de4f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureSubsetTests.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.FeatureSubset; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class FeatureSubsetTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeatureSubset model = BinaryData - .fromString( - "{\"filterType\":\"FeatureSubset\",\"features\":[\"huuonjkkxukg\",\"e\",\"vvpxjoeg\",\"jojlle\"]}") - .toObject(FeatureSubset.class); - Assertions.assertEquals("huuonjkkxukg", model.features().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeatureSubset model - = new FeatureSubset().withFeatures(Arrays.asList("huuonjkkxukg", "e", "vvpxjoeg", "jojlle")); - model = BinaryData.fromObject(model).toObject(FeatureSubset.class); - Assertions.assertEquals("huuonjkkxukg", model.features().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureWindowTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureWindowTests.java deleted file mode 100644 index 5de019d54fb90..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeatureWindowTests.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.FeatureWindow; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class FeatureWindowTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeatureWindow model = BinaryData - .fromString("{\"featureWindowStart\":\"2021-05-01T05:25:27Z\",\"featureWindowEnd\":\"2021-05-01T01:36Z\"}") - .toObject(FeatureWindow.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-01T05:25:27Z"), model.featureWindowStart()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-01T01:36Z"), model.featureWindowEnd()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeatureWindow model = new FeatureWindow().withFeatureWindowStart(OffsetDateTime.parse("2021-05-01T05:25:27Z")) - .withFeatureWindowEnd(OffsetDateTime.parse("2021-05-01T01:36Z")); - model = BinaryData.fromObject(model).toObject(FeatureWindow.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-01T05:25:27Z"), model.featureWindowStart()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-01T01:36Z"), model.featureWindowEnd()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesGetWithResponseMockTests.java deleted file mode 100644 index 998857fe32398..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.Feature; -import com.azure.resourcemanager.machinelearning.models.FeatureDataType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FeaturesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"featureName\":\"lcldoyohu\",\"dataType\":\"Long\",\"description\":\"lop\",\"tags\":{\"wfrgdmbgbht\":\"sylwsmdo\"},\"properties\":{\"lgrrsk\":\"iustkqywab\",\"dxgdjudek\":\"tzbkeeohpf\",\"zmehcdfdxthqnz\":\"xh\",\"ueweivaje\":\"ukirdedijdhzkw\"}},\"id\":\"wlxdknxctglzbcxd\",\"name\":\"sgw\",\"type\":\"gyiw\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Feature response = manager.features() - .getWithResponse("bizxq", "dmhzbcujdzl", "yermjemny", "hoqpbfjfcbweabpt", "mkuquvcgvn", - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("lop", response.properties().description()); - Assertions.assertEquals("sylwsmdo", response.properties().tags().get("wfrgdmbgbht")); - Assertions.assertEquals("iustkqywab", response.properties().properties().get("lgrrsk")); - Assertions.assertEquals("lcldoyohu", response.properties().featureName()); - Assertions.assertEquals(FeatureDataType.LONG, response.properties().dataType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesListMockTests.java deleted file mode 100644 index 53f749a5d473e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.Feature; -import com.azure.resourcemanager.machinelearning.models.FeatureDataType; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FeaturesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"featureName\":\"bqrqbpiqfstkdlyj\",\"dataType\":\"Float\",\"description\":\"ef\",\"tags\":{\"kz\":\"kf\",\"xnnitrugotf\":\"chrkiwpadnhf\",\"exbrvbdyriyray\":\"dlfe\",\"cl\":\"igksni\"},\"properties\":{\"xeigyddp\":\"rezqx\"}},\"id\":\"mbxerz\",\"name\":\"pcr\",\"type\":\"lwvcnm\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.features() - .list("eirjrkak", "vnd", "bmazlxlbd", "kidgqeyqrlgpkypb", "kpardo", "dtedxz", "yhbzmgzsyt", "pfslrx", - ListViewType.ALL, 1571501996, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ef", response.iterator().next().properties().description()); - Assertions.assertEquals("kf", response.iterator().next().properties().tags().get("kz")); - Assertions.assertEquals("rezqx", response.iterator().next().properties().properties().get("xeigyddp")); - Assertions.assertEquals("bqrqbpiqfstkdlyj", response.iterator().next().properties().featureName()); - Assertions.assertEquals(FeatureDataType.FLOAT, response.iterator().next().properties().dataType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainerInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainerInnerTests.java deleted file mode 100644 index a4516c9489ba6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainerInnerTests.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.fluent.models.FeaturesetContainerInner; -import com.azure.resourcemanager.machinelearning.models.FeaturesetContainerProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FeaturesetContainerInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeaturesetContainerInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Canceled\",\"isArchived\":false,\"latestVersion\":\"pnwjfujq\",\"nextVersion\":\"fcbahhp\",\"description\":\"ofoiy\",\"tags\":{\"ndviauogphuartvt\":\"filkmkkholv\"},\"properties\":{\"ahmnxhkxjqirw\":\"yefchnm\",\"ewmozqvbu\":\"weooxffifhxwrs\",\"ttaboidvmfqh\":\"qmamhsycxhxzga\",\"mtdherngb\":\"pubowsepdfg\"}},\"id\":\"juahokqto\",\"name\":\"kauxof\",\"type\":\"hfphwpnulaiywze\"}") - .toObject(FeaturesetContainerInner.class); - Assertions.assertEquals("ofoiy", model.properties().description()); - Assertions.assertEquals("filkmkkholv", model.properties().tags().get("ndviauogphuartvt")); - Assertions.assertEquals("yefchnm", model.properties().properties().get("ahmnxhkxjqirw")); - Assertions.assertEquals(false, model.properties().isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturesetContainerInner model - = new FeaturesetContainerInner().withProperties(new FeaturesetContainerProperties().withDescription("ofoiy") - .withTags(mapOf("ndviauogphuartvt", "filkmkkholv")) - .withProperties(mapOf("ahmnxhkxjqirw", "yefchnm", "ewmozqvbu", "weooxffifhxwrs", "ttaboidvmfqh", - "qmamhsycxhxzga", "mtdherngb", "pubowsepdfg")) - .withIsArchived(false)); - model = BinaryData.fromObject(model).toObject(FeaturesetContainerInner.class); - Assertions.assertEquals("ofoiy", model.properties().description()); - Assertions.assertEquals("filkmkkholv", model.properties().tags().get("ndviauogphuartvt")); - Assertions.assertEquals("yefchnm", model.properties().properties().get("ahmnxhkxjqirw")); - Assertions.assertEquals(false, model.properties().isArchived()); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainerPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainerPropertiesTests.java deleted file mode 100644 index b48202b04317f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainerPropertiesTests.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.FeaturesetContainerProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FeaturesetContainerPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeaturesetContainerProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"wkojpllndnpd\",\"nextVersion\":\"pqafgfugsnnfhy\",\"description\":\"efy\",\"tags\":{\"rmlmuowo\":\"octfjgtixrjvzuyt\"},\"properties\":{\"p\":\"uir\"}}") - .toObject(FeaturesetContainerProperties.class); - Assertions.assertEquals("efy", model.description()); - Assertions.assertEquals("octfjgtixrjvzuyt", model.tags().get("rmlmuowo")); - Assertions.assertEquals("uir", model.properties().get("p")); - Assertions.assertEquals(false, model.isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturesetContainerProperties model = new FeaturesetContainerProperties().withDescription("efy") - .withTags(mapOf("rmlmuowo", "octfjgtixrjvzuyt")) - .withProperties(mapOf("p", "uir")) - .withIsArchived(false); - model = BinaryData.fromObject(model).toObject(FeaturesetContainerProperties.class); - Assertions.assertEquals("efy", model.description()); - Assertions.assertEquals("octfjgtixrjvzuyt", model.tags().get("rmlmuowo")); - Assertions.assertEquals("uir", model.properties().get("p")); - Assertions.assertEquals(false, model.isArchived()); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainerResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainerResourceArmPaginatedResultTests.java deleted file mode 100644 index abfa7683f1bbc..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainerResourceArmPaginatedResultTests.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.FeaturesetContainerInner; -import com.azure.resourcemanager.machinelearning.models.FeaturesetContainerProperties; -import com.azure.resourcemanager.machinelearning.models.FeaturesetContainerResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FeaturesetContainerResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeaturesetContainerResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"isArchived\":false,\"latestVersion\":\"ov\",\"nextVersion\":\"pikqmh\",\"description\":\"owjrmzvuporqz\",\"tags\":{\"xcnqmxqpswokmvkh\":\"ydzvkf\",\"wtglxx\":\"ggdhbemzqkzszuw\"},\"properties\":{\"gjsxv\":\"fpgpicrmnzhrgm\",\"qgvriibakcla\":\"qcbfrmbodths\",\"gmwohqfzizvu\":\"jfrnxousxauzlwv\"}},\"id\":\"mk\",\"name\":\"svth\",\"type\":\"wpztekovmribia\"},{\"properties\":{\"provisioningState\":\"Creating\",\"isArchived\":false,\"latestVersion\":\"cfotangcfhnykzcu\",\"nextVersion\":\"wvxwlmzqwmvt\",\"description\":\"jmxmcuqud\",\"tags\":{\"dkvgfabuiyjibuzp\":\"clxyn\"},\"properties\":{\"pgoxgji\":\"gneik\",\"rrxxgewpktvq\":\"qhibtozipqwjedm\"}},\"id\":\"kmqp\",\"name\":\"o\",\"type\":\"hlfbcgwgc\"}],\"nextLink\":\"xoe\"}") - .toObject(FeaturesetContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("owjrmzvuporqz", model.value().get(0).properties().description()); - Assertions.assertEquals("ydzvkf", model.value().get(0).properties().tags().get("xcnqmxqpswokmvkh")); - Assertions.assertEquals("fpgpicrmnzhrgm", model.value().get(0).properties().properties().get("gjsxv")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("xoe", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturesetContainerResourceArmPaginatedResult model - = new FeaturesetContainerResourceArmPaginatedResult().withValue(Arrays.asList( - new FeaturesetContainerInner() - .withProperties(new FeaturesetContainerProperties().withDescription("owjrmzvuporqz") - .withTags(mapOf("xcnqmxqpswokmvkh", "ydzvkf", "wtglxx", "ggdhbemzqkzszuw")) - .withProperties(mapOf("gjsxv", "fpgpicrmnzhrgm", "qgvriibakcla", "qcbfrmbodths", "gmwohqfzizvu", - "jfrnxousxauzlwv")) - .withIsArchived(false)), - new FeaturesetContainerInner() - .withProperties(new FeaturesetContainerProperties().withDescription("jmxmcuqud") - .withTags(mapOf("dkvgfabuiyjibuzp", "clxyn")) - .withProperties(mapOf("pgoxgji", "gneik", "rrxxgewpktvq", "qhibtozipqwjedm")) - .withIsArchived(false)))) - .withNextLink("xoe"); - model = BinaryData.fromObject(model).toObject(FeaturesetContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("owjrmzvuporqz", model.value().get(0).properties().description()); - Assertions.assertEquals("ydzvkf", model.value().get(0).properties().tags().get("xcnqmxqpswokmvkh")); - Assertions.assertEquals("fpgpicrmnzhrgm", model.value().get(0).properties().properties().get("gjsxv")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("xoe", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersCreateOrUpdateMockTests.java deleted file mode 100644 index 317df1aa1f375..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersCreateOrUpdateMockTests.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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.FeaturesetContainer; -import com.azure.resourcemanager.machinelearning.models.FeaturesetContainerProperties; -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 reactor.core.publisher.Mono; - -public final class FeaturesetContainersCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"d\",\"nextVersion\":\"bjzxrpxji\",\"description\":\"upirvdonka\",\"tags\":{\"n\":\"vgjgcwwuusjjhtcy\",\"svwq\":\"highnxhgmfrnk\"},\"properties\":{\"auksttximeztasf\":\"jteqlujmmkn\"}},\"id\":\"mecweohlerpt\",\"name\":\"wvzapybdeea\",\"type\":\"igbpabacp\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - FeaturesetContainer response = manager.featuresetContainers() - .define("xy") - .withExistingWorkspace("iweyuigyzsebk", "fykgmwurcxxj") - .withProperties(new FeaturesetContainerProperties().withDescription("nk") - .withTags(mapOf("lwujobdqi", "pmqffgjsqqqairoo", "v", "pp", "trwgljfatezdxq", "ovijpmegnkrvtfbi")) - .withProperties(mapOf("lgnieeqjdfxxxnn", "phgimyomje", "rijbiterqfu", "uxkepga", "dd", "errcanlpf", - "qawupqkvmy", "wpg")) - .withIsArchived(false)) - .create(); - - Assertions.assertEquals("upirvdonka", response.properties().description()); - Assertions.assertEquals("vgjgcwwuusjjhtcy", response.properties().tags().get("n")); - Assertions.assertEquals("jteqlujmmkn", response.properties().properties().get("auksttximeztasf")); - Assertions.assertEquals(false, response.properties().isArchived()); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersDeleteMockTests.java deleted file mode 100644 index 0cb46c2f66f7f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FeaturesetContainersDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.featuresetContainers() - .delete("flhhbupqovuw", "vqihmqhqjd", "bgcemjt", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersGetEntityWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersGetEntityWithResponseMockTests.java deleted file mode 100644 index edbcb7328bfc4..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersGetEntityWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.FeaturesetContainer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FeaturesetContainersGetEntityWithResponseMockTests { - @Test - public void testGetEntityWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Creating\",\"isArchived\":true,\"latestVersion\":\"pxe\",\"nextVersion\":\"becxuvkbao\",\"description\":\"vyhgpgjdrng\",\"tags\":{\"ucyackgka\":\"eepukuofzwizt\"},\"properties\":{\"smurjab\":\"gtpcohfksixvwkpc\"}},\"id\":\"xohagcojgmyzjd\",\"name\":\"mqe\",\"type\":\"rqtgdipbn\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - FeaturesetContainer response = manager.featuresetContainers() - .getEntityWithResponse("ljxagcalyq", "craxilzdxcm", "dmdsypksfrhi", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("vyhgpgjdrng", response.properties().description()); - Assertions.assertEquals("eepukuofzwizt", response.properties().tags().get("ucyackgka")); - Assertions.assertEquals("gtpcohfksixvwkpc", response.properties().properties().get("smurjab")); - Assertions.assertEquals(true, response.properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersListMockTests.java deleted file mode 100644 index 26153b6248305..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetContainersListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.FeaturesetContainer; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FeaturesetContainersListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"isArchived\":false,\"latestVersion\":\"vpdu\",\"nextVersion\":\"plpdzriettnmiuf\",\"description\":\"fqmlmbyqyekuw\",\"tags\":{\"rt\":\"zpegumydo\"},\"properties\":{\"evqjdxiiqwqbvanv\":\"ecgbxrc\",\"nkruywrxnksmaebd\":\"pxnaaii\",\"wfuxnt\":\"xjsmrseauxeovbgr\"}},\"id\":\"gylleketkv\",\"name\":\"ptqhatfg\",\"type\":\"hhbxgfhgkdm\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.featuresetContainers() - .list("pny", "luivrjselauzrpes", "eb", "egzxrusafvf", ListViewType.ALL, 1984547680, "a", "uoh", - "kimntxdvlqmn", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("fqmlmbyqyekuw", response.iterator().next().properties().description()); - Assertions.assertEquals("zpegumydo", response.iterator().next().properties().tags().get("rt")); - Assertions.assertEquals("ecgbxrc", - response.iterator().next().properties().properties().get("evqjdxiiqwqbvanv")); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetSpecificationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetSpecificationTests.java deleted file mode 100644 index 1624a63538671..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetSpecificationTests.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.FeaturesetSpecification; -import org.junit.jupiter.api.Assertions; - -public final class FeaturesetSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeaturesetSpecification model - = BinaryData.fromString("{\"path\":\"msplzgaufcshhvn\"}").toObject(FeaturesetSpecification.class); - Assertions.assertEquals("msplzgaufcshhvn", model.path()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturesetSpecification model = new FeaturesetSpecification().withPath("msplzgaufcshhvn"); - model = BinaryData.fromObject(model).toObject(FeaturesetSpecification.class); - Assertions.assertEquals("msplzgaufcshhvn", model.path()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionBackfillRequestTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionBackfillRequestTests.java deleted file mode 100644 index deaadee64e466..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionBackfillRequestTests.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.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.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FeaturesetVersionBackfillRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeaturesetVersionBackfillRequest model = BinaryData.fromString( - "{\"displayName\":\"bwzohmnrxxbs\",\"description\":\"klinhmdptysprq\",\"featureWindow\":{\"featureWindowStart\":\"2021-03-17T04:51:43Z\",\"featureWindowEnd\":\"2021-09-05T11:06:21Z\"},\"dataAvailabilityStatus\":[\"Incomplete\",\"Incomplete\"],\"jobId\":\"vjgp\",\"tags\":{\"qvapcohhoucq\":\"fiqwoy\",\"jxcx\":\"q\",\"tzqdd\":\"rzdcgdzbenribcaw\",\"mzwcjjncqt\":\"jwfljhznamtua\"},\"resource\":{\"instanceType\":\"izvg\"},\"sparkConfiguration\":{\"ngrebwg\":\"tzuuvb\",\"x\":\"ahttzlswvajqfut\"},\"properties\":{\"aohcmbuocn\":\"zasunwqrjzfrgq\",\"hmbpyryxamebly\":\"r\",\"kmrocxne\":\"yvk\",\"mtodl\":\"v\"}}") - .toObject(FeaturesetVersionBackfillRequest.class); - Assertions.assertEquals("bwzohmnrxxbs", model.displayName()); - Assertions.assertEquals("klinhmdptysprq", model.description()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-17T04:51:43Z"), - model.featureWindow().featureWindowStart()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-05T11:06:21Z"), model.featureWindow().featureWindowEnd()); - Assertions.assertEquals(DataAvailabilityStatus.INCOMPLETE, model.dataAvailabilityStatus().get(0)); - Assertions.assertEquals("vjgp", model.jobId()); - Assertions.assertEquals("fiqwoy", model.tags().get("qvapcohhoucq")); - Assertions.assertEquals("izvg", model.resource().instanceType()); - Assertions.assertEquals("tzuuvb", model.sparkConfiguration().get("ngrebwg")); - Assertions.assertEquals("zasunwqrjzfrgq", model.properties().get("aohcmbuocn")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturesetVersionBackfillRequest model = new FeaturesetVersionBackfillRequest().withDisplayName("bwzohmnrxxbs") - .withDescription("klinhmdptysprq") - .withFeatureWindow(new FeatureWindow().withFeatureWindowStart(OffsetDateTime.parse("2021-03-17T04:51:43Z")) - .withFeatureWindowEnd(OffsetDateTime.parse("2021-09-05T11:06:21Z"))) - .withDataAvailabilityStatus( - Arrays.asList(DataAvailabilityStatus.INCOMPLETE, DataAvailabilityStatus.INCOMPLETE)) - .withJobId("vjgp") - .withTags(mapOf("qvapcohhoucq", "fiqwoy", "jxcx", "q", "tzqdd", "rzdcgdzbenribcaw", "mzwcjjncqt", - "jwfljhznamtua")) - .withResource(new MaterializationComputeResource().withInstanceType("izvg")) - .withSparkConfiguration(mapOf("ngrebwg", "tzuuvb", "x", "ahttzlswvajqfut")) - .withProperties( - mapOf("aohcmbuocn", "zasunwqrjzfrgq", "hmbpyryxamebly", "r", "kmrocxne", "yvk", "mtodl", "v")); - model = BinaryData.fromObject(model).toObject(FeaturesetVersionBackfillRequest.class); - Assertions.assertEquals("bwzohmnrxxbs", model.displayName()); - Assertions.assertEquals("klinhmdptysprq", model.description()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-17T04:51:43Z"), - model.featureWindow().featureWindowStart()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-05T11:06:21Z"), model.featureWindow().featureWindowEnd()); - Assertions.assertEquals(DataAvailabilityStatus.INCOMPLETE, model.dataAvailabilityStatus().get(0)); - Assertions.assertEquals("vjgp", model.jobId()); - Assertions.assertEquals("fiqwoy", model.tags().get("qvapcohhoucq")); - Assertions.assertEquals("izvg", model.resource().instanceType()); - Assertions.assertEquals("tzuuvb", model.sparkConfiguration().get("ngrebwg")); - Assertions.assertEquals("zasunwqrjzfrgq", model.properties().get("aohcmbuocn")); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionBackfillResponseInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionBackfillResponseInnerTests.java deleted file mode 100644 index a3bae11b08a0e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionBackfillResponseInnerTests.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.fluent.models.FeaturesetVersionBackfillResponseInner; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class FeaturesetVersionBackfillResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeaturesetVersionBackfillResponseInner model - = BinaryData.fromString("{\"jobIds\":[\"ygvoavyunssxlgh\",\"ee\",\"jlgvvpase\",\"sgb\"]}") - .toObject(FeaturesetVersionBackfillResponseInner.class); - Assertions.assertEquals("ygvoavyunssxlgh", model.jobIds().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturesetVersionBackfillResponseInner model = new FeaturesetVersionBackfillResponseInner() - .withJobIds(Arrays.asList("ygvoavyunssxlgh", "ee", "jlgvvpase", "sgb")); - model = BinaryData.fromObject(model).toObject(FeaturesetVersionBackfillResponseInner.class); - Assertions.assertEquals("ygvoavyunssxlgh", model.jobIds().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionInnerTests.java deleted file mode 100644 index ed0c9bc96baf1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionInnerTests.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.fluent.models.FeaturesetVersionInner; -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.Webhook; -import com.azure.resourcemanager.machinelearning.models.WeekDay; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FeaturesetVersionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeaturesetVersionInner model = BinaryData.fromString( - "{\"properties\":{\"specification\":{\"path\":\"sxcdgljplkeuach\"},\"materializationSettings\":{\"storeType\":\"Offline\",\"schedule\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Week\",\"interval\":1553395151,\"schedule\":{\"hours\":[286506544,1823247004],\"minutes\":[467932979,1819324739],\"weekDays\":[\"Tuesday\",\"Tuesday\",\"Wednesday\",\"Tuesday\"],\"monthDays\":[1207457404]},\"endTime\":\"hqjjys\",\"startTime\":\"rlpshhkv\",\"timeZone\":\"dwqslsrhmpqvw\"},\"notification\":{\"emails\":[\"ndcbrwi\",\"uvqejosovyrrle\"],\"emailOn\":[\"JobFailed\",\"JobFailed\",\"JobFailed\",\"JobFailed\"],\"webhooks\":{\"bmrqbrjbbmp\":{\"webhookType\":\"Webhook\",\"eventType\":\"qobbpihehcec\"},\"rseqwjksghudgz\":{\"webhookType\":\"Webhook\",\"eventType\":\"lvykfrex\"},\"hrkmdyomkxfbvfbh\":{\"webhookType\":\"Webhook\",\"eventType\":\"ogjggsvoujkxibda\"},\"hpwpgddeimawzovg\":{\"webhookType\":\"Webhook\",\"eventType\":\"i\"}}},\"resource\":{\"instanceType\":\"muikjcjcaztbws\"},\"sparkConfiguration\":{\"ytwvczcswkacve\":\"owxwcomli\",\"pqthehnmnaoya\":\"yfdvlvhbwrnfxtgd\"}},\"stage\":\"coeqswankltytm\",\"entities\":[\"oznnhdrlktgj\",\"sggux\",\"eml\",\"ywaeeczgf\"],\"provisioningState\":\"Updating\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"sxbly\",\"tags\":{\"plpvm\":\"zujksrlsmdes\",\"eowxvgpi\":\"cdoewbidyv\",\"xzecpaxwkufykhvu\":\"deugf\"},\"properties\":{\"znabaobns\":\"pmru\",\"ihywartspph\":\"ujdjltymkmvg\"}},\"id\":\"xkykxdssjp\",\"name\":\"mmuc\",\"type\":\"xhikkflrmymyin\"}") - .toObject(FeaturesetVersionInner.class); - Assertions.assertEquals("sxbly", model.properties().description()); - Assertions.assertEquals("zujksrlsmdes", model.properties().tags().get("plpvm")); - Assertions.assertEquals("pmru", model.properties().properties().get("znabaobns")); - Assertions.assertEquals(true, model.properties().isArchived()); - Assertions.assertEquals(true, model.properties().isAnonymous()); - Assertions.assertEquals("sxcdgljplkeuach", model.properties().specification().path()); - Assertions.assertEquals(MaterializationStoreType.OFFLINE, - model.properties().materializationSettings().storeType()); - Assertions.assertEquals("hqjjys", model.properties().materializationSettings().schedule().endTime()); - Assertions.assertEquals("rlpshhkv", model.properties().materializationSettings().schedule().startTime()); - Assertions.assertEquals("dwqslsrhmpqvw", model.properties().materializationSettings().schedule().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.WEEK, - model.properties().materializationSettings().schedule().frequency()); - Assertions.assertEquals(1553395151, model.properties().materializationSettings().schedule().interval()); - Assertions.assertEquals(286506544, - model.properties().materializationSettings().schedule().schedule().hours().get(0)); - Assertions.assertEquals(467932979, - model.properties().materializationSettings().schedule().schedule().minutes().get(0)); - Assertions.assertEquals(WeekDay.TUESDAY, - model.properties().materializationSettings().schedule().schedule().weekDays().get(0)); - Assertions.assertEquals(1207457404, - model.properties().materializationSettings().schedule().schedule().monthDays().get(0)); - Assertions.assertEquals("ndcbrwi", model.properties().materializationSettings().notification().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_FAILED, - model.properties().materializationSettings().notification().emailOn().get(0)); - Assertions.assertEquals("qobbpihehcec", - model.properties().materializationSettings().notification().webhooks().get("bmrqbrjbbmp").eventType()); - Assertions.assertEquals("muikjcjcaztbws", - model.properties().materializationSettings().resource().instanceType()); - Assertions.assertEquals("owxwcomli", - model.properties().materializationSettings().sparkConfiguration().get("ytwvczcswkacve")); - Assertions.assertEquals("coeqswankltytm", model.properties().stage()); - Assertions.assertEquals("oznnhdrlktgj", model.properties().entities().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturesetVersionInner model = new FeaturesetVersionInner().withProperties(new FeaturesetVersionProperties() - .withDescription("sxbly") - .withTags(mapOf("plpvm", "zujksrlsmdes", "eowxvgpi", "cdoewbidyv", "xzecpaxwkufykhvu", "deugf")) - .withProperties(mapOf("znabaobns", "pmru", "ihywartspph", "ujdjltymkmvg")) - .withIsArchived(true) - .withIsAnonymous(true) - .withSpecification(new FeaturesetSpecification().withPath("sxcdgljplkeuach")) - .withMaterializationSettings(new MaterializationSettings().withStoreType(MaterializationStoreType.OFFLINE) - .withSchedule(new RecurrenceTrigger().withEndTime("hqjjys") - .withStartTime("rlpshhkv") - .withTimeZone("dwqslsrhmpqvw") - .withFrequency(RecurrenceFrequency.WEEK) - .withInterval(1553395151) - .withSchedule(new RecurrenceSchedule().withHours(Arrays.asList(286506544, 1823247004)) - .withMinutes(Arrays.asList(467932979, 1819324739)) - .withWeekDays( - Arrays.asList(WeekDay.TUESDAY, WeekDay.TUESDAY, WeekDay.WEDNESDAY, WeekDay.TUESDAY)) - .withMonthDays(Arrays.asList(1207457404)))) - .withNotification( - new NotificationSetting().withEmails(Arrays.asList("ndcbrwi", "uvqejosovyrrle")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_FAILED, - EmailNotificationEnableType.JOB_FAILED, EmailNotificationEnableType.JOB_FAILED, - EmailNotificationEnableType.JOB_FAILED)) - .withWebhooks(mapOf("bmrqbrjbbmp", new Webhook().withEventType("qobbpihehcec"), - "rseqwjksghudgz", new Webhook().withEventType("lvykfrex"), "hrkmdyomkxfbvfbh", - new Webhook().withEventType("ogjggsvoujkxibda"), "hpwpgddeimawzovg", - new Webhook().withEventType("i")))) - .withResource(new MaterializationComputeResource().withInstanceType("muikjcjcaztbws")) - .withSparkConfiguration(mapOf("ytwvczcswkacve", "owxwcomli", "pqthehnmnaoya", "yfdvlvhbwrnfxtgd"))) - .withStage("coeqswankltytm") - .withEntities(Arrays.asList("oznnhdrlktgj", "sggux", "eml", "ywaeeczgf"))); - model = BinaryData.fromObject(model).toObject(FeaturesetVersionInner.class); - Assertions.assertEquals("sxbly", model.properties().description()); - Assertions.assertEquals("zujksrlsmdes", model.properties().tags().get("plpvm")); - Assertions.assertEquals("pmru", model.properties().properties().get("znabaobns")); - Assertions.assertEquals(true, model.properties().isArchived()); - Assertions.assertEquals(true, model.properties().isAnonymous()); - Assertions.assertEquals("sxcdgljplkeuach", model.properties().specification().path()); - Assertions.assertEquals(MaterializationStoreType.OFFLINE, - model.properties().materializationSettings().storeType()); - Assertions.assertEquals("hqjjys", model.properties().materializationSettings().schedule().endTime()); - Assertions.assertEquals("rlpshhkv", model.properties().materializationSettings().schedule().startTime()); - Assertions.assertEquals("dwqslsrhmpqvw", model.properties().materializationSettings().schedule().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.WEEK, - model.properties().materializationSettings().schedule().frequency()); - Assertions.assertEquals(1553395151, model.properties().materializationSettings().schedule().interval()); - Assertions.assertEquals(286506544, - model.properties().materializationSettings().schedule().schedule().hours().get(0)); - Assertions.assertEquals(467932979, - model.properties().materializationSettings().schedule().schedule().minutes().get(0)); - Assertions.assertEquals(WeekDay.TUESDAY, - model.properties().materializationSettings().schedule().schedule().weekDays().get(0)); - Assertions.assertEquals(1207457404, - model.properties().materializationSettings().schedule().schedule().monthDays().get(0)); - Assertions.assertEquals("ndcbrwi", model.properties().materializationSettings().notification().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_FAILED, - model.properties().materializationSettings().notification().emailOn().get(0)); - Assertions.assertEquals("qobbpihehcec", - model.properties().materializationSettings().notification().webhooks().get("bmrqbrjbbmp").eventType()); - Assertions.assertEquals("muikjcjcaztbws", - model.properties().materializationSettings().resource().instanceType()); - Assertions.assertEquals("owxwcomli", - model.properties().materializationSettings().sparkConfiguration().get("ytwvczcswkacve")); - Assertions.assertEquals("coeqswankltytm", model.properties().stage()); - Assertions.assertEquals("oznnhdrlktgj", model.properties().entities().get(0)); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionPropertiesTests.java deleted file mode 100644 index 6b17297a1aba1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionPropertiesTests.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.generated; - -import com.azure.core.util.BinaryData; -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.Webhook; -import com.azure.resourcemanager.machinelearning.models.WeekDay; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FeaturesetVersionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeaturesetVersionProperties model = BinaryData.fromString( - "{\"specification\":{\"path\":\"hr\"},\"materializationSettings\":{\"storeType\":\"None\",\"schedule\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Minute\",\"interval\":1553660421,\"schedule\":{\"hours\":[2094134008],\"minutes\":[809500058],\"weekDays\":[\"Saturday\",\"Wednesday\",\"Saturday\",\"Tuesday\"],\"monthDays\":[1275151185,264674589,1965793317,753182470]},\"endTime\":\"iowlxteqdptj\",\"startTime\":\"dtguk\",\"timeZone\":\"nblwphqlkcc\"},\"notification\":{\"emails\":[\"gqwa\",\"oiulwgniipr\",\"lvawuwzdufypivls\"],\"emailOn\":[\"JobFailed\",\"JobFailed\"],\"webhooks\":{\"phavpmhbrb\":{\"webhookType\":\"Webhook\",\"eventType\":\"kmifoxxkub\"},\"sqyzqedikdfr\":{\"webhookType\":\"Webhook\",\"eventType\":\"vgovpbbttefjokn\"}}},\"resource\":{\"instanceType\":\"qmrjg\"},\"sparkConfiguration\":{\"iwzcxmjpbyeph\":\"fqlggw\",\"ljvrcmyfqipgxhnp\":\"gt\"}},\"stage\":\"yqwcabvnuil\",\"entities\":[\"aswlp\",\"ugmrmf\",\"lrxw\"],\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"isAnonymous\":false,\"description\":\"vcisiz\",\"tags\":{\"jwuive\":\"eds\"},\"properties\":{\"psmgo\":\"gyeewxeiq\",\"l\":\"guamlj\"}}") - .toObject(FeaturesetVersionProperties.class); - Assertions.assertEquals("vcisiz", model.description()); - Assertions.assertEquals("eds", model.tags().get("jwuive")); - Assertions.assertEquals("gyeewxeiq", model.properties().get("psmgo")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals("hr", model.specification().path()); - Assertions.assertEquals(MaterializationStoreType.NONE, model.materializationSettings().storeType()); - Assertions.assertEquals("iowlxteqdptj", model.materializationSettings().schedule().endTime()); - Assertions.assertEquals("dtguk", model.materializationSettings().schedule().startTime()); - Assertions.assertEquals("nblwphqlkcc", model.materializationSettings().schedule().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.MINUTE, model.materializationSettings().schedule().frequency()); - Assertions.assertEquals(1553660421, model.materializationSettings().schedule().interval()); - Assertions.assertEquals(2094134008, model.materializationSettings().schedule().schedule().hours().get(0)); - Assertions.assertEquals(809500058, model.materializationSettings().schedule().schedule().minutes().get(0)); - Assertions.assertEquals(WeekDay.SATURDAY, - model.materializationSettings().schedule().schedule().weekDays().get(0)); - Assertions.assertEquals(1275151185, model.materializationSettings().schedule().schedule().monthDays().get(0)); - Assertions.assertEquals("gqwa", model.materializationSettings().notification().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_FAILED, - model.materializationSettings().notification().emailOn().get(0)); - Assertions.assertEquals("kmifoxxkub", - model.materializationSettings().notification().webhooks().get("phavpmhbrb").eventType()); - Assertions.assertEquals("qmrjg", model.materializationSettings().resource().instanceType()); - Assertions.assertEquals("fqlggw", model.materializationSettings().sparkConfiguration().get("iwzcxmjpbyeph")); - Assertions.assertEquals("yqwcabvnuil", model.stage()); - Assertions.assertEquals("aswlp", model.entities().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturesetVersionProperties model = new FeaturesetVersionProperties().withDescription("vcisiz") - .withTags(mapOf("jwuive", "eds")) - .withProperties(mapOf("psmgo", "gyeewxeiq", "l", "guamlj")) - .withIsArchived(true) - .withIsAnonymous(false) - .withSpecification(new FeaturesetSpecification().withPath("hr")) - .withMaterializationSettings(new MaterializationSettings().withStoreType(MaterializationStoreType.NONE) - .withSchedule(new RecurrenceTrigger().withEndTime("iowlxteqdptj") - .withStartTime("dtguk") - .withTimeZone("nblwphqlkcc") - .withFrequency(RecurrenceFrequency.MINUTE) - .withInterval(1553660421) - .withSchedule(new RecurrenceSchedule().withHours(Arrays.asList(2094134008)) - .withMinutes(Arrays.asList(809500058)) - .withWeekDays( - Arrays.asList(WeekDay.SATURDAY, WeekDay.WEDNESDAY, WeekDay.SATURDAY, WeekDay.TUESDAY)) - .withMonthDays(Arrays.asList(1275151185, 264674589, 1965793317, 753182470)))) - .withNotification(new NotificationSetting() - .withEmails(Arrays.asList("gqwa", "oiulwgniipr", "lvawuwzdufypivls")) - .withEmailOn( - Arrays.asList(EmailNotificationEnableType.JOB_FAILED, EmailNotificationEnableType.JOB_FAILED)) - .withWebhooks(mapOf("phavpmhbrb", new Webhook().withEventType("kmifoxxkub"), "sqyzqedikdfr", - new Webhook().withEventType("vgovpbbttefjokn")))) - .withResource(new MaterializationComputeResource().withInstanceType("qmrjg")) - .withSparkConfiguration(mapOf("iwzcxmjpbyeph", "fqlggw", "ljvrcmyfqipgxhnp", "gt"))) - .withStage("yqwcabvnuil") - .withEntities(Arrays.asList("aswlp", "ugmrmf", "lrxw")); - model = BinaryData.fromObject(model).toObject(FeaturesetVersionProperties.class); - Assertions.assertEquals("vcisiz", model.description()); - Assertions.assertEquals("eds", model.tags().get("jwuive")); - Assertions.assertEquals("gyeewxeiq", model.properties().get("psmgo")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals("hr", model.specification().path()); - Assertions.assertEquals(MaterializationStoreType.NONE, model.materializationSettings().storeType()); - Assertions.assertEquals("iowlxteqdptj", model.materializationSettings().schedule().endTime()); - Assertions.assertEquals("dtguk", model.materializationSettings().schedule().startTime()); - Assertions.assertEquals("nblwphqlkcc", model.materializationSettings().schedule().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.MINUTE, model.materializationSettings().schedule().frequency()); - Assertions.assertEquals(1553660421, model.materializationSettings().schedule().interval()); - Assertions.assertEquals(2094134008, model.materializationSettings().schedule().schedule().hours().get(0)); - Assertions.assertEquals(809500058, model.materializationSettings().schedule().schedule().minutes().get(0)); - Assertions.assertEquals(WeekDay.SATURDAY, - model.materializationSettings().schedule().schedule().weekDays().get(0)); - Assertions.assertEquals(1275151185, model.materializationSettings().schedule().schedule().monthDays().get(0)); - Assertions.assertEquals("gqwa", model.materializationSettings().notification().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_FAILED, - model.materializationSettings().notification().emailOn().get(0)); - Assertions.assertEquals("kmifoxxkub", - model.materializationSettings().notification().webhooks().get("phavpmhbrb").eventType()); - Assertions.assertEquals("qmrjg", model.materializationSettings().resource().instanceType()); - Assertions.assertEquals("fqlggw", model.materializationSettings().sparkConfiguration().get("iwzcxmjpbyeph")); - Assertions.assertEquals("yqwcabvnuil", model.stage()); - Assertions.assertEquals("aswlp", model.entities().get(0)); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionResourceArmPaginatedResultTests.java deleted file mode 100644 index db21b4d547ce1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,191 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code 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.FeaturesetVersionInner; -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.FeaturesetVersionResourceArmPaginatedResult; -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.Webhook; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FeaturesetVersionResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeaturesetVersionResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"specification\":{\"path\":\"ewuninvud\"},\"materializationSettings\":{\"storeType\":\"OnlineAndOffline\",\"schedule\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Day\",\"interval\":709462942,\"schedule\":{\"hours\":[],\"minutes\":[]},\"endTime\":\"ec\",\"startTime\":\"ct\",\"timeZone\":\"xdtddmflhuytxzv\"},\"notification\":{\"emails\":[\"pxbannovvoxc\",\"ytprwnwvroev\",\"tlyo\",\"rrrouuxvnsa\"],\"emailOn\":[\"JobCompleted\",\"JobCancelled\",\"JobCompleted\",\"JobCancelled\"],\"webhooks\":{\"zrxklobd\":{\"webhookType\":\"Webhook\"},\"nazpmk\":{\"webhookType\":\"Webhook\"}}},\"resource\":{\"instanceType\":\"vevfxz\"},\"sparkConfiguration\":{\"hrdd\":\"hbzxli\",\"nzqcy\":\"tfgxqbawpcb\",\"yuicdhzbdy\":\"napqo\",\"bid\":\"wwgbdv\"}},\"stage\":\"m\",\"entities\":[\"plfmuvapckccrrvw\"],\"provisioningState\":\"Canceled\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"k\",\"tags\":{\"pyyrmfs\":\"immoiroqboshbrag\",\"opfppdbwnupgah\":\"bpav\",\"jcaacfdmmcpugm\":\"kuma\"},\"properties\":{\"oqhnlb\":\"epvufhbzehew\",\"krsrrmoucs\":\"nbldxeaclgschori\",\"abeolhbhlvbm\":\"fldpuviyfc\"}},\"id\":\"qi\",\"name\":\"s\",\"type\":\"tkcudfbsfarfsiow\"},{\"properties\":{\"specification\":{\"path\":\"xnq\"},\"materializationSettings\":{\"storeType\":\"None\",\"schedule\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Minute\",\"interval\":1896459173,\"schedule\":{\"hours\":[],\"minutes\":[]},\"endTime\":\"qyki\",\"startTime\":\"d\",\"timeZone\":\"aoaf\"},\"notification\":{\"emails\":[\"v\",\"xmycjimryvwgcw\"],\"emailOn\":[\"JobCancelled\",\"JobFailed\"],\"webhooks\":{\"esyds\":{\"webhookType\":\"Webhook\"}}},\"resource\":{\"instanceType\":\"fo\"},\"sparkConfiguration\":{\"llklmtk\":\"bvopwndyqle\",\"dfjmzsyzfhotlh\":\"lowkxxpvb\",\"yych\":\"k\",\"hv\":\"nsjlpjrtws\"}},\"stage\":\"icphvtrrmhw\",\"entities\":[\"dpyflubhv\",\"glrocuy\",\"lw\"],\"provisioningState\":\"Deleting\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"clutnpqme\",\"tags\":{\"mykyujxsglhs\":\"jk\",\"fihotj\":\"rryejylmbkzudnig\",\"refqy\":\"wlpxuzzjg\"},\"properties\":{\"fb\":\"toihiqakydi\",\"spodaqax\":\"kwpzdqtvh\"}},\"id\":\"pie\",\"name\":\"gbebjf\",\"type\":\"lbmoichd\"},{\"properties\":{\"specification\":{\"path\":\"fpubntnbatz\"},\"materializationSettings\":{\"storeType\":\"Online\",\"schedule\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Month\",\"interval\":1702744153,\"schedule\":{\"hours\":[],\"minutes\":[]},\"endTime\":\"el\",\"startTime\":\"ttcjuhplrvkmjc\",\"timeZone\":\"jvlgfggcvkyyliz\"},\"notification\":{\"emails\":[\"psfxsf\",\"ztlvtmvagbwidqlv\"],\"emailOn\":[\"JobFailed\",\"JobFailed\"],\"webhooks\":{\"fizr\":{\"webhookType\":\"Webhook\"},\"jfnmjmvlwyz\":{\"webhookType\":\"Webhook\"},\"iblkujr\":{\"webhookType\":\"Webhook\"},\"lfojuidjp\":{\"webhookType\":\"Webhook\"}}},\"resource\":{\"instanceType\":\"jucejikzoeovvtz\"},\"sparkConfiguration\":{\"bqzolxr\":\"tjklntikyjuzk\"}},\"stage\":\"hqjwtrhtgvg\",\"entities\":[\"rrkolawjmjs\"],\"provisioningState\":\"Canceled\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"fzzzwyjafitlhg\",\"tags\":{\"whmozusgzvlnsnnj\":\"uchlgmltx\",\"rag\":\"fpafolpymwamxq\",\"vl\":\"gdphtvdula\",\"rupdwvnphcnzq\":\"jchcsrlzknmzla\"},\"properties\":{\"smlzzhzdtxetlgy\":\"hmqrhvthlaiwdc\",\"geaar\":\"lhqvlnnpxybafi\",\"lidwcwvmzegjon\":\"gjekglklby\"}},\"id\":\"jirwgdnqzbrfk\",\"name\":\"pzhz\",\"type\":\"tk\"}],\"nextLink\":\"cit\"}") - .toObject(FeaturesetVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("k", model.value().get(0).properties().description()); - Assertions.assertEquals("immoiroqboshbrag", model.value().get(0).properties().tags().get("pyyrmfs")); - Assertions.assertEquals("epvufhbzehew", model.value().get(0).properties().properties().get("oqhnlb")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(true, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals("ewuninvud", model.value().get(0).properties().specification().path()); - Assertions.assertEquals(MaterializationStoreType.ONLINE_AND_OFFLINE, - model.value().get(0).properties().materializationSettings().storeType()); - Assertions.assertEquals("ec", model.value().get(0).properties().materializationSettings().schedule().endTime()); - Assertions.assertEquals("ct", - model.value().get(0).properties().materializationSettings().schedule().startTime()); - Assertions.assertEquals("xdtddmflhuytxzv", - model.value().get(0).properties().materializationSettings().schedule().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.DAY, - model.value().get(0).properties().materializationSettings().schedule().frequency()); - Assertions.assertEquals(709462942, - model.value().get(0).properties().materializationSettings().schedule().interval()); - Assertions.assertEquals("pxbannovvoxc", - model.value().get(0).properties().materializationSettings().notification().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_COMPLETED, - model.value().get(0).properties().materializationSettings().notification().emailOn().get(0)); - Assertions.assertEquals("vevfxz", - model.value().get(0).properties().materializationSettings().resource().instanceType()); - Assertions.assertEquals("hbzxli", - model.value().get(0).properties().materializationSettings().sparkConfiguration().get("hrdd")); - Assertions.assertEquals("m", model.value().get(0).properties().stage()); - Assertions.assertEquals("plfmuvapckccrrvw", model.value().get(0).properties().entities().get(0)); - Assertions.assertEquals("cit", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturesetVersionResourceArmPaginatedResult model - = new FeaturesetVersionResourceArmPaginatedResult().withValue(Arrays.asList( - new FeaturesetVersionInner().withProperties(new FeaturesetVersionProperties().withDescription("k") - .withTags(mapOf("pyyrmfs", "immoiroqboshbrag", "opfppdbwnupgah", "bpav", "jcaacfdmmcpugm", "kuma")) - .withProperties( - mapOf("oqhnlb", "epvufhbzehew", "krsrrmoucs", "nbldxeaclgschori", "abeolhbhlvbm", "fldpuviyfc")) - .withIsArchived(false) - .withIsAnonymous(true) - .withSpecification(new FeaturesetSpecification().withPath("ewuninvud")) - .withMaterializationSettings(new MaterializationSettings() - .withStoreType(MaterializationStoreType.ONLINE_AND_OFFLINE) - .withSchedule(new RecurrenceTrigger().withEndTime("ec") - .withStartTime("ct") - .withTimeZone("xdtddmflhuytxzv") - .withFrequency(RecurrenceFrequency.DAY) - .withInterval(709462942) - .withSchedule( - new RecurrenceSchedule().withHours(Arrays.asList()).withMinutes(Arrays.asList()))) - .withNotification(new NotificationSetting() - .withEmails(Arrays.asList("pxbannovvoxc", "ytprwnwvroev", "tlyo", "rrrouuxvnsa")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_COMPLETED, - EmailNotificationEnableType.JOB_CANCELLED, EmailNotificationEnableType.JOB_COMPLETED, - EmailNotificationEnableType.JOB_CANCELLED)) - .withWebhooks(mapOf("zrxklobd", new Webhook(), "nazpmk", new Webhook()))) - .withResource(new MaterializationComputeResource().withInstanceType("vevfxz")) - .withSparkConfiguration( - mapOf("hrdd", "hbzxli", "nzqcy", "tfgxqbawpcb", "yuicdhzbdy", "napqo", "bid", "wwgbdv"))) - .withStage("m") - .withEntities(Arrays.asList("plfmuvapckccrrvw"))), - new FeaturesetVersionInner() - .withProperties(new FeaturesetVersionProperties().withDescription("clutnpqme") - .withTags(mapOf("mykyujxsglhs", "jk", "fihotj", "rryejylmbkzudnig", "refqy", "wlpxuzzjg")) - .withProperties(mapOf("fb", "toihiqakydi", "spodaqax", "kwpzdqtvh")) - .withIsArchived(false) - .withIsAnonymous(false) - .withSpecification(new FeaturesetSpecification().withPath("xnq")) - .withMaterializationSettings( - new MaterializationSettings().withStoreType(MaterializationStoreType.NONE) - .withSchedule(new RecurrenceTrigger().withEndTime("qyki") - .withStartTime("d") - .withTimeZone("aoaf") - .withFrequency(RecurrenceFrequency.MINUTE) - .withInterval(1896459173) - .withSchedule(new RecurrenceSchedule().withHours(Arrays.asList()) - .withMinutes(Arrays.asList()))) - .withNotification( - new NotificationSetting().withEmails(Arrays.asList("v", "xmycjimryvwgcw")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_CANCELLED, - EmailNotificationEnableType.JOB_FAILED)) - .withWebhooks(mapOf("esyds", new Webhook()))) - .withResource(new MaterializationComputeResource().withInstanceType("fo")) - .withSparkConfiguration(mapOf("llklmtk", "bvopwndyqle", "dfjmzsyzfhotlh", "lowkxxpvb", - "yych", "k", "hv", "nsjlpjrtws"))) - .withStage("icphvtrrmhw") - .withEntities(Arrays.asList("dpyflubhv", "glrocuy", "lw"))), - new FeaturesetVersionInner() - .withProperties( - new FeaturesetVersionProperties().withDescription("fzzzwyjafitlhg") - .withTags(mapOf("whmozusgzvlnsnnj", "uchlgmltx", "rag", "fpafolpymwamxq", "vl", - "gdphtvdula", "rupdwvnphcnzq", "jchcsrlzknmzla")) - .withProperties(mapOf("smlzzhzdtxetlgy", "hmqrhvthlaiwdc", "geaar", "lhqvlnnpxybafi", - "lidwcwvmzegjon", "gjekglklby")) - .withIsArchived(true) - .withIsAnonymous(true) - .withSpecification(new FeaturesetSpecification().withPath("fpubntnbatz")) - .withMaterializationSettings(new MaterializationSettings() - .withStoreType(MaterializationStoreType.ONLINE) - .withSchedule(new RecurrenceTrigger().withEndTime("el") - .withStartTime("ttcjuhplrvkmjc") - .withTimeZone("jvlgfggcvkyyliz") - .withFrequency(RecurrenceFrequency.MONTH) - .withInterval(1702744153) - .withSchedule(new RecurrenceSchedule().withHours(Arrays.asList()) - .withMinutes(Arrays.asList()))) - .withNotification( - new NotificationSetting().withEmails(Arrays.asList("psfxsf", "ztlvtmvagbwidqlv")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_FAILED, - EmailNotificationEnableType.JOB_FAILED)) - .withWebhooks(mapOf("fizr", new Webhook(), "jfnmjmvlwyz", new Webhook(), - "iblkujr", new Webhook(), "lfojuidjp", new Webhook()))) - .withResource(new MaterializationComputeResource().withInstanceType("jucejikzoeovvtz")) - .withSparkConfiguration(mapOf("bqzolxr", "tjklntikyjuzk"))) - .withStage("hqjwtrhtgvg") - .withEntities(Arrays.asList("rrkolawjmjs"))))) - .withNextLink("cit"); - model = BinaryData.fromObject(model).toObject(FeaturesetVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("k", model.value().get(0).properties().description()); - Assertions.assertEquals("immoiroqboshbrag", model.value().get(0).properties().tags().get("pyyrmfs")); - Assertions.assertEquals("epvufhbzehew", model.value().get(0).properties().properties().get("oqhnlb")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(true, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals("ewuninvud", model.value().get(0).properties().specification().path()); - Assertions.assertEquals(MaterializationStoreType.ONLINE_AND_OFFLINE, - model.value().get(0).properties().materializationSettings().storeType()); - Assertions.assertEquals("ec", model.value().get(0).properties().materializationSettings().schedule().endTime()); - Assertions.assertEquals("ct", - model.value().get(0).properties().materializationSettings().schedule().startTime()); - Assertions.assertEquals("xdtddmflhuytxzv", - model.value().get(0).properties().materializationSettings().schedule().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.DAY, - model.value().get(0).properties().materializationSettings().schedule().frequency()); - Assertions.assertEquals(709462942, - model.value().get(0).properties().materializationSettings().schedule().interval()); - Assertions.assertEquals("pxbannovvoxc", - model.value().get(0).properties().materializationSettings().notification().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_COMPLETED, - model.value().get(0).properties().materializationSettings().notification().emailOn().get(0)); - Assertions.assertEquals("vevfxz", - model.value().get(0).properties().materializationSettings().resource().instanceType()); - Assertions.assertEquals("hbzxli", - model.value().get(0).properties().materializationSettings().sparkConfiguration().get("hrdd")); - Assertions.assertEquals("m", model.value().get(0).properties().stage()); - Assertions.assertEquals("plfmuvapckccrrvw", model.value().get(0).properties().entities().get(0)); - Assertions.assertEquals("cit", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsBackfillMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsBackfillMockTests.java deleted file mode 100644 index 5759b0c494b98..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsBackfillMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DataAvailabilityStatus; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionBackfillRequest; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersionBackfillResponse; -import com.azure.resourcemanager.machinelearning.models.FeatureWindow; -import com.azure.resourcemanager.machinelearning.models.MaterializationComputeResource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FeaturesetVersionsBackfillMockTests { - @Test - public void testBackfill() throws Exception { - String responseStr = "{\"jobIds\":[\"mmud\",\"ow\",\"bscidkwznw\",\"tlizdoys\"]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - FeaturesetVersionBackfillResponse response = manager.featuresetVersions() - .backfill("qxajsiueaibqjbi", "bwxuypcuriwll", "tclveqdqtzsh", "lwjxrymiysgh", - new FeaturesetVersionBackfillRequest().withDisplayName("mq") - .withDescription("kkw") - .withFeatureWindow( - new FeatureWindow().withFeatureWindowStart(OffsetDateTime.parse("2020-12-23T10:58Z")) - .withFeatureWindowEnd(OffsetDateTime.parse("2021-01-24T18:11:33Z"))) - .withDataAvailabilityStatus( - Arrays.asList(DataAvailabilityStatus.NONE, DataAvailabilityStatus.INCOMPLETE)) - .withJobId("aadnxbss") - .withTags(mapOf("xxccf", "ialrqhw")) - .withResource(new MaterializationComputeResource().withInstanceType("ozaiyvrex")) - .withSparkConfiguration(mapOf("clujyww", "zrikno")) - .withProperties(mapOf("msobuahoki", "usnawbncljk")), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("mmud", response.jobIds().get(0)); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsCreateOrUpdateMockTests.java deleted file mode 100644 index 8c49e9542b43c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights 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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; -import com.azure.resourcemanager.machinelearning.models.FeaturesetSpecification; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersion; -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.Webhook; -import com.azure.resourcemanager.machinelearning.models.WeekDay; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FeaturesetVersionsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"specification\":{\"path\":\"nlcvlmrvhe\"},\"materializationSettings\":{\"storeType\":\"OnlineAndOffline\",\"schedule\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Day\",\"interval\":460923091,\"schedule\":{\"hours\":[1207128416],\"minutes\":[850079120],\"weekDays\":[\"Friday\"],\"monthDays\":[1640588997,1906393199]},\"endTime\":\"d\",\"startTime\":\"talzcjaw\",\"timeZone\":\"xownoypqussxi\"},\"notification\":{\"emails\":[\"rsd\",\"tjxlopncca\"],\"emailOn\":[\"JobCancelled\",\"JobCompleted\",\"JobCancelled\",\"JobCancelled\"],\"webhooks\":{\"ijlwr\":{\"webhookType\":\"Webhook\"}}},\"resource\":{\"instanceType\":\"bzjpgh\"},\"sparkConfiguration\":{\"xi\":\"pceqaklsfxl\",\"xpuokk\":\"ymfqmvnhsfjxtusb\"}},\"stage\":\"tsppgt\",\"entities\":[\"nalpwa\",\"lkw\"],\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"njdrnfgtm\",\"tags\":{\"xufuwcajyezlk\":\"lhnxqvzzi\",\"bpnrgnxwrfu\":\"iveftugiwsvlfp\",\"xzyfqcjc\":\"zaysfzuvu\",\"nazpgvfcubxlmq\":\"vbqovkzueytp\"},\"properties\":{\"yfuupqkrzvdjpcev\":\"bqrlbyh\",\"phhpwxghwwfqzwys\":\"kkgqfjw\"}},\"id\":\"qqmdajsqepxftyi\",\"name\":\"adsliifdrbsrpjsp\",\"type\":\"ib\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - FeaturesetVersion response = manager.featuresetVersions() - .define("dvuotkvkbpmk") - .withExistingFeatureset("z", "bogdj", "uybcp") - .withProperties(new FeaturesetVersionProperties().withDescription("kdihslnbyi") - .withTags(mapOf("wjvxycygcvgebfe", "t", "nsicucqteciexsc", "tyantecvttkgopdj", "jlypwgwbycfam", "hzh", - "irhhbogxw", "ikisppygothi")) - .withProperties( - mapOf("oza", "ymyerpu", "wdkgbzjoyyptno", "utjliwb", "ejzxkflzqwkxxboa", "doqxkzeowizv")) - .withIsArchived(false) - .withIsAnonymous(false) - .withSpecification(new FeaturesetSpecification().withPath("nkcwauylkb")) - .withMaterializationSettings(new MaterializationSettings() - .withStoreType(MaterializationStoreType.ONLINE) - .withSchedule(new RecurrenceTrigger().withEndTime("hyuxxeike") - .withStartTime("pwrnhqaf") - .withTimeZone("vysphjkxgfmes") - .withFrequency(RecurrenceFrequency.MONTH) - .withInterval(1882121848) - .withSchedule(new RecurrenceSchedule().withHours(Arrays.asList(1636152298, 1171310815)) - .withMinutes(Arrays.asList(799567544, 1872935428)) - .withWeekDays(Arrays.asList(WeekDay.SATURDAY, WeekDay.WEDNESDAY)) - .withMonthDays(Arrays.asList(558205337)))) - .withNotification(new NotificationSetting().withEmails(Arrays.asList("qfynvckx", "anlvo", "rvzhdn")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_COMPLETED, - EmailNotificationEnableType.JOB_CANCELLED)) - .withWebhooks(mapOf("ssgq", new Webhook(), "nolspvxpiegxlzd", new Webhook(), "atptzkmfvdrkcw", - new Webhook()))) - .withResource(new MaterializationComputeResource().withInstanceType("nwsffiahf")) - .withSparkConfiguration(mapOf("ozkdqzhr", "zzxirxxk"))) - .withStage("ivvpyznjwmduuzn") - .withEntities(Arrays.asList("zzwsesqy", "ktvofgxorhsxcs", "axcme", "kpxt"))) - .create(); - - Assertions.assertEquals("njdrnfgtm", response.properties().description()); - Assertions.assertEquals("lhnxqvzzi", response.properties().tags().get("xufuwcajyezlk")); - Assertions.assertEquals("bqrlbyh", response.properties().properties().get("yfuupqkrzvdjpcev")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals("nlcvlmrvhe", response.properties().specification().path()); - Assertions.assertEquals(MaterializationStoreType.ONLINE_AND_OFFLINE, - response.properties().materializationSettings().storeType()); - Assertions.assertEquals("d", response.properties().materializationSettings().schedule().endTime()); - Assertions.assertEquals("talzcjaw", response.properties().materializationSettings().schedule().startTime()); - Assertions.assertEquals("xownoypqussxi", response.properties().materializationSettings().schedule().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.DAY, - response.properties().materializationSettings().schedule().frequency()); - Assertions.assertEquals(460923091, response.properties().materializationSettings().schedule().interval()); - Assertions.assertEquals(1207128416, - response.properties().materializationSettings().schedule().schedule().hours().get(0)); - Assertions.assertEquals(850079120, - response.properties().materializationSettings().schedule().schedule().minutes().get(0)); - Assertions.assertEquals(WeekDay.FRIDAY, - response.properties().materializationSettings().schedule().schedule().weekDays().get(0)); - Assertions.assertEquals(1640588997, - response.properties().materializationSettings().schedule().schedule().monthDays().get(0)); - Assertions.assertEquals("rsd", response.properties().materializationSettings().notification().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, - response.properties().materializationSettings().notification().emailOn().get(0)); - Assertions.assertEquals("bzjpgh", response.properties().materializationSettings().resource().instanceType()); - Assertions.assertEquals("pceqaklsfxl", - response.properties().materializationSettings().sparkConfiguration().get("xi")); - Assertions.assertEquals("tsppgt", response.properties().stage()); - Assertions.assertEquals("nalpwa", response.properties().entities().get(0)); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsDeleteMockTests.java deleted file mode 100644 index 50fcbf89107ab..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FeaturesetVersionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.featuresetVersions() - .delete("lj", "ki", "magfyinmajj", "plgtwfkflcvbzkbe", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsGetWithResponseMockTests.java deleted file mode 100644 index 658f5f3caf425..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsGetWithResponseMockTests.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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersion; -import com.azure.resourcemanager.machinelearning.models.MaterializationStoreType; -import com.azure.resourcemanager.machinelearning.models.RecurrenceFrequency; -import com.azure.resourcemanager.machinelearning.models.WeekDay; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FeaturesetVersionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"specification\":{\"path\":\"deoubv\"},\"materializationSettings\":{\"storeType\":\"OnlineAndOffline\",\"schedule\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Day\",\"interval\":1311355901,\"schedule\":{\"hours\":[1757358361,1263017411,513981146],\"minutes\":[2095072946,1962296302],\"weekDays\":[\"Wednesday\",\"Thursday\",\"Saturday\",\"Thursday\"],\"monthDays\":[1281228089,1358126478,1774923631,1733089394]},\"endTime\":\"lbeqczzscgrop\",\"startTime\":\"giscgk\",\"timeZone\":\"iyikqlyoorm\"},\"notification\":{\"emails\":[\"lqijykck\"],\"emailOn\":[\"JobCancelled\"],\"webhooks\":{\"bcpiadjslvxs\":{\"webhookType\":\"Webhook\"},\"lcd\":{\"webhookType\":\"Webhook\"},\"bibfviacghygmt\":{\"webhookType\":\"Webhook\"},\"ivpzjnrw\":{\"webhookType\":\"Webhook\"}}},\"resource\":{\"instanceType\":\"zmxqyj\"},\"sparkConfiguration\":{\"kew\":\"jpy\"}},\"stage\":\"kzmsyezxifjuvhuo\",\"entities\":[\"twvkuhtdxd\",\"odzdh\",\"knmcvmxiun\",\"ifuahtkkccrusrzs\"],\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"ayxnlvt\",\"tags\":{\"wslctilbxnny\":\"o\",\"dfhpelzavohv\":\"jt\",\"liqcbonqjoek\":\"bncdrchuew\",\"xrbalvkfdq\":\"jcglvobctit\"},\"properties\":{\"yrqlazfjltck\":\"rqhxfqkqp\",\"pxalkqlvbkzaiyr\":\"jvdxhyfvqtdexfd\"}},\"id\":\"woi\",\"name\":\"iniyoizuww\",\"type\":\"crigbjbelnqalbs\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - FeaturesetVersion response = manager.featuresetVersions() - .getWithResponse("uafbddm", "fqynmldhgzzohtag", "yuhdqhqgrksypoo", "fxzobovsvhbtdgxg", - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ayxnlvt", response.properties().description()); - Assertions.assertEquals("o", response.properties().tags().get("wslctilbxnny")); - Assertions.assertEquals("rqhxfqkqp", response.properties().properties().get("yrqlazfjltck")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals("deoubv", response.properties().specification().path()); - Assertions.assertEquals(MaterializationStoreType.ONLINE_AND_OFFLINE, - response.properties().materializationSettings().storeType()); - Assertions.assertEquals("lbeqczzscgrop", response.properties().materializationSettings().schedule().endTime()); - Assertions.assertEquals("giscgk", response.properties().materializationSettings().schedule().startTime()); - Assertions.assertEquals("iyikqlyoorm", response.properties().materializationSettings().schedule().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.DAY, - response.properties().materializationSettings().schedule().frequency()); - Assertions.assertEquals(1311355901, response.properties().materializationSettings().schedule().interval()); - Assertions.assertEquals(1757358361, - response.properties().materializationSettings().schedule().schedule().hours().get(0)); - Assertions.assertEquals(2095072946, - response.properties().materializationSettings().schedule().schedule().minutes().get(0)); - Assertions.assertEquals(WeekDay.WEDNESDAY, - response.properties().materializationSettings().schedule().schedule().weekDays().get(0)); - Assertions.assertEquals(1281228089, - response.properties().materializationSettings().schedule().schedule().monthDays().get(0)); - Assertions.assertEquals("lqijykck", - response.properties().materializationSettings().notification().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, - response.properties().materializationSettings().notification().emailOn().get(0)); - Assertions.assertEquals("zmxqyj", response.properties().materializationSettings().resource().instanceType()); - Assertions.assertEquals("jpy", response.properties().materializationSettings().sparkConfiguration().get("kew")); - Assertions.assertEquals("kzmsyezxifjuvhuo", response.properties().stage()); - Assertions.assertEquals("twvkuhtdxd", response.properties().entities().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsListMockTests.java deleted file mode 100644 index eef98e00dcebb..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturesetVersionsListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; -import com.azure.resourcemanager.machinelearning.models.FeaturesetVersion; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.MaterializationStoreType; -import com.azure.resourcemanager.machinelearning.models.RecurrenceFrequency; -import com.azure.resourcemanager.machinelearning.models.WeekDay; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FeaturesetVersionsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"specification\":{\"path\":\"zuimpiybmybtihcg\"},\"materializationSettings\":{\"storeType\":\"None\",\"schedule\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Hour\",\"interval\":754391268,\"schedule\":{\"hours\":[471304798,2070713613],\"minutes\":[78034116,484189663,1618494270],\"weekDays\":[\"Thursday\",\"Monday\",\"Wednesday\"],\"monthDays\":[1881150095,1100953393]},\"endTime\":\"iasichhxqnlmjv\",\"startTime\":\"sdfibwvhw\",\"timeZone\":\"hysrmk\"},\"notification\":{\"emails\":[\"nxzljxaayxpd\",\"vgyujkxjge\",\"zdbigitra\"],\"emailOn\":[\"JobCancelled\"],\"webhooks\":{\"irnbpiddvbxqxoli\":{\"webhookType\":\"Webhook\"}}},\"resource\":{\"instanceType\":\"lsr\"},\"sparkConfiguration\":{\"ktbay\":\"vtzy\",\"lk\":\"asnj\",\"fdssofuxys\":\"yzlkqyezyzxkr\",\"qajfwz\":\"ltkqvikoi\"}},\"stage\":\"fgoqv\",\"entities\":[\"eiydoqbr\"],\"provisioningState\":\"Failed\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"ednkz\",\"tags\":{\"xpkrwgznacmkw\":\"jawpzrtse\"},\"properties\":{\"niadgzxbwn\":\"l\",\"u\":\"yihct\"}},\"id\":\"zozbkh\",\"name\":\"vughutiql\",\"type\":\"vnfyfyftkvzb\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.featuresetVersions() - .list("wjudx", "fvn", "zcffchn", "iyevjeht", "eaoxxsehfl", ListViewType.ARCHIVED_ONLY, 1116596337, "bpyz", - "cplphfstvurtkce", "yvaxwzbwxx", "disxsrrhr", "rbbedrn", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ednkz", response.iterator().next().properties().description()); - Assertions.assertEquals("jawpzrtse", response.iterator().next().properties().tags().get("xpkrwgznacmkw")); - Assertions.assertEquals("l", response.iterator().next().properties().properties().get("niadgzxbwn")); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - Assertions.assertEquals(true, response.iterator().next().properties().isAnonymous()); - Assertions.assertEquals("zuimpiybmybtihcg", response.iterator().next().properties().specification().path()); - Assertions.assertEquals(MaterializationStoreType.NONE, - response.iterator().next().properties().materializationSettings().storeType()); - Assertions.assertEquals("iasichhxqnlmjv", - response.iterator().next().properties().materializationSettings().schedule().endTime()); - Assertions.assertEquals("sdfibwvhw", - response.iterator().next().properties().materializationSettings().schedule().startTime()); - Assertions.assertEquals("hysrmk", - response.iterator().next().properties().materializationSettings().schedule().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.HOUR, - response.iterator().next().properties().materializationSettings().schedule().frequency()); - Assertions.assertEquals(754391268, - response.iterator().next().properties().materializationSettings().schedule().interval()); - Assertions.assertEquals(471304798, - response.iterator().next().properties().materializationSettings().schedule().schedule().hours().get(0)); - Assertions.assertEquals(78034116, - response.iterator().next().properties().materializationSettings().schedule().schedule().minutes().get(0)); - Assertions.assertEquals(WeekDay.THURSDAY, - response.iterator().next().properties().materializationSettings().schedule().schedule().weekDays().get(0)); - Assertions.assertEquals(1881150095, - response.iterator().next().properties().materializationSettings().schedule().schedule().monthDays().get(0)); - Assertions.assertEquals("nxzljxaayxpd", - response.iterator().next().properties().materializationSettings().notification().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, - response.iterator().next().properties().materializationSettings().notification().emailOn().get(0)); - Assertions.assertEquals("lsr", - response.iterator().next().properties().materializationSettings().resource().instanceType()); - Assertions.assertEquals("vtzy", - response.iterator().next().properties().materializationSettings().sparkConfiguration().get("ktbay")); - Assertions.assertEquals("fgoqv", response.iterator().next().properties().stage()); - Assertions.assertEquals("eiydoqbr", response.iterator().next().properties().entities().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainerInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainerInnerTests.java deleted file mode 100644 index 80982e3bc57d1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainerInnerTests.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.FeaturestoreEntityContainerInner; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainerProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FeaturestoreEntityContainerInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeaturestoreEntityContainerInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"latestVersion\":\"scubiwsdrnpxqwod\",\"nextVersion\":\"fjxcjrmmuabwibv\",\"description\":\"gjonmcy\",\"tags\":{\"bamwineo\":\"y\",\"vevboclzh\":\"vfkakpold\",\"gvttx\":\"jknyu\",\"a\":\"nrup\"},\"properties\":{\"swyskbruffg\":\"dixtreki\",\"lcouqehbhbcdszir\":\"lukkutvlxhrpqhvm\"}},\"id\":\"an\",\"name\":\"oypmbltoorm\",\"type\":\"fqlwxldykalsy\"}") - .toObject(FeaturestoreEntityContainerInner.class); - Assertions.assertEquals("gjonmcy", model.properties().description()); - Assertions.assertEquals("y", model.properties().tags().get("bamwineo")); - Assertions.assertEquals("dixtreki", model.properties().properties().get("swyskbruffg")); - Assertions.assertEquals(true, model.properties().isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturestoreEntityContainerInner model = new FeaturestoreEntityContainerInner() - .withProperties(new FeaturestoreEntityContainerProperties().withDescription("gjonmcy") - .withTags(mapOf("bamwineo", "y", "vevboclzh", "vfkakpold", "gvttx", "jknyu", "a", "nrup")) - .withProperties(mapOf("swyskbruffg", "dixtreki", "lcouqehbhbcdszir", "lukkutvlxhrpqhvm")) - .withIsArchived(true)); - model = BinaryData.fromObject(model).toObject(FeaturestoreEntityContainerInner.class); - Assertions.assertEquals("gjonmcy", model.properties().description()); - Assertions.assertEquals("y", model.properties().tags().get("bamwineo")); - Assertions.assertEquals("dixtreki", model.properties().properties().get("swyskbruffg")); - Assertions.assertEquals(true, model.properties().isArchived()); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainerPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainerPropertiesTests.java deleted file mode 100644 index 12af91c10e5d2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainerPropertiesTests.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.FeaturestoreEntityContainerProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FeaturestoreEntityContainerPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeaturestoreEntityContainerProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"pnnbm\",\"nextVersion\":\"sibjgs\",\"description\":\"xxahmrnadzyqegxy\",\"tags\":{\"bjijkgqxnh\":\"inbmh\",\"aujvaa\":\"bkezn\",\"xw\":\"nggiycwkdtaa\",\"rq\":\"ekaum\"},\"properties\":{\"bnxwbjsidbirkf\":\"mqkra\",\"dgo\":\"kso\",\"zkye\":\"ewijymrhbguz\",\"o\":\"nfnzhhh\"}}") - .toObject(FeaturestoreEntityContainerProperties.class); - Assertions.assertEquals("xxahmrnadzyqegxy", model.description()); - Assertions.assertEquals("inbmh", model.tags().get("bjijkgqxnh")); - Assertions.assertEquals("mqkra", model.properties().get("bnxwbjsidbirkf")); - Assertions.assertEquals(false, model.isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturestoreEntityContainerProperties model - = new FeaturestoreEntityContainerProperties().withDescription("xxahmrnadzyqegxy") - .withTags(mapOf("bjijkgqxnh", "inbmh", "aujvaa", "bkezn", "xw", "nggiycwkdtaa", "rq", "ekaum")) - .withProperties(mapOf("bnxwbjsidbirkf", "mqkra", "dgo", "kso", "zkye", "ewijymrhbguz", "o", "nfnzhhh")) - .withIsArchived(false); - model = BinaryData.fromObject(model).toObject(FeaturestoreEntityContainerProperties.class); - Assertions.assertEquals("xxahmrnadzyqegxy", model.description()); - Assertions.assertEquals("inbmh", model.tags().get("bjijkgqxnh")); - Assertions.assertEquals("mqkra", model.properties().get("bnxwbjsidbirkf")); - Assertions.assertEquals(false, model.isArchived()); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainerResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainerResourceArmPaginatedResultTests.java deleted file mode 100644 index 8d9c0bd9778e1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainerResourceArmPaginatedResultTests.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.FeaturestoreEntityContainerInner; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainerProperties; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainerResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FeaturestoreEntityContainerResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeaturestoreEntityContainerResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\",\"isArchived\":true,\"latestVersion\":\"dhga\",\"nextVersion\":\"pirpiwrqof\",\"description\":\"o\",\"tags\":{\"cbjpibkephuu\":\"nlexw\",\"qpbrlc\":\"erctatoyin\"},\"properties\":{\"crrpcjttbstvje\":\"uczkgofxyfsruc\",\"mlghktuidvrmazlp\":\"qnrmvvfko\"}},\"id\":\"wex\",\"name\":\"mzvlazipbh\",\"type\":\"wvqsgny\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"latestVersion\":\"ens\",\"nextVersion\":\"meyyvpkpatlb\",\"description\":\"pzgsk\",\"tags\":{\"xwcdomm\":\"hfvolmknb\"},\"properties\":{\"zfgbrttuiaclkie\":\"qa\",\"hiqfyuttdiy\":\"hajlfn\",\"vnwsw\":\"b\",\"cvogygzyvne\":\"txkyctwwgzwxjlm\"}},\"id\":\"aifghtmoqqt\",\"name\":\"ffhzbkrkjjjavfq\",\"type\":\"vhnqo\"},{\"properties\":{\"provisioningState\":\"Updating\",\"isArchived\":true,\"latestVersion\":\"yetesy\",\"nextVersion\":\"idbz\",\"description\":\"hqtfbovn\",\"tags\":{\"kzyaup\":\"bwetnjuhpsp\",\"vmaonurjt\":\"accxnafbwqroohtu\"},\"properties\":{\"lbl\":\"hihpvecmsl\",\"bsjuscvsfx\":\"jxl\",\"cydrtceukdqkk\":\"gctmgxuupbezq\"}},\"id\":\"hztgeqmgqzgwld\",\"name\":\"ychillcecfe\",\"type\":\"uwaoaguhicqlli\"},{\"properties\":{\"provisioningState\":\"Updating\",\"isArchived\":true,\"latestVersion\":\"jvhrweft\",\"nextVersion\":\"qejpmvssehaepwa\",\"description\":\"xtczhupeuknijd\",\"tags\":{\"ydjfb\":\"es\",\"v\":\"c\",\"uflgbhgauacdixm\":\"hulrtywikdmhla\",\"ryjqgdkf\":\"ufr\"},\"properties\":{\"vjhvefgwbm\":\"oeoq\"}},\"id\":\"c\",\"name\":\"ntasfaymxbu\",\"type\":\"pzealbmqkyojw\"}],\"nextLink\":\"fkmbtsuahxsgxj\"}") - .toObject(FeaturestoreEntityContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("o", model.value().get(0).properties().description()); - Assertions.assertEquals("nlexw", model.value().get(0).properties().tags().get("cbjpibkephuu")); - Assertions.assertEquals("uczkgofxyfsruc", model.value().get(0).properties().properties().get("crrpcjttbstvje")); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("fkmbtsuahxsgxj", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturestoreEntityContainerResourceArmPaginatedResult model - = new FeaturestoreEntityContainerResourceArmPaginatedResult() - .withValue( - Arrays.asList( - new FeaturestoreEntityContainerInner() - .withProperties(new FeaturestoreEntityContainerProperties().withDescription("o") - .withTags(mapOf("cbjpibkephuu", "nlexw", "qpbrlc", "erctatoyin")) - .withProperties( - mapOf("crrpcjttbstvje", "uczkgofxyfsruc", "mlghktuidvrmazlp", "qnrmvvfko")) - .withIsArchived(true)), - new FeaturestoreEntityContainerInner() - .withProperties(new FeaturestoreEntityContainerProperties().withDescription("pzgsk") - .withTags(mapOf("xwcdomm", "hfvolmknb")) - .withProperties(mapOf("zfgbrttuiaclkie", "qa", "hiqfyuttdiy", "hajlfn", "vnwsw", "b", - "cvogygzyvne", "txkyctwwgzwxjlm")) - .withIsArchived(true)), - new FeaturestoreEntityContainerInner() - .withProperties(new FeaturestoreEntityContainerProperties().withDescription("hqtfbovn") - .withTags(mapOf("kzyaup", "bwetnjuhpsp", "vmaonurjt", "accxnafbwqroohtu")) - .withProperties( - mapOf("lbl", "hihpvecmsl", "bsjuscvsfx", "jxl", "cydrtceukdqkk", "gctmgxuupbezq")) - .withIsArchived(true)), - new FeaturestoreEntityContainerInner().withProperties( - new FeaturestoreEntityContainerProperties().withDescription("xtczhupeuknijd") - .withTags(mapOf("ydjfb", "es", "v", "c", "uflgbhgauacdixm", "hulrtywikdmhla", - "ryjqgdkf", "ufr")) - .withProperties(mapOf("vjhvefgwbm", "oeoq")) - .withIsArchived(true)))) - .withNextLink("fkmbtsuahxsgxj"); - model = BinaryData.fromObject(model).toObject(FeaturestoreEntityContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("o", model.value().get(0).properties().description()); - Assertions.assertEquals("nlexw", model.value().get(0).properties().tags().get("cbjpibkephuu")); - Assertions.assertEquals("uczkgofxyfsruc", model.value().get(0).properties().properties().get("crrpcjttbstvje")); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("fkmbtsuahxsgxj", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersCreateOrUpdateMockTests.java deleted file mode 100644 index f7d14448a0786..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersCreateOrUpdateMockTests.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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainer; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainerProperties; -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 reactor.core.publisher.Mono; - -public final class FeaturestoreEntityContainersCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"wxrqiwxeppu\",\"nextVersion\":\"izoak\",\"description\":\"jyv\",\"tags\":{\"s\":\"vfbmxzobpg\",\"ybyilhdbb\":\"lkpajio\",\"t\":\"meuyxhcwu\",\"choji\":\"go\"},\"properties\":{\"frgiplxrifbsbk\":\"q\",\"dbbpoijsxvrutji\":\"fk\",\"ktpj\":\"uufknarscx\"}},\"id\":\"zos\",\"name\":\"rsm\",\"type\":\"nn\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - FeaturestoreEntityContainer response = manager.featurestoreEntityContainers() - .define("jckyocyb") - .withExistingWorkspace("cyulwzjorvsgmkk", "les") - .withProperties(new FeaturestoreEntityContainerProperties().withDescription("uywfhltwlz") - .withTags(mapOf("ybmkmxusm", "iprlcgqewmnwyhq", "uniu", "papepwpbnjckow", "zypmmyr", "ysvnddllbwnmvh")) - .withProperties(mapOf("tltlmczcxouane", "douzohihqlwyqsxe", "pvdmtfcstucmi", "epgqztakovslv", "qitiut", - "sdsnuqqg", "xjkclz", "ka")) - .withIsArchived(true)) - .create(); - - Assertions.assertEquals("jyv", response.properties().description()); - Assertions.assertEquals("vfbmxzobpg", response.properties().tags().get("s")); - Assertions.assertEquals("q", response.properties().properties().get("frgiplxrifbsbk")); - Assertions.assertEquals(false, response.properties().isArchived()); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersDeleteMockTests.java deleted file mode 100644 index ff4f3f76de62e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FeaturestoreEntityContainersDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.featurestoreEntityContainers() - .delete("lmegj", "oseohoygowdzizzu", "d", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersGetEntityWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersGetEntityWithResponseMockTests.java deleted file mode 100644 index 3a1a5c42f35ed..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersGetEntityWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FeaturestoreEntityContainersGetEntityWithResponseMockTests { - @Test - public void testGetEntityWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Creating\",\"isArchived\":true,\"latestVersion\":\"sihdzxeufjybtz\",\"nextVersion\":\"xdmppib\",\"description\":\"qjcphofyoqfvm\",\"tags\":{\"muzltnneolghgte\":\"l\",\"qdtykcaocjuuxqnk\":\"tyxlsycckj\",\"mrwc\":\"c\"},\"properties\":{\"pigla\":\"jcvewlrjrnaktj\",\"hrrxmc\":\"heqjc\"}},\"id\":\"rqnuahhke\",\"name\":\"v\",\"type\":\"rbdujpshiszivr\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - FeaturestoreEntityContainer response = manager.featurestoreEntityContainers() - .getEntityWithResponse("rcppqvovsirtas", "piplpexhhjjatlep", "biroxamnvrcq", - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("qjcphofyoqfvm", response.properties().description()); - Assertions.assertEquals("l", response.properties().tags().get("muzltnneolghgte")); - Assertions.assertEquals("jcvewlrjrnaktj", response.properties().properties().get("pigla")); - Assertions.assertEquals(true, response.properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersListMockTests.java deleted file mode 100644 index 19f9395e6d13b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityContainersListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityContainer; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FeaturestoreEntityContainersListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"isArchived\":true,\"latestVersion\":\"nybnt\",\"nextVersion\":\"w\",\"description\":\"xujzox\",\"tags\":{\"hulxgce\":\"qtkrjucazwedm\",\"anudvqannenxg\":\"x\"},\"properties\":{\"pqifsgzfgxwf\":\"mgblqyfgzb\"}},\"id\":\"iq\",\"name\":\"dsohwnnayo\",\"type\":\"ghjxhpppnksqi\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.featurestoreEntityContainers() - .list("n", "mfooi", "pn", "fvqgcuwgkmqcbr", ListViewType.ACTIVE_ONLY, 785699585, "fuxktsxnikc", "ittfmlp", - "htepasjebrinvfc", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("xujzox", response.iterator().next().properties().description()); - Assertions.assertEquals("qtkrjucazwedm", response.iterator().next().properties().tags().get("hulxgce")); - Assertions.assertEquals("mgblqyfgzb", response.iterator().next().properties().properties().get("pqifsgzfgxwf")); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionInnerTests.java deleted file mode 100644 index 89e29e41dab96..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionInnerTests.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.fluent.models.FeaturestoreEntityVersionInner; -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 org.junit.jupiter.api.Assertions; - -public final class FeaturestoreEntityVersionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeaturestoreEntityVersionInner model = BinaryData.fromString( - "{\"properties\":{\"indexColumns\":[{\"dataType\":\"Float\",\"columnName\":\"xhzzyse\"}],\"stage\":\"sxivzrrryvei\",\"provisioningState\":\"Canceled\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"atvfuzkaftj\",\"tags\":{\"tgrqgdgkkile\":\"uxwigsyeipqdsm\"},\"properties\":{\"baedorvvmqfl\":\"csmknhwt\",\"gdexjd\":\"ygbdgwumgxdgdhpa\"}},\"id\":\"jsaqwotmmwllcols\",\"name\":\"sxap\",\"type\":\"efh\"}") - .toObject(FeaturestoreEntityVersionInner.class); - Assertions.assertEquals("atvfuzkaftj", model.properties().description()); - Assertions.assertEquals("uxwigsyeipqdsm", model.properties().tags().get("tgrqgdgkkile")); - Assertions.assertEquals("csmknhwt", model.properties().properties().get("baedorvvmqfl")); - Assertions.assertEquals(true, model.properties().isArchived()); - Assertions.assertEquals(true, model.properties().isAnonymous()); - Assertions.assertEquals(FeatureDataType.FLOAT, model.properties().indexColumns().get(0).dataType()); - Assertions.assertEquals("xhzzyse", model.properties().indexColumns().get(0).columnName()); - Assertions.assertEquals("sxivzrrryvei", model.properties().stage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturestoreEntityVersionInner model = new FeaturestoreEntityVersionInner() - .withProperties(new FeaturestoreEntityVersionProperties().withDescription("atvfuzkaftj") - .withTags(mapOf("tgrqgdgkkile", "uxwigsyeipqdsm")) - .withProperties(mapOf("baedorvvmqfl", "csmknhwt", "gdexjd", "ygbdgwumgxdgdhpa")) - .withIsArchived(true) - .withIsAnonymous(true) - .withIndexColumns( - Arrays.asList(new IndexColumn().withDataType(FeatureDataType.FLOAT).withColumnName("xhzzyse"))) - .withStage("sxivzrrryvei")); - model = BinaryData.fromObject(model).toObject(FeaturestoreEntityVersionInner.class); - Assertions.assertEquals("atvfuzkaftj", model.properties().description()); - Assertions.assertEquals("uxwigsyeipqdsm", model.properties().tags().get("tgrqgdgkkile")); - Assertions.assertEquals("csmknhwt", model.properties().properties().get("baedorvvmqfl")); - Assertions.assertEquals(true, model.properties().isArchived()); - Assertions.assertEquals(true, model.properties().isAnonymous()); - Assertions.assertEquals(FeatureDataType.FLOAT, model.properties().indexColumns().get(0).dataType()); - Assertions.assertEquals("xhzzyse", model.properties().indexColumns().get(0).columnName()); - Assertions.assertEquals("sxivzrrryvei", model.properties().stage()); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionPropertiesTests.java deleted file mode 100644 index 4f4a75c911be0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionPropertiesTests.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.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 org.junit.jupiter.api.Assertions; - -public final class FeaturestoreEntityVersionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeaturestoreEntityVersionProperties model = BinaryData.fromString( - "{\"indexColumns\":[{\"dataType\":\"Long\",\"columnName\":\"kjljnhv\"},{\"dataType\":\"Boolean\",\"columnName\":\"ek\"},{\"dataType\":\"Datetime\",\"columnName\":\"snbksdqhj\"},{\"dataType\":\"Long\",\"columnName\":\"xeslkhhustcpoqm\"}],\"stage\":\"nwqjwgokn\",\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"b\",\"tags\":{\"ensvkzykjtj\":\"bkjbz\",\"hcdpkupnqrmgj\":\"nsxfwu\",\"fiz\":\"bpkuwxeoio\",\"jzwfb\":\"av\"},\"properties\":{\"mmfz\":\"y\",\"rzx\":\"bfw\"}}") - .toObject(FeaturestoreEntityVersionProperties.class); - Assertions.assertEquals("b", model.description()); - Assertions.assertEquals("bkjbz", model.tags().get("ensvkzykjtj")); - Assertions.assertEquals("y", model.properties().get("mmfz")); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals(true, model.isAnonymous()); - Assertions.assertEquals(FeatureDataType.LONG, model.indexColumns().get(0).dataType()); - Assertions.assertEquals("kjljnhv", model.indexColumns().get(0).columnName()); - Assertions.assertEquals("nwqjwgokn", model.stage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturestoreEntityVersionProperties model = new FeaturestoreEntityVersionProperties().withDescription("b") - .withTags(mapOf("ensvkzykjtj", "bkjbz", "hcdpkupnqrmgj", "nsxfwu", "fiz", "bpkuwxeoio", "jzwfb", "av")) - .withProperties(mapOf("mmfz", "y", "rzx", "bfw")) - .withIsArchived(false) - .withIsAnonymous(true) - .withIndexColumns( - Arrays.asList(new IndexColumn().withDataType(FeatureDataType.LONG).withColumnName("kjljnhv"), - new IndexColumn().withDataType(FeatureDataType.BOOLEAN).withColumnName("ek"), - new IndexColumn().withDataType(FeatureDataType.DATETIME).withColumnName("snbksdqhj"), - new IndexColumn().withDataType(FeatureDataType.LONG).withColumnName("xeslkhhustcpoqm"))) - .withStage("nwqjwgokn"); - model = BinaryData.fromObject(model).toObject(FeaturestoreEntityVersionProperties.class); - Assertions.assertEquals("b", model.description()); - Assertions.assertEquals("bkjbz", model.tags().get("ensvkzykjtj")); - Assertions.assertEquals("y", model.properties().get("mmfz")); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals(true, model.isAnonymous()); - Assertions.assertEquals(FeatureDataType.LONG, model.indexColumns().get(0).dataType()); - Assertions.assertEquals("kjljnhv", model.indexColumns().get(0).columnName()); - Assertions.assertEquals("nwqjwgokn", model.stage()); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionResourceArmPaginatedResultTests.java deleted file mode 100644 index c8dcd9cf95121..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.FeaturestoreEntityVersionInner; -import com.azure.resourcemanager.machinelearning.models.FeatureDataType; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersionProperties; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersionResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.IndexColumn; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FeaturestoreEntityVersionResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeaturestoreEntityVersionResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"indexColumns\":[{\"dataType\":\"Boolean\",\"columnName\":\"ycyarnroohg\"},{\"dataType\":\"Integer\",\"columnName\":\"oghktdpycz\"},{\"dataType\":\"Binary\",\"columnName\":\"ocnhzqrottjzcfyj\"}],\"stage\":\"twrlohapqin\",\"provisioningState\":\"Updating\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"d\",\"tags\":{\"pjby\":\"jzralc\",\"hf\":\"psjoqcjenk\"},\"properties\":{\"jhhhqxu\":\"sqxfxjelgcmpz\",\"oyvivbsiz\":\"yvca\",\"bscm\":\"sjsz\",\"v\":\"lzijiufehgmvflnw\"}},\"id\":\"xrerlniylylyf\",\"name\":\"xzutgqztwhghmupg\",\"type\":\"yjtcdxabbujftab\"},{\"properties\":{\"indexColumns\":[{\"dataType\":\"Long\",\"columnName\":\"qpxzucafeddwwn\"},{\"dataType\":\"String\",\"columnName\":\"wxudgn\"},{\"dataType\":\"Binary\",\"columnName\":\"krtalvn\"}],\"stage\":\"gpbemeluclvdjju\",\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"xahhxhqfaqnvzo\",\"tags\":{\"ejdtxptl\":\"ipemchgavscz\",\"zhomewjjstliu\":\"h\",\"nvodrrs\":\"qawmoaianc\",\"vvbxiwkgfbqljnq\":\"blxydkxr\"},\"properties\":{\"lrqff\":\"chocokulehur\",\"ravjuq\":\"weyurkphyjd\",\"apx\":\"brxmrgch\"}},\"id\":\"y\",\"name\":\"jjk\",\"type\":\"ajb\"},{\"properties\":{\"indexColumns\":[{\"dataType\":\"Boolean\",\"columnName\":\"u\"},{\"dataType\":\"Double\",\"columnName\":\"cblevpmc\"}],\"stage\":\"jy\",\"provisioningState\":\"Updating\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"jgkz\",\"tags\":{\"ovwmbjlzqsczpgvd\":\"afhbzf\"},\"properties\":{\"jtks\":\"pfdqwowftptnu\"}},\"id\":\"gcgqyhleseyqrhvy\",\"name\":\"ldotjvdkwisws\",\"type\":\"ukjtasbvwispkxk\"},{\"properties\":{\"indexColumns\":[{\"dataType\":\"Binary\",\"columnName\":\"dlqvtwknvg\"},{\"dataType\":\"Binary\",\"columnName\":\"gtywatmqaqkue\"},{\"dataType\":\"Double\",\"columnName\":\"oeshoygzcbyfq\"},{\"dataType\":\"Binary\",\"columnName\":\"oytehqpuvjm\"}],\"stage\":\"mtdwcky\",\"provisioningState\":\"Deleting\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"ljdjuskbrreqy\",\"tags\":{\"ysh\":\"eysfaqegplw\",\"ybwptda\":\"ddkvbxgkqu\",\"mt\":\"arvvlfnt\"},\"properties\":{\"r\":\"wenaz\",\"qalsxkd\":\"hzr\",\"vessm\":\"wqapfgsdp\"}},\"id\":\"h\",\"name\":\"uuipldq\",\"type\":\"ctekval\"}],\"nextLink\":\"htjqvqyvw\"}") - .toObject(FeaturestoreEntityVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("d", model.value().get(0).properties().description()); - Assertions.assertEquals("jzralc", model.value().get(0).properties().tags().get("pjby")); - Assertions.assertEquals("sqxfxjelgcmpz", model.value().get(0).properties().properties().get("jhhhqxu")); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(true, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals(FeatureDataType.BOOLEAN, - model.value().get(0).properties().indexColumns().get(0).dataType()); - Assertions.assertEquals("ycyarnroohg", model.value().get(0).properties().indexColumns().get(0).columnName()); - Assertions.assertEquals("twrlohapqin", model.value().get(0).properties().stage()); - Assertions.assertEquals("htjqvqyvw", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturestoreEntityVersionResourceArmPaginatedResult model - = new FeaturestoreEntityVersionResourceArmPaginatedResult() - .withValue(Arrays.asList( - new FeaturestoreEntityVersionInner().withProperties(new FeaturestoreEntityVersionProperties() - .withDescription("d") - .withTags(mapOf("pjby", "jzralc", "hf", "psjoqcjenk")) - .withProperties(mapOf("jhhhqxu", "sqxfxjelgcmpz", "oyvivbsiz", "yvca", "bscm", "sjsz", "v", - "lzijiufehgmvflnw")) - .withIsArchived(true) - .withIsAnonymous(true) - .withIndexColumns(Arrays.asList( - new IndexColumn().withDataType(FeatureDataType.BOOLEAN).withColumnName("ycyarnroohg"), - new IndexColumn().withDataType(FeatureDataType.INTEGER).withColumnName("oghktdpycz"), - new IndexColumn().withDataType(FeatureDataType.BINARY).withColumnName("ocnhzqrottjzcfyj"))) - .withStage("twrlohapqin")), - new FeaturestoreEntityVersionInner() - .withProperties(new FeaturestoreEntityVersionProperties().withDescription("xahhxhqfaqnvzo") - .withTags(mapOf("ejdtxptl", "ipemchgavscz", "zhomewjjstliu", "h", "nvodrrs", "qawmoaianc", - "vvbxiwkgfbqljnq", "blxydkxr")) - .withProperties(mapOf("lrqff", "chocokulehur", "ravjuq", "weyurkphyjd", "apx", "brxmrgch")) - .withIsArchived(true) - .withIsAnonymous(true) - .withIndexColumns(Arrays.asList( - new IndexColumn().withDataType(FeatureDataType.LONG).withColumnName("qpxzucafeddwwn"), - new IndexColumn().withDataType(FeatureDataType.STRING).withColumnName("wxudgn"), - new IndexColumn().withDataType(FeatureDataType.BINARY).withColumnName("krtalvn"))) - .withStage("gpbemeluclvdjju")), - new FeaturestoreEntityVersionInner() - .withProperties(new FeaturestoreEntityVersionProperties().withDescription("jgkz") - .withTags(mapOf("ovwmbjlzqsczpgvd", "afhbzf")) - .withProperties(mapOf("jtks", "pfdqwowftptnu")) - .withIsArchived(true) - .withIsAnonymous(true) - .withIndexColumns(Arrays.asList( - new IndexColumn().withDataType(FeatureDataType.BOOLEAN).withColumnName("u"), - new IndexColumn().withDataType(FeatureDataType.DOUBLE).withColumnName("cblevpmc"))) - .withStage("jy")), - new FeaturestoreEntityVersionInner() - .withProperties(new FeaturestoreEntityVersionProperties().withDescription("ljdjuskbrreqy") - .withTags(mapOf("ysh", "eysfaqegplw", "ybwptda", "ddkvbxgkqu", "mt", "arvvlfnt")) - .withProperties(mapOf("r", "wenaz", "qalsxkd", "hzr", "vessm", "wqapfgsdp")) - .withIsArchived(false) - .withIsAnonymous(true) - .withIndexColumns(Arrays.asList( - new IndexColumn().withDataType(FeatureDataType.BINARY).withColumnName("dlqvtwknvg"), - new IndexColumn().withDataType(FeatureDataType.BINARY).withColumnName("gtywatmqaqkue"), - new IndexColumn().withDataType(FeatureDataType.DOUBLE).withColumnName("oeshoygzcbyfq"), - new IndexColumn().withDataType(FeatureDataType.BINARY).withColumnName("oytehqpuvjm"))) - .withStage("mtdwcky")))) - .withNextLink("htjqvqyvw"); - model = BinaryData.fromObject(model).toObject(FeaturestoreEntityVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("d", model.value().get(0).properties().description()); - Assertions.assertEquals("jzralc", model.value().get(0).properties().tags().get("pjby")); - Assertions.assertEquals("sqxfxjelgcmpz", model.value().get(0).properties().properties().get("jhhhqxu")); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(true, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals(FeatureDataType.BOOLEAN, - model.value().get(0).properties().indexColumns().get(0).dataType()); - Assertions.assertEquals("ycyarnroohg", model.value().get(0).properties().indexColumns().get(0).columnName()); - Assertions.assertEquals("twrlohapqin", model.value().get(0).properties().stage()); - Assertions.assertEquals("htjqvqyvw", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsCreateOrUpdateMockTests.java deleted file mode 100644 index f013b12920d82..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsCreateOrUpdateMockTests.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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.FeatureDataType; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersion; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersionProperties; -import com.azure.resourcemanager.machinelearning.models.IndexColumn; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FeaturestoreEntityVersionsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"indexColumns\":[{\"dataType\":\"Double\",\"columnName\":\"kwsuxrs\"},{\"dataType\":\"String\",\"columnName\":\"uu\"}],\"stage\":\"dcgxnkbwvuwbbz\",\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"cl\",\"tags\":{\"jfyfmjc\":\"r\"},\"properties\":{\"lmeyoncxjevma\":\"ybhsgqiumkt\"}},\"id\":\"rgwtynqbhhfhi\",\"name\":\"wwkhiyubykxzcvut\",\"type\":\"yihpsrjzpvojwjan\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - FeaturestoreEntityVersion response = manager.featurestoreEntityVersions() - .define("razwkcohjxoc") - .withExistingFeaturestoreEntity("bckl", "sxuuksvfsukpk", "ealbckpnnenrcezt") - .withProperties(new FeaturestoreEntityVersionProperties().withDescription("jnadfhheilnh") - .withTags(mapOf("azozo", "uounzzckogc", "diydwklkuamxho", "nyofts", "gmkztwzlwellh", "tnqeonyizqdw", - "vrfuzedudkt", "ppf")) - .withProperties(mapOf("cflhycluou", "watfvjvumim")) - .withIsArchived(false) - .withIsAnonymous(true) - .withIndexColumns( - Arrays.asList(new IndexColumn().withDataType(FeatureDataType.DOUBLE).withColumnName("orhkneu"), - new IndexColumn().withDataType(FeatureDataType.INTEGER).withColumnName("wizznkrarjii"), - new IndexColumn().withDataType(FeatureDataType.FLOAT).withColumnName("chcwhlhdzdcrlf"), - new IndexColumn().withDataType(FeatureDataType.STRING).withColumnName("xypxlzcrtmfvjzcv"))) - .withStage("pde")) - .create(); - - Assertions.assertEquals("cl", response.properties().description()); - Assertions.assertEquals("r", response.properties().tags().get("jfyfmjc")); - Assertions.assertEquals("ybhsgqiumkt", response.properties().properties().get("lmeyoncxjevma")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals(FeatureDataType.DOUBLE, response.properties().indexColumns().get(0).dataType()); - Assertions.assertEquals("kwsuxrs", response.properties().indexColumns().get(0).columnName()); - Assertions.assertEquals("dcgxnkbwvuwbbz", response.properties().stage()); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsDeleteMockTests.java deleted file mode 100644 index 019d9ff409dd9..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FeaturestoreEntityVersionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.featurestoreEntityVersions() - .delete("b", "wsfllzykzp", "jdslpbyejsgbpjjn", "lbkaknivw", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsGetWithResponseMockTests.java deleted file mode 100644 index c81d229a2fb67..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.FeatureDataType; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersion; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FeaturestoreEntityVersionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"indexColumns\":[{\"dataType\":\"Double\",\"columnName\":\"ekdqqwcspfhrndq\"},{\"dataType\":\"Datetime\",\"columnName\":\"s\"}],\"stage\":\"gsdqnqqzqdvg\",\"provisioningState\":\"Canceled\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"nyaarwphbuzmvjil\",\"tags\":{\"jw\":\"mfkctpaiwh\",\"vjdywpfxi\":\"xduwimwn\"},\"properties\":{\"swmyjdbcknso\":\"kmnjt\",\"uvvaitk\":\"tmpdkcbpki\"}},\"id\":\"ndwguss\",\"name\":\"tnppxxeysqenfwug\",\"type\":\"nysemunvzmv\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - FeaturestoreEntityVersion response = manager.featurestoreEntityVersions() - .getWithResponse("ddnddctkjcq", "xdir", "tqilsbabqtjchxsf", "eyleiye", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("nyaarwphbuzmvjil", response.properties().description()); - Assertions.assertEquals("mfkctpaiwh", response.properties().tags().get("jw")); - Assertions.assertEquals("kmnjt", response.properties().properties().get("swmyjdbcknso")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(false, response.properties().isAnonymous()); - Assertions.assertEquals(FeatureDataType.DOUBLE, response.properties().indexColumns().get(0).dataType()); - Assertions.assertEquals("ekdqqwcspfhrndq", response.properties().indexColumns().get(0).columnName()); - Assertions.assertEquals("gsdqnqqzqdvg", response.properties().stage()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsListMockTests.java deleted file mode 100644 index c0d67f09ae45c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturestoreEntityVersionsListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.FeatureDataType; -import com.azure.resourcemanager.machinelearning.models.FeaturestoreEntityVersion; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class FeaturestoreEntityVersionsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"indexColumns\":[{\"dataType\":\"Datetime\",\"columnName\":\"mxpjkuqbng\"}],\"stage\":\"mlxs\",\"provisioningState\":\"Failed\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"xtgqpqfwuplfjkba\",\"tags\":{\"hxbfhbip\":\"seimuipggt\",\"fefznxcleyamv\":\"dziphe\",\"vbtkafcnfitpu\":\"itjjhqvypqgncgw\"},\"properties\":{\"xb\":\"kdwyjdvy\",\"nxbdisjeovgc\":\"wjgyngoudclridql\"}},\"id\":\"chgjonrhdib\",\"name\":\"vpdjytme\",\"type\":\"uiuvkcnqonj\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.featurestoreEntityVersions() - .list("wnwoxve", "wwqchxowppvux", "actoqqehn", "ir", "gnvuolv", ListViewType.ALL, 408724874, "nlbkizebbrwl", - "eq", "isoiqgetzgwywy", "bwuamo", "opqqiyjrehe", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("xtgqpqfwuplfjkba", response.iterator().next().properties().description()); - Assertions.assertEquals("seimuipggt", response.iterator().next().properties().tags().get("hxbfhbip")); - Assertions.assertEquals("kdwyjdvy", response.iterator().next().properties().properties().get("xb")); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); - Assertions.assertEquals(false, response.iterator().next().properties().isAnonymous()); - Assertions.assertEquals(FeatureDataType.DATETIME, - response.iterator().next().properties().indexColumns().get(0).dataType()); - Assertions.assertEquals("mxpjkuqbng", - response.iterator().next().properties().indexColumns().get(0).columnName()); - Assertions.assertEquals("mlxs", response.iterator().next().properties().stage()); - } -} 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 fea23d4afea92..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\":\"auwxsuykznhrfgsl\"}").toObject(FeaturizationSettings.class); - Assertions.assertEquals("auwxsuykznhrfgsl", model.datasetLanguage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturizationSettings model = new FeaturizationSettings().withDatasetLanguage("auwxsuykznhrfgsl"); - model = BinaryData.fromObject(model).toObject(FeaturizationSettings.class); - Assertions.assertEquals("auwxsuykznhrfgsl", model.datasetLanguage()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FixedInputDataTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FixedInputDataTests.java deleted file mode 100644 index 4742da42e9983..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FixedInputDataTests.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.models.FixedInputData; -import com.azure.resourcemanager.machinelearning.models.JobInputType; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FixedInputDataTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FixedInputData model = BinaryData.fromString( - "{\"inputDataType\":\"Fixed\",\"dataContext\":\"dpmtonvhgn\",\"jobInputType\":\"uri_folder\",\"uri\":\"me\",\"columns\":{\"mmmkvavucgjiuaiq\":\"bpjbapm\",\"hr\":\"mnuf\",\"vwlvivjmxmlit\":\"hxwwuzdm\",\"iifef\":\"dsjipdviscotyxb\"}}") - .toObject(FixedInputData.class); - Assertions.assertEquals("dpmtonvhgn", model.dataContext()); - Assertions.assertEquals(JobInputType.URI_FOLDER, model.jobInputType()); - Assertions.assertEquals("me", model.uri()); - Assertions.assertEquals("bpjbapm", model.columns().get("mmmkvavucgjiuaiq")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FixedInputData model = new FixedInputData().withDataContext("dpmtonvhgn") - .withJobInputType(JobInputType.URI_FOLDER) - .withUri("me") - .withColumns(mapOf("mmmkvavucgjiuaiq", "bpjbapm", "hr", "mnuf", "vwlvivjmxmlit", "hxwwuzdm", "iifef", - "dsjipdviscotyxb")); - model = BinaryData.fromObject(model).toObject(FixedInputData.class); - Assertions.assertEquals("dpmtonvhgn", model.dataContext()); - Assertions.assertEquals(JobInputType.URI_FOLDER, model.jobInputType()); - Assertions.assertEquals("me", model.uri()); - Assertions.assertEquals("bpjbapm", model.columns().get("mmmkvavucgjiuaiq")); - } - - // 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/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 da2593a6d20cc..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FlavorDataTests.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.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\":{\"nm\":\"ltxijjumfqwazln\",\"qdqx\":\"jng\",\"zsvtuikzhajqgl\":\"bjwgnyfus\"}}") - .toObject(FlavorData.class); - Assertions.assertEquals("ltxijjumfqwazln", model.data().get("nm")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FlavorData model - = new FlavorData().withData(mapOf("nm", "ltxijjumfqwazln", "qdqx", "jng", "zsvtuikzhajqgl", "bjwgnyfus")); - model = BinaryData.fromObject(model).toObject(FlavorData.class); - Assertions.assertEquals("ltxijjumfqwazln", model.data().get("nm")); - } - - // 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/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 c44ab2c114d3e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingSettingsTests.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.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\":\"tphuykuninttl\",\"timeColumnName\":\"jdszdbuzi\",\"targetLags\":{\"mode\":\"TargetLags\"},\"targetRollingWindowSize\":{\"mode\":\"TargetRollingWindowSize\"},\"forecastHorizon\":{\"mode\":\"ForecastHorizon\"},\"timeSeriesIdColumnNames\":[\"qvgpnewuh\",\"fwjnoxuoxtfn\",\"essfepgckncj\"],\"frequency\":\"vsnvbtqdxfmj\",\"featureLags\":\"None\",\"seasonality\":{\"mode\":\"Seasonality\"},\"shortSeriesHandlingConfig\":\"Pad\",\"useStl\":\"SeasonTrend\",\"targetAggregateFunction\":\"Max\",\"cvStepSize\":1226506395}") - .toObject(ForecastingSettings.class); - Assertions.assertEquals("tphuykuninttl", model.countryOrRegionForHolidays()); - Assertions.assertEquals("jdszdbuzi", model.timeColumnName()); - Assertions.assertEquals("qvgpnewuh", model.timeSeriesIdColumnNames().get(0)); - Assertions.assertEquals("vsnvbtqdxfmj", model.frequency()); - Assertions.assertEquals(FeatureLags.NONE, model.featureLags()); - Assertions.assertEquals(ShortSeriesHandlingConfiguration.PAD, model.shortSeriesHandlingConfig()); - Assertions.assertEquals(UseStl.SEASON_TREND, model.useStl()); - Assertions.assertEquals(TargetAggregationFunction.MAX, model.targetAggregateFunction()); - Assertions.assertEquals(1226506395, model.cvStepSize()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ForecastingSettings model = new ForecastingSettings().withCountryOrRegionForHolidays("tphuykuninttl") - .withTimeColumnName("jdszdbuzi") - .withTargetLags(new TargetLags()) - .withTargetRollingWindowSize(new TargetRollingWindowSize()) - .withForecastHorizon(new ForecastHorizon()) - .withTimeSeriesIdColumnNames(Arrays.asList("qvgpnewuh", "fwjnoxuoxtfn", "essfepgckncj")) - .withFrequency("vsnvbtqdxfmj") - .withFeatureLags(FeatureLags.NONE) - .withSeasonality(new Seasonality()) - .withShortSeriesHandlingConfig(ShortSeriesHandlingConfiguration.PAD) - .withUseStl(UseStl.SEASON_TREND) - .withTargetAggregateFunction(TargetAggregationFunction.MAX) - .withCvStepSize(1226506395); - model = BinaryData.fromObject(model).toObject(ForecastingSettings.class); - Assertions.assertEquals("tphuykuninttl", model.countryOrRegionForHolidays()); - Assertions.assertEquals("jdszdbuzi", model.timeColumnName()); - Assertions.assertEquals("qvgpnewuh", model.timeSeriesIdColumnNames().get(0)); - Assertions.assertEquals("vsnvbtqdxfmj", model.frequency()); - Assertions.assertEquals(FeatureLags.NONE, model.featureLags()); - Assertions.assertEquals(ShortSeriesHandlingConfiguration.PAD, model.shortSeriesHandlingConfig()); - Assertions.assertEquals(UseStl.SEASON_TREND, model.useStl()); - Assertions.assertEquals(TargetAggregationFunction.MAX, model.targetAggregateFunction()); - Assertions.assertEquals(1226506395, model.cvStepSize()); - } -} 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 19341b1a0bde2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingTests.java +++ /dev/null @@ -1,261 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated 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.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\",\"primaryMetric\":\"SpearmanCorrelation\",\"forecastingSettings\":{\"countryOrRegionForHolidays\":\"rqoemwsieeailwdq\",\"timeColumnName\":\"fydeotmfxlkd\",\"targetLags\":{\"mode\":\"TargetLags\"},\"targetRollingWindowSize\":{\"mode\":\"TargetRollingWindowSize\"},\"forecastHorizon\":{\"mode\":\"ForecastHorizon\"},\"timeSeriesIdColumnNames\":[\"mkuuyiuy\",\"afixlxicwgpthd\",\"fmfzcfasfodropa\",\"v\"],\"frequency\":\"tw\",\"featureLags\":\"None\",\"seasonality\":{\"mode\":\"Seasonality\"},\"shortSeriesHandlingConfig\":\"Auto\",\"useStl\":\"None\",\"targetAggregateFunction\":\"Mean\",\"cvStepSize\":1700774376},\"trainingSettings\":{\"allowedTrainingAlgorithms\":[\"ExtremeRandomTrees\",\"SeasonalNaive\",\"TCNForecaster\",\"LassoLars\"],\"blockedTrainingAlgorithms\":[\"GradientBoosting\",\"XGBoostRegressor\",\"ElasticNet\"],\"enableOnnxCompatibleModels\":true,\"stackEnsembleSettings\":{\"stackMetaLearnerType\":\"ElasticNet\",\"stackMetaLearnerTrainPercentage\":66.84514235526332,\"stackMetaLearnerKWargs\":\"dataxlzmiyddee\"},\"enableStackEnsemble\":true,\"enableVoteEnsemble\":false,\"ensembleModelDownloadTimeout\":\"PT182H54M43S\",\"enableModelExplainability\":true,\"enableDnnTraining\":true},\"limitSettings\":{\"maxTrials\":656139727,\"trialTimeout\":\"PT61H59M4S\",\"timeout\":\"PT204H44M19S\",\"maxConcurrentTrials\":1030669826,\"maxCoresPerTrial\":1032949821,\"exitScore\":48.61053148417434,\"enableEarlyTermination\":true},\"nCrossValidations\":{\"mode\":\"NCrossValidations\"},\"cvSplitColumnNames\":[\"pxyazk\",\"pirgzxvbczwhy\"],\"weightColumnName\":\"bthmsritj\",\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"iggrunoz\",\"mode\":\"Direct\",\"description\":\"ljthoiv\"},\"testData\":{\"jobInputType\":\"mltable\",\"uri\":\"wsn\",\"mode\":\"EvalMount\",\"description\":\"ihscjvakmhzbhw\"},\"validationDataSize\":28.61316181159782,\"testDataSize\":4.746102486575632,\"featurizationSettings\":{\"mode\":\"Auto\",\"blockedTransformers\":[\"WordEmbedding\"],\"columnNameAndTypes\":{\"fzs\":\"nuqqkotauratnicp\",\"yrletndqlmf\":\"le\",\"evnoqayrehjuqwva\":\"ggnbbuypwovvvsfl\",\"enqqzlxnqzu\":\"xrlzhpziha\"},\"transformerParams\":{\"gzsdtmwbyorjp\":[{\"fields\":[\"bg\",\"kfwmjcwtewfh\",\"wyrkbrehzlrynjpc\",\"amkaepl\"],\"parameters\":\"datajub\"},{\"fields\":[\"ywevtjrieikmw\",\"aoklfnis\",\"xgucbmtredscnn\",\"tjcyyuv\"],\"parameters\":\"datarx\"},{\"fields\":[\"lecwwtz\"],\"parameters\":\"datacloyhy\"},{\"fields\":[\"idhz\"],\"parameters\":\"datare\"}],\"ifq\":[{\"fields\":[\"ychakvy\",\"fbqvumkxqj\",\"iuepmaxfnzlpqmp\",\"t\"],\"parameters\":\"datafvulb\"},{\"fields\":[\"tuxy\"],\"parameters\":\"datahfcaeo\"}],\"nivrxpfduio\":[{\"fields\":[\"flobhahq\",\"omfecorkfro\",\"gbmxldjmz\",\"zbjesylslur\"],\"parameters\":\"datafygpnyhgd\"},{\"fields\":[\"sc\",\"gqyvouprsytqzss\"],\"parameters\":\"datamgw\"}],\"tewuvcy\":[{\"fields\":[\"qvpbfjpoqzucfzl\",\"czdquurbo\",\"mvhvz\"],\"parameters\":\"datal\"},{\"fields\":[\"nqujywz\",\"qyggmnwsvhb\",\"gqiwy\"],\"parameters\":\"datatobdrrpnre\"},{\"fields\":[\"nsbfjhhlwtpkvege\",\"tt\",\"zkgtzqn\"],\"parameters\":\"datas\"}]},\"enableDnnFeaturization\":true,\"datasetLanguage\":\"fjxflpditfno\"},\"logVerbosity\":\"Warning\",\"trainingData\":{\"jobInputType\":\"mltable\",\"uri\":\"yuxlvrhprrv\",\"mode\":\"EvalMount\",\"description\":\"leqflv\"},\"targetColumnName\":\"rv\"}") - .toObject(Forecasting.class); - Assertions.assertEquals(LogVerbosity.WARNING, model.logVerbosity()); - Assertions.assertEquals("leqflv", model.trainingData().description()); - Assertions.assertEquals("yuxlvrhprrv", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("rv", model.targetColumnName()); - Assertions.assertEquals(ForecastingPrimaryMetrics.SPEARMAN_CORRELATION, model.primaryMetric()); - Assertions.assertEquals("rqoemwsieeailwdq", model.forecastingSettings().countryOrRegionForHolidays()); - Assertions.assertEquals("fydeotmfxlkd", model.forecastingSettings().timeColumnName()); - Assertions.assertEquals("mkuuyiuy", model.forecastingSettings().timeSeriesIdColumnNames().get(0)); - Assertions.assertEquals("tw", model.forecastingSettings().frequency()); - Assertions.assertEquals(FeatureLags.NONE, model.forecastingSettings().featureLags()); - Assertions.assertEquals(ShortSeriesHandlingConfiguration.AUTO, - model.forecastingSettings().shortSeriesHandlingConfig()); - Assertions.assertEquals(UseStl.NONE, model.forecastingSettings().useStl()); - Assertions.assertEquals(TargetAggregationFunction.MEAN, model.forecastingSettings().targetAggregateFunction()); - Assertions.assertEquals(1700774376, model.forecastingSettings().cvStepSize()); - Assertions.assertEquals(true, model.trainingSettings().enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.ELASTIC_NET, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(66.84514235526332D, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(true, model.trainingSettings().enableStackEnsemble()); - Assertions.assertEquals(false, model.trainingSettings().enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT182H54M43S"), - model.trainingSettings().ensembleModelDownloadTimeout()); - Assertions.assertEquals(true, model.trainingSettings().enableModelExplainability()); - Assertions.assertEquals(true, model.trainingSettings().enableDnnTraining()); - Assertions.assertEquals(ForecastingModels.EXTREME_RANDOM_TREES, - model.trainingSettings().allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(ForecastingModels.GRADIENT_BOOSTING, - model.trainingSettings().blockedTrainingAlgorithms().get(0)); - Assertions.assertEquals(656139727, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT61H59M4S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals(Duration.parse("PT204H44M19S"), model.limitSettings().timeout()); - Assertions.assertEquals(1030669826, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1032949821, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(48.61053148417434D, model.limitSettings().exitScore()); - Assertions.assertEquals(true, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals("pxyazk", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("bthmsritj", model.weightColumnName()); - Assertions.assertEquals("ljthoiv", model.validationData().description()); - Assertions.assertEquals("iggrunoz", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.validationData().mode()); - Assertions.assertEquals("ihscjvakmhzbhw", model.testData().description()); - Assertions.assertEquals("wsn", model.testData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.testData().mode()); - Assertions.assertEquals(28.61316181159782D, model.validationDataSize()); - Assertions.assertEquals(4.746102486575632D, model.testDataSize()); - Assertions.assertEquals("fjxflpditfno", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(FeaturizationMode.AUTO, model.featurizationSettings().mode()); - Assertions.assertEquals(BlockedTransformers.WORD_EMBEDDING, - model.featurizationSettings().blockedTransformers().get(0)); - Assertions.assertEquals("nuqqkotauratnicp", model.featurizationSettings().columnNameAndTypes().get("fzs")); - Assertions.assertEquals("bg", - model.featurizationSettings().transformerParams().get("gzsdtmwbyorjp").get(0).fields().get(0)); - Assertions.assertEquals(true, model.featurizationSettings().enableDnnFeaturization()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Forecasting model = new Forecasting().withLogVerbosity(LogVerbosity.WARNING) - .withTrainingData(new MLTableJobInput().withDescription("leqflv") - .withUri("yuxlvrhprrv") - .withMode(InputDeliveryMode.EVAL_MOUNT)) - .withTargetColumnName("rv") - .withPrimaryMetric(ForecastingPrimaryMetrics.SPEARMAN_CORRELATION) - .withForecastingSettings(new ForecastingSettings().withCountryOrRegionForHolidays("rqoemwsieeailwdq") - .withTimeColumnName("fydeotmfxlkd") - .withTargetLags(new TargetLags()) - .withTargetRollingWindowSize(new TargetRollingWindowSize()) - .withForecastHorizon(new ForecastHorizon()) - .withTimeSeriesIdColumnNames(Arrays.asList("mkuuyiuy", "afixlxicwgpthd", "fmfzcfasfodropa", "v")) - .withFrequency("tw") - .withFeatureLags(FeatureLags.NONE) - .withSeasonality(new Seasonality()) - .withShortSeriesHandlingConfig(ShortSeriesHandlingConfiguration.AUTO) - .withUseStl(UseStl.NONE) - .withTargetAggregateFunction(TargetAggregationFunction.MEAN) - .withCvStepSize(1700774376)) - .withTrainingSettings(new ForecastingTrainingSettings().withEnableOnnxCompatibleModels(true) - .withStackEnsembleSettings( - new StackEnsembleSettings().withStackMetaLearnerType(StackMetaLearnerType.ELASTIC_NET) - .withStackMetaLearnerTrainPercentage(66.84514235526332D) - .withStackMetaLearnerKWargs("dataxlzmiyddee")) - .withEnableStackEnsemble(true) - .withEnableVoteEnsemble(false) - .withEnsembleModelDownloadTimeout(Duration.parse("PT182H54M43S")) - .withEnableModelExplainability(true) - .withEnableDnnTraining(true) - .withAllowedTrainingAlgorithms(Arrays.asList(ForecastingModels.EXTREME_RANDOM_TREES, - ForecastingModels.SEASONAL_NAIVE, ForecastingModels.TCNFORECASTER, ForecastingModels.LASSO_LARS)) - .withBlockedTrainingAlgorithms(Arrays.asList(ForecastingModels.GRADIENT_BOOSTING, - ForecastingModels.XGBOOST_REGRESSOR, ForecastingModels.ELASTIC_NET))) - .withLimitSettings(new TableVerticalLimitSettings().withMaxTrials(656139727) - .withTrialTimeout(Duration.parse("PT61H59M4S")) - .withTimeout(Duration.parse("PT204H44M19S")) - .withMaxConcurrentTrials(1030669826) - .withMaxCoresPerTrial(1032949821) - .withExitScore(48.61053148417434D) - .withEnableEarlyTermination(true)) - .withNCrossValidations(new NCrossValidations()) - .withCvSplitColumnNames(Arrays.asList("pxyazk", "pirgzxvbczwhy")) - .withWeightColumnName("bthmsritj") - .withValidationData( - new MLTableJobInput().withDescription("ljthoiv").withUri("iggrunoz").withMode(InputDeliveryMode.DIRECT)) - .withTestData(new MLTableJobInput().withDescription("ihscjvakmhzbhw") - .withUri("wsn") - .withMode(InputDeliveryMode.EVAL_MOUNT)) - .withValidationDataSize(28.61316181159782D) - .withTestDataSize(4.746102486575632D) - .withFeaturizationSettings(new TableVerticalFeaturizationSettings().withDatasetLanguage("fjxflpditfno") - .withMode(FeaturizationMode.AUTO) - .withBlockedTransformers(Arrays.asList(BlockedTransformers.WORD_EMBEDDING)) - .withColumnNameAndTypes(mapOf("fzs", "nuqqkotauratnicp", "yrletndqlmf", "le", "evnoqayrehjuqwva", - "ggnbbuypwovvvsfl", "enqqzlxnqzu", "xrlzhpziha")) - .withTransformerParams(mapOf("gzsdtmwbyorjp", - Arrays.asList( - new ColumnTransformer() - .withFields(Arrays.asList("bg", "kfwmjcwtewfh", "wyrkbrehzlrynjpc", "amkaepl")) - .withParameters("datajub"), - new ColumnTransformer() - .withFields(Arrays.asList("ywevtjrieikmw", "aoklfnis", "xgucbmtredscnn", "tjcyyuv")) - .withParameters("datarx"), - new ColumnTransformer().withFields(Arrays.asList("lecwwtz")).withParameters("datacloyhy"), - new ColumnTransformer().withFields(Arrays.asList("idhz")).withParameters("datare")), - "ifq", - Arrays.asList( - new ColumnTransformer() - .withFields(Arrays.asList("ychakvy", "fbqvumkxqj", "iuepmaxfnzlpqmp", "t")) - .withParameters("datafvulb"), - new ColumnTransformer().withFields(Arrays.asList("tuxy")).withParameters("datahfcaeo")), - "nivrxpfduio", - Arrays.asList( - new ColumnTransformer() - .withFields(Arrays.asList("flobhahq", "omfecorkfro", "gbmxldjmz", "zbjesylslur")) - .withParameters("datafygpnyhgd"), - new ColumnTransformer().withFields(Arrays.asList("sc", "gqyvouprsytqzss")) - .withParameters("datamgw")), - "tewuvcy", - Arrays.asList( - new ColumnTransformer().withFields(Arrays.asList("qvpbfjpoqzucfzl", "czdquurbo", "mvhvz")) - .withParameters("datal"), - new ColumnTransformer().withFields(Arrays.asList("nqujywz", "qyggmnwsvhb", "gqiwy")) - .withParameters("datatobdrrpnre"), - new ColumnTransformer().withFields(Arrays.asList("nsbfjhhlwtpkvege", "tt", "zkgtzqn")) - .withParameters("datas")))) - .withEnableDnnFeaturization(true)); - model = BinaryData.fromObject(model).toObject(Forecasting.class); - Assertions.assertEquals(LogVerbosity.WARNING, model.logVerbosity()); - Assertions.assertEquals("leqflv", model.trainingData().description()); - Assertions.assertEquals("yuxlvrhprrv", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("rv", model.targetColumnName()); - Assertions.assertEquals(ForecastingPrimaryMetrics.SPEARMAN_CORRELATION, model.primaryMetric()); - Assertions.assertEquals("rqoemwsieeailwdq", model.forecastingSettings().countryOrRegionForHolidays()); - Assertions.assertEquals("fydeotmfxlkd", model.forecastingSettings().timeColumnName()); - Assertions.assertEquals("mkuuyiuy", model.forecastingSettings().timeSeriesIdColumnNames().get(0)); - Assertions.assertEquals("tw", model.forecastingSettings().frequency()); - Assertions.assertEquals(FeatureLags.NONE, model.forecastingSettings().featureLags()); - Assertions.assertEquals(ShortSeriesHandlingConfiguration.AUTO, - model.forecastingSettings().shortSeriesHandlingConfig()); - Assertions.assertEquals(UseStl.NONE, model.forecastingSettings().useStl()); - Assertions.assertEquals(TargetAggregationFunction.MEAN, model.forecastingSettings().targetAggregateFunction()); - Assertions.assertEquals(1700774376, model.forecastingSettings().cvStepSize()); - Assertions.assertEquals(true, model.trainingSettings().enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.ELASTIC_NET, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(66.84514235526332D, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(true, model.trainingSettings().enableStackEnsemble()); - Assertions.assertEquals(false, model.trainingSettings().enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT182H54M43S"), - model.trainingSettings().ensembleModelDownloadTimeout()); - Assertions.assertEquals(true, model.trainingSettings().enableModelExplainability()); - Assertions.assertEquals(true, model.trainingSettings().enableDnnTraining()); - Assertions.assertEquals(ForecastingModels.EXTREME_RANDOM_TREES, - model.trainingSettings().allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(ForecastingModels.GRADIENT_BOOSTING, - model.trainingSettings().blockedTrainingAlgorithms().get(0)); - Assertions.assertEquals(656139727, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT61H59M4S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals(Duration.parse("PT204H44M19S"), model.limitSettings().timeout()); - Assertions.assertEquals(1030669826, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1032949821, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(48.61053148417434D, model.limitSettings().exitScore()); - Assertions.assertEquals(true, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals("pxyazk", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("bthmsritj", model.weightColumnName()); - Assertions.assertEquals("ljthoiv", model.validationData().description()); - Assertions.assertEquals("iggrunoz", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.validationData().mode()); - Assertions.assertEquals("ihscjvakmhzbhw", model.testData().description()); - Assertions.assertEquals("wsn", model.testData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.testData().mode()); - Assertions.assertEquals(28.61316181159782D, model.validationDataSize()); - Assertions.assertEquals(4.746102486575632D, model.testDataSize()); - Assertions.assertEquals("fjxflpditfno", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(FeaturizationMode.AUTO, model.featurizationSettings().mode()); - Assertions.assertEquals(BlockedTransformers.WORD_EMBEDDING, - model.featurizationSettings().blockedTransformers().get(0)); - Assertions.assertEquals("nuqqkotauratnicp", model.featurizationSettings().columnNameAndTypes().get("fzs")); - Assertions.assertEquals("bg", - model.featurizationSettings().transformerParams().get("gzsdtmwbyorjp").get(0).fields().get(0)); - Assertions.assertEquals(true, model.featurizationSettings().enableDnnFeaturization()); - } - - // 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/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 3ee8a0dc9b381..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingTrainingSettingsTests.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.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\":[\"SeasonalNaive\",\"SeasonalAverage\",\"SeasonalAverage\"],\"blockedTrainingAlgorithms\":[\"ExponentialSmoothing\"],\"enableOnnxCompatibleModels\":false,\"stackEnsembleSettings\":{\"stackMetaLearnerType\":\"LightGBMClassifier\",\"stackMetaLearnerTrainPercentage\":13.408561162477984,\"stackMetaLearnerKWargs\":\"datakvbos\"},\"enableStackEnsemble\":false,\"enableVoteEnsemble\":false,\"ensembleModelDownloadTimeout\":\"PT27H40M3S\",\"enableModelExplainability\":true,\"enableDnnTraining\":true}") - .toObject(ForecastingTrainingSettings.class); - Assertions.assertEquals(false, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.LIGHT_GBMCLASSIFIER, - model.stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(13.408561162477984D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(false, model.enableStackEnsemble()); - Assertions.assertEquals(false, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT27H40M3S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(true, model.enableModelExplainability()); - Assertions.assertEquals(true, model.enableDnnTraining()); - Assertions.assertEquals(ForecastingModels.SEASONAL_NAIVE, model.allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(ForecastingModels.EXPONENTIAL_SMOOTHING, model.blockedTrainingAlgorithms().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ForecastingTrainingSettings model = new ForecastingTrainingSettings().withEnableOnnxCompatibleModels(false) - .withStackEnsembleSettings( - new StackEnsembleSettings().withStackMetaLearnerType(StackMetaLearnerType.LIGHT_GBMCLASSIFIER) - .withStackMetaLearnerTrainPercentage(13.408561162477984D) - .withStackMetaLearnerKWargs("datakvbos")) - .withEnableStackEnsemble(false) - .withEnableVoteEnsemble(false) - .withEnsembleModelDownloadTimeout(Duration.parse("PT27H40M3S")) - .withEnableModelExplainability(true) - .withEnableDnnTraining(true) - .withAllowedTrainingAlgorithms(Arrays.asList(ForecastingModels.SEASONAL_NAIVE, - ForecastingModels.SEASONAL_AVERAGE, ForecastingModels.SEASONAL_AVERAGE)) - .withBlockedTrainingAlgorithms(Arrays.asList(ForecastingModels.EXPONENTIAL_SMOOTHING)); - model = BinaryData.fromObject(model).toObject(ForecastingTrainingSettings.class); - Assertions.assertEquals(false, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.LIGHT_GBMCLASSIFIER, - model.stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(13.408561162477984D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(false, model.enableStackEnsemble()); - Assertions.assertEquals(false, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT27H40M3S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(true, model.enableModelExplainability()); - Assertions.assertEquals(true, model.enableDnnTraining()); - Assertions.assertEquals(ForecastingModels.SEASONAL_NAIVE, model.allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(ForecastingModels.EXPONENTIAL_SMOOTHING, 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 1678ef64f69ac..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\":1449386799}").toObject(FqdnEndpointDetail.class); - Assertions.assertEquals(1449386799, model.port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FqdnEndpointDetail model = new FqdnEndpointDetail().withPort(1449386799); - model = BinaryData.fromObject(model).toObject(FqdnEndpointDetail.class); - Assertions.assertEquals(1449386799, 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 440265ccd2ace..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointTests.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.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\":\"irels\",\"endpointDetails\":[{\"port\":730394428},{\"port\":1632471353}]}") - .toObject(FqdnEndpoint.class); - Assertions.assertEquals("irels", model.domainName()); - Assertions.assertEquals(730394428, model.endpointDetails().get(0).port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FqdnEndpoint model = new FqdnEndpoint().withDomainName("irels") - .withEndpointDetails(Arrays.asList(new FqdnEndpointDetail().withPort(730394428), - new FqdnEndpointDetail().withPort(1632471353))); - model = BinaryData.fromObject(model).toObject(FqdnEndpoint.class); - Assertions.assertEquals("irels", model.domainName()); - Assertions.assertEquals(730394428, 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 526ca2a4dc6e5..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointsPropertiesTests.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.FqdnEndpoint; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpointDetail; -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\":\"njhf\",\"endpoints\":[{\"domainName\":\"szkkfoqre\",\"endpointDetails\":[{\"port\":648968318},{\"port\":1648570452},{\"port\":498356163},{\"port\":195683064}]},{\"domainName\":\"a\",\"endpointDetails\":[{\"port\":322973840},{\"port\":1950360907},{\"port\":1038031643}]}]}") - .toObject(FqdnEndpointsProperties.class); - Assertions.assertEquals("njhf", model.category()); - Assertions.assertEquals("szkkfoqre", model.endpoints().get(0).domainName()); - Assertions.assertEquals(648968318, model.endpoints().get(0).endpointDetails().get(0).port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FqdnEndpointsProperties model = new FqdnEndpointsProperties().withCategory("njhf") - .withEndpoints(Arrays.asList( - new FqdnEndpoint().withDomainName("szkkfoqre") - .withEndpointDetails(Arrays.asList(new FqdnEndpointDetail().withPort(648968318), - new FqdnEndpointDetail().withPort(1648570452), new FqdnEndpointDetail().withPort(498356163), - new FqdnEndpointDetail().withPort(195683064))), - new FqdnEndpoint().withDomainName("a") - .withEndpointDetails(Arrays.asList(new FqdnEndpointDetail().withPort(322973840), - new FqdnEndpointDetail().withPort(1950360907), - new FqdnEndpointDetail().withPort(1038031643))))); - model = BinaryData.fromObject(model).toObject(FqdnEndpointsProperties.class); - Assertions.assertEquals("njhf", model.category()); - Assertions.assertEquals("szkkfoqre", model.endpoints().get(0).domainName()); - Assertions.assertEquals(648968318, model.endpoints().get(0).endpointDetails().get(0).port()); - } -} 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 e74791131143c..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.FqdnEndpointDetail; -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\":\"stkwqqtch\",\"endpoints\":[{\"domainName\":\"fmtdaaygdvwvgp\",\"endpointDetails\":[{\"port\":976430532},{\"port\":434631779},{\"port\":1822865162}]},{\"domainName\":\"dxepxgyq\",\"endpointDetails\":[{\"port\":1825902686},{\"port\":1104557585},{\"port\":128514806},{\"port\":1947559864}]},{\"domainName\":\"himdbl\",\"endpointDetails\":[{\"port\":1230098756}]}]}}") - .toObject(FqdnEndpoints.class); - Assertions.assertEquals("stkwqqtch", model.properties().category()); - Assertions.assertEquals("fmtdaaygdvwvgp", model.properties().endpoints().get(0).domainName()); - Assertions.assertEquals(976430532, model.properties().endpoints().get(0).endpointDetails().get(0).port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FqdnEndpoints model = new FqdnEndpoints().withProperties(new FqdnEndpointsProperties().withCategory("stkwqqtch") - .withEndpoints(Arrays.asList( - new FqdnEndpoint().withDomainName("fmtdaaygdvwvgp") - .withEndpointDetails(Arrays.asList(new FqdnEndpointDetail().withPort(976430532), - new FqdnEndpointDetail().withPort(434631779), new FqdnEndpointDetail().withPort(1822865162))), - new FqdnEndpoint().withDomainName("dxepxgyq") - .withEndpointDetails(Arrays.asList(new FqdnEndpointDetail().withPort(1825902686), - new FqdnEndpointDetail().withPort(1104557585), new FqdnEndpointDetail().withPort(128514806), - new FqdnEndpointDetail().withPort(1947559864))), - new FqdnEndpoint().withDomainName("himdbl") - .withEndpointDetails(Arrays.asList(new FqdnEndpointDetail().withPort(1230098756)))))); - model = BinaryData.fromObject(model).toObject(FqdnEndpoints.class); - Assertions.assertEquals("stkwqqtch", model.properties().category()); - Assertions.assertEquals("fmtdaaygdvwvgp", model.properties().endpoints().get(0).domainName()); - Assertions.assertEquals(976430532, model.properties().endpoints().get(0).endpointDetails().get(0).port()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnOutboundRuleTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnOutboundRuleTests.java deleted file mode 100644 index 28f818b124a05..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnOutboundRuleTests.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.FqdnOutboundRule; -import com.azure.resourcemanager.machinelearning.models.RuleCategory; -import com.azure.resourcemanager.machinelearning.models.RuleStatus; -import org.junit.jupiter.api.Assertions; - -public final class FqdnOutboundRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FqdnOutboundRule model = BinaryData - .fromString( - "{\"type\":\"FQDN\",\"destination\":\"sfeqbbe\",\"category\":\"Required\",\"status\":\"Active\"}") - .toObject(FqdnOutboundRule.class); - Assertions.assertEquals(RuleCategory.REQUIRED, model.category()); - Assertions.assertEquals(RuleStatus.ACTIVE, model.status()); - Assertions.assertEquals("sfeqbbe", model.destination()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FqdnOutboundRule model = new FqdnOutboundRule().withCategory(RuleCategory.REQUIRED) - .withStatus(RuleStatus.ACTIVE) - .withDestination("sfeqbbe"); - model = BinaryData.fromObject(model).toObject(FqdnOutboundRule.class); - Assertions.assertEquals(RuleCategory.REQUIRED, model.category()); - Assertions.assertEquals(RuleStatus.ACTIVE, model.status()); - Assertions.assertEquals("sfeqbbe", model.destination()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/GetBlobReferenceSasRequestDtoTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/GetBlobReferenceSasRequestDtoTests.java deleted file mode 100644 index 48db3aa77e09d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/GetBlobReferenceSasRequestDtoTests.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.GetBlobReferenceSasRequestDto; -import org.junit.jupiter.api.Assertions; - -public final class GetBlobReferenceSasRequestDtoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GetBlobReferenceSasRequestDto model = BinaryData.fromString("{\"assetId\":\"lgzurig\",\"blobUri\":\"ecxn\"}") - .toObject(GetBlobReferenceSasRequestDto.class); - Assertions.assertEquals("lgzurig", model.assetId()); - Assertions.assertEquals("ecxn", model.blobUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GetBlobReferenceSasRequestDto model - = new GetBlobReferenceSasRequestDto().withAssetId("lgzurig").withBlobUri("ecxn"); - model = BinaryData.fromObject(model).toObject(GetBlobReferenceSasRequestDto.class); - Assertions.assertEquals("lgzurig", model.assetId()); - Assertions.assertEquals("ecxn", model.blobUri()); - } -} 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 dcfaa3f75da8e..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 7bde494299024..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdAssetReferenceTests.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.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\":\"jow\"}").toObject(IdAssetReference.class); - Assertions.assertEquals("jow", model.assetId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IdAssetReference model = new IdAssetReference().withAssetId("jow"); - model = BinaryData.fromObject(model).toObject(IdAssetReference.class); - Assertions.assertEquals("jow", 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 bc70959300ebe..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 48f754db7dfea..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdentityForCmkTests.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.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\":\"o\"}").toObject(IdentityForCmk.class); - Assertions.assertEquals("o", model.userAssignedIdentity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IdentityForCmk model = new IdentityForCmk().withUserAssignedIdentity("o"); - model = BinaryData.fromObject(model).toObject(IdentityForCmk.class); - Assertions.assertEquals("o", 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 b6f33efdf8154..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationBaseTests.java +++ /dev/null @@ -1,312 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated 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\":1122478262,\"validationCropSize\":945558500,\"validationResizeSize\":1406574230,\"weightedLoss\":1632810931,\"amsGradient\":false,\"advancedSettings\":\"zfwugeup\",\"augmentations\":\"necexkgrvfps\",\"beta1\":4.8045993,\"beta2\":81.08034,\"checkpointFrequency\":383318348,\"checkpointRunId\":\"qpdzf\",\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"uri\":\"cnwawoxc\",\"mode\":\"EvalDownload\",\"description\":\"jqfbifop\"},\"distributed\":true,\"earlyStopping\":false,\"earlyStoppingDelay\":299031519,\"earlyStoppingPatience\":280683238,\"evaluationFrequency\":182536431,\"enableOnnxNormalization\":true,\"gradientAccumulationStep\":1311462683,\"layersToFreeze\":1166812452,\"learningRate\":85.73021,\"learningRateScheduler\":\"Step\",\"modelName\":\"uuugtjig\",\"momentum\":52.275288,\"nesterov\":true,\"numberOfEpochs\":1076686728,\"numberOfWorkers\":1071396721,\"optimizer\":\"Adam\",\"randomSeed\":1057852499,\"stepLRGamma\":86.41818,\"stepLRStepSize\":1698348781,\"trainingBatchSize\":124401453,\"validationBatchSize\":1482539415,\"warmupCosineLRCycles\":69.18967,\"warmupCosineLRWarmupEpochs\":1390476760,\"weightDecay\":69.7827},\"searchSpace\":[{\"trainingCropSize\":\"rpvsgloiovs\",\"validationCropSize\":\"ivqsuvwtenb\",\"validationResizeSize\":\"i\",\"weightedLoss\":\"khcyoaqxuk\",\"amsGradient\":\"cjuftekio\",\"augmentations\":\"nd\",\"beta1\":\"wfhvpxjhxzu\",\"beta2\":\"jzabbwz\",\"distributed\":\"zuaixcdckixspsa\",\"earlyStopping\":\"avkmvyxzerejrkpz\",\"earlyStoppingDelay\":\"yetjxryo\",\"earlyStoppingPatience\":\"ae\",\"evaluationFrequency\":\"whlbecgihzbpem\",\"enableOnnxNormalization\":\"rab\",\"gradientAccumulationStep\":\"rwwxywpj\",\"layersToFreeze\":\"pboxhifppsk\",\"learningRate\":\"s\",\"learningRateScheduler\":\"hhmifjuaj\",\"modelName\":\"wvcmmpeglyuq\",\"momentum\":\"m\",\"nesterov\":\"exbzbqufpnezsjza\",\"numberOfEpochs\":\"ldrorhyogzmsimeh\",\"numberOfWorkers\":\"uuwdhtq\",\"optimizer\":\"yhn\",\"randomSeed\":\"xtnsugisn\",\"stepLRGamma\":\"wnwngh\",\"stepLRStepSize\":\"ovke\",\"trainingBatchSize\":\"micjixxfsf\",\"validationBatchSize\":\"rtnuguefxxijteb\",\"warmupCosineLRCycles\":\"eywetkrhlolmcn\",\"warmupCosineLRWarmupEpochs\":\"pfgsvbbvaqdljnp\",\"weightDecay\":\"l\"},{\"trainingCropSize\":\"rdetawevxehuekdx\",\"validationCropSize\":\"zvdov\",\"validationResizeSize\":\"blerlpr\",\"weightedLoss\":\"qccddcbny\",\"amsGradient\":\"jccxwbp\",\"augmentations\":\"ykdigqzlrznda\",\"beta1\":\"nidmjqmvytg\",\"beta2\":\"qlarhqt\",\"distributed\":\"caz\",\"earlyStopping\":\"d\",\"earlyStoppingDelay\":\"zffzjwztsmp\",\"earlyStoppingPatience\":\"ggr\",\"evaluationFrequency\":\"lgf\",\"enableOnnxNormalization\":\"tig\",\"gradientAccumulationStep\":\"frrkdknczgorywnv\",\"layersToFreeze\":\"tv\",\"learningRate\":\"evdlh\",\"learningRateScheduler\":\"bkarbpyhssr\",\"modelName\":\"kpkpkocmacc\",\"momentum\":\"xxopyi\",\"nesterov\":\"vspeslhwyykgvr\",\"numberOfEpochs\":\"pumdd\",\"numberOfWorkers\":\"ajk\",\"optimizer\":\"yddt\",\"randomSeed\":\"c\",\"stepLRGamma\":\"vafnbfbqvenq\",\"stepLRStepSize\":\"hgko\",\"trainingBatchSize\":\"wzejpecwzvcm\",\"validationBatchSize\":\"wdlu\",\"warmupCosineLRCycles\":\"ypr\",\"warmupCosineLRWarmupEpochs\":\"idwmt\",\"weightDecay\":\"bvtzldzchub\"}],\"limitSettings\":{\"maxTrials\":1777593025,\"timeout\":\"PT78H18M45S\",\"maxConcurrentTrials\":1190773271},\"sweepSettings\":{\"samplingAlgorithm\":\"Bayesian\",\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"evaluationInterval\":1889059190,\"delayEvaluation\":482125528}},\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"rbzakpjtcqr\",\"mode\":\"ReadOnlyMount\",\"description\":\"jpsucmxi\"},\"validationDataSize\":94.50327063126527}") - .toObject(ImageClassificationBase.class); - Assertions.assertEquals(1777593025, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT78H18M45S"), model.limitSettings().timeout()); - Assertions.assertEquals(1190773271, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.BAYESIAN, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(1889059190, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(482125528, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("jpsucmxi", model.validationData().description()); - Assertions.assertEquals("rbzakpjtcqr", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals(94.50327063126527D, model.validationDataSize()); - Assertions.assertEquals(false, model.modelSettings().amsGradient()); - Assertions.assertEquals("zfwugeup", model.modelSettings().advancedSettings()); - Assertions.assertEquals("necexkgrvfps", model.modelSettings().augmentations()); - Assertions.assertEquals(4.8045993F, model.modelSettings().beta1()); - Assertions.assertEquals(81.08034F, model.modelSettings().beta2()); - Assertions.assertEquals(383318348, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("qpdzf", model.modelSettings().checkpointRunId()); - Assertions.assertEquals("jqfbifop", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals("cnwawoxc", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals(true, model.modelSettings().distributed()); - Assertions.assertEquals(false, model.modelSettings().earlyStopping()); - Assertions.assertEquals(299031519, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(280683238, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(182536431, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(true, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1311462683, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(1166812452, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(85.73021F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.STEP, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("uuugtjig", model.modelSettings().modelName()); - Assertions.assertEquals(52.275288F, model.modelSettings().momentum()); - Assertions.assertEquals(true, model.modelSettings().nesterov()); - Assertions.assertEquals(1076686728, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(1071396721, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.ADAM, model.modelSettings().optimizer()); - Assertions.assertEquals(1057852499, model.modelSettings().randomSeed()); - Assertions.assertEquals(86.41818F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(1698348781, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(124401453, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(1482539415, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(69.18967F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(1390476760, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(69.7827F, model.modelSettings().weightDecay()); - Assertions.assertEquals(1122478262, model.modelSettings().trainingCropSize()); - Assertions.assertEquals(945558500, model.modelSettings().validationCropSize()); - Assertions.assertEquals(1406574230, model.modelSettings().validationResizeSize()); - Assertions.assertEquals(1632810931, model.modelSettings().weightedLoss()); - Assertions.assertEquals("cjuftekio", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("nd", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("wfhvpxjhxzu", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("jzabbwz", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("zuaixcdckixspsa", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("avkmvyxzerejrkpz", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("yetjxryo", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("ae", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("whlbecgihzbpem", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("rab", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("rwwxywpj", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("pboxhifppsk", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("s", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("hhmifjuaj", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("wvcmmpeglyuq", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("m", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("exbzbqufpnezsjza", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("ldrorhyogzmsimeh", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("uuwdhtq", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("yhn", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("xtnsugisn", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("wnwngh", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("ovke", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("micjixxfsf", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("rtnuguefxxijteb", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("eywetkrhlolmcn", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("pfgsvbbvaqdljnp", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("l", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("rpvsgloiovs", model.searchSpace().get(0).trainingCropSize()); - Assertions.assertEquals("ivqsuvwtenb", model.searchSpace().get(0).validationCropSize()); - Assertions.assertEquals("i", model.searchSpace().get(0).validationResizeSize()); - Assertions.assertEquals("khcyoaqxuk", model.searchSpace().get(0).weightedLoss()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageClassificationBase model - = new ImageClassificationBase() - .withLimitSettings(new ImageLimitSettings().withMaxTrials(1777593025) - .withTimeout(Duration.parse("PT78H18M45S")) - .withMaxConcurrentTrials(1190773271)) - .withSweepSettings( - new ImageSweepSettings().withSamplingAlgorithm(SamplingAlgorithmType.BAYESIAN) - .withEarlyTermination(new EarlyTerminationPolicy().withEvaluationInterval(1889059190) - .withDelayEvaluation(482125528))) - .withValidationData(new MLTableJobInput().withDescription("jpsucmxi") - .withUri("rbzakpjtcqr") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT)) - .withValidationDataSize(94.50327063126527D) - .withModelSettings(new ImageModelSettingsClassification().withAmsGradient(false) - .withAdvancedSettings("zfwugeup") - .withAugmentations("necexkgrvfps") - .withBeta1(4.8045993F) - .withBeta2(81.08034F) - .withCheckpointFrequency(383318348) - .withCheckpointRunId("qpdzf") - .withCheckpointModel(new MLFlowModelJobInput().withDescription("jqfbifop") - .withUri("cnwawoxc") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD)) - .withDistributed(true) - .withEarlyStopping(false) - .withEarlyStoppingDelay(299031519) - .withEarlyStoppingPatience(280683238) - .withEvaluationFrequency(182536431) - .withEnableOnnxNormalization(true) - .withGradientAccumulationStep(1311462683) - .withLayersToFreeze(1166812452) - .withLearningRate(85.73021F) - .withLearningRateScheduler(LearningRateScheduler.STEP) - .withModelName("uuugtjig") - .withMomentum(52.275288F) - .withNesterov(true) - .withNumberOfEpochs(1076686728) - .withNumberOfWorkers(1071396721) - .withOptimizer(StochasticOptimizer.ADAM) - .withRandomSeed(1057852499) - .withStepLRGamma(86.41818F) - .withStepLRStepSize(1698348781) - .withTrainingBatchSize(124401453) - .withValidationBatchSize(1482539415) - .withWarmupCosineLRCycles(69.18967F) - .withWarmupCosineLRWarmupEpochs(1390476760) - .withWeightDecay(69.7827F) - .withTrainingCropSize(1122478262) - .withValidationCropSize(945558500) - .withValidationResizeSize(1406574230) - .withWeightedLoss(1632810931)) - .withSearchSpace(Arrays.asList( - new ImageModelDistributionSettingsClassification().withAmsGradient("cjuftekio") - .withAugmentations("nd") - .withBeta1("wfhvpxjhxzu") - .withBeta2("jzabbwz") - .withDistributed("zuaixcdckixspsa") - .withEarlyStopping("avkmvyxzerejrkpz") - .withEarlyStoppingDelay("yetjxryo") - .withEarlyStoppingPatience("ae") - .withEvaluationFrequency("whlbecgihzbpem") - .withEnableOnnxNormalization("rab") - .withGradientAccumulationStep("rwwxywpj") - .withLayersToFreeze("pboxhifppsk") - .withLearningRate("s") - .withLearningRateScheduler("hhmifjuaj") - .withModelName("wvcmmpeglyuq") - .withMomentum("m") - .withNesterov("exbzbqufpnezsjza") - .withNumberOfEpochs("ldrorhyogzmsimeh") - .withNumberOfWorkers("uuwdhtq") - .withOptimizer("yhn") - .withRandomSeed("xtnsugisn") - .withStepLRGamma("wnwngh") - .withStepLRStepSize("ovke") - .withTrainingBatchSize("micjixxfsf") - .withValidationBatchSize("rtnuguefxxijteb") - .withWarmupCosineLRCycles("eywetkrhlolmcn") - .withWarmupCosineLRWarmupEpochs("pfgsvbbvaqdljnp") - .withWeightDecay("l") - .withTrainingCropSize("rpvsgloiovs") - .withValidationCropSize("ivqsuvwtenb") - .withValidationResizeSize("i") - .withWeightedLoss("khcyoaqxuk"), - new ImageModelDistributionSettingsClassification().withAmsGradient("jccxwbp") - .withAugmentations("ykdigqzlrznda") - .withBeta1("nidmjqmvytg") - .withBeta2("qlarhqt") - .withDistributed("caz") - .withEarlyStopping("d") - .withEarlyStoppingDelay("zffzjwztsmp") - .withEarlyStoppingPatience("ggr") - .withEvaluationFrequency("lgf") - .withEnableOnnxNormalization("tig") - .withGradientAccumulationStep("frrkdknczgorywnv") - .withLayersToFreeze("tv") - .withLearningRate("evdlh") - .withLearningRateScheduler("bkarbpyhssr") - .withModelName("kpkpkocmacc") - .withMomentum("xxopyi") - .withNesterov("vspeslhwyykgvr") - .withNumberOfEpochs("pumdd") - .withNumberOfWorkers("ajk") - .withOptimizer("yddt") - .withRandomSeed("c") - .withStepLRGamma("vafnbfbqvenq") - .withStepLRStepSize("hgko") - .withTrainingBatchSize("wzejpecwzvcm") - .withValidationBatchSize("wdlu") - .withWarmupCosineLRCycles("ypr") - .withWarmupCosineLRWarmupEpochs("idwmt") - .withWeightDecay("bvtzldzchub") - .withTrainingCropSize("rdetawevxehuekdx") - .withValidationCropSize("zvdov") - .withValidationResizeSize("blerlpr") - .withWeightedLoss("qccddcbny"))); - model = BinaryData.fromObject(model).toObject(ImageClassificationBase.class); - Assertions.assertEquals(1777593025, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT78H18M45S"), model.limitSettings().timeout()); - Assertions.assertEquals(1190773271, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.BAYESIAN, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(1889059190, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(482125528, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("jpsucmxi", model.validationData().description()); - Assertions.assertEquals("rbzakpjtcqr", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals(94.50327063126527D, model.validationDataSize()); - Assertions.assertEquals(false, model.modelSettings().amsGradient()); - Assertions.assertEquals("zfwugeup", model.modelSettings().advancedSettings()); - Assertions.assertEquals("necexkgrvfps", model.modelSettings().augmentations()); - Assertions.assertEquals(4.8045993F, model.modelSettings().beta1()); - Assertions.assertEquals(81.08034F, model.modelSettings().beta2()); - Assertions.assertEquals(383318348, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("qpdzf", model.modelSettings().checkpointRunId()); - Assertions.assertEquals("jqfbifop", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals("cnwawoxc", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals(true, model.modelSettings().distributed()); - Assertions.assertEquals(false, model.modelSettings().earlyStopping()); - Assertions.assertEquals(299031519, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(280683238, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(182536431, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(true, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1311462683, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(1166812452, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(85.73021F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.STEP, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("uuugtjig", model.modelSettings().modelName()); - Assertions.assertEquals(52.275288F, model.modelSettings().momentum()); - Assertions.assertEquals(true, model.modelSettings().nesterov()); - Assertions.assertEquals(1076686728, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(1071396721, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.ADAM, model.modelSettings().optimizer()); - Assertions.assertEquals(1057852499, model.modelSettings().randomSeed()); - Assertions.assertEquals(86.41818F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(1698348781, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(124401453, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(1482539415, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(69.18967F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(1390476760, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(69.7827F, model.modelSettings().weightDecay()); - Assertions.assertEquals(1122478262, model.modelSettings().trainingCropSize()); - Assertions.assertEquals(945558500, model.modelSettings().validationCropSize()); - Assertions.assertEquals(1406574230, model.modelSettings().validationResizeSize()); - Assertions.assertEquals(1632810931, model.modelSettings().weightedLoss()); - Assertions.assertEquals("cjuftekio", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("nd", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("wfhvpxjhxzu", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("jzabbwz", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("zuaixcdckixspsa", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("avkmvyxzerejrkpz", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("yetjxryo", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("ae", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("whlbecgihzbpem", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("rab", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("rwwxywpj", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("pboxhifppsk", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("s", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("hhmifjuaj", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("wvcmmpeglyuq", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("m", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("exbzbqufpnezsjza", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("ldrorhyogzmsimeh", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("uuwdhtq", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("yhn", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("xtnsugisn", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("wnwngh", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("ovke", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("micjixxfsf", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("rtnuguefxxijteb", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("eywetkrhlolmcn", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("pfgsvbbvaqdljnp", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("l", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("rpvsgloiovs", model.searchSpace().get(0).trainingCropSize()); - Assertions.assertEquals("ivqsuvwtenb", model.searchSpace().get(0).validationCropSize()); - Assertions.assertEquals("i", model.searchSpace().get(0).validationResizeSize()); - Assertions.assertEquals("khcyoaqxuk", 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 98c86f7c44675..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationMultilabelTests.java +++ /dev/null @@ -1,393 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated 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\":617578345,\"validationCropSize\":102589944,\"validationResizeSize\":1980460749,\"weightedLoss\":1156963756,\"amsGradient\":true,\"advancedSettings\":\"ctcxs\",\"augmentations\":\"bzdxmsynb\",\"beta1\":54.66098,\"beta2\":69.80503,\"checkpointFrequency\":1543500625,\"checkpointRunId\":\"uzmsvzyqrbr\",\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"uri\":\"hj\",\"mode\":\"EvalDownload\",\"description\":\"i\"},\"distributed\":true,\"earlyStopping\":false,\"earlyStoppingDelay\":583009502,\"earlyStoppingPatience\":858094139,\"evaluationFrequency\":1286684068,\"enableOnnxNormalization\":true,\"gradientAccumulationStep\":47403047,\"layersToFreeze\":1160956769,\"learningRate\":47.12773,\"learningRateScheduler\":\"Step\",\"modelName\":\"boz\",\"momentum\":40.360588,\"nesterov\":true,\"numberOfEpochs\":766236373,\"numberOfWorkers\":2064309702,\"optimizer\":\"None\",\"randomSeed\":26532947,\"stepLRGamma\":11.640281,\"stepLRStepSize\":1577359960,\"trainingBatchSize\":1671141270,\"validationBatchSize\":426588698,\"warmupCosineLRCycles\":4.2323647,\"warmupCosineLRWarmupEpochs\":913521751,\"weightDecay\":38.36152},\"searchSpace\":[{\"trainingCropSize\":\"orgfhjxsawooauff\",\"validationCropSize\":\"fqkmwz\",\"validationResizeSize\":\"q\",\"weightedLoss\":\"ybmrnotoc\",\"amsGradient\":\"zdaiovrb\",\"augmentations\":\"pqphk\",\"beta1\":\"yzadcrxylaypdt\",\"beta2\":\"velffohuriw\",\"distributed\":\"dfrwpsshrm\",\"earlyStopping\":\"cclpct\",\"earlyStoppingDelay\":\"gkscxjfsgmosp\",\"earlyStoppingPatience\":\"bnxsqc\",\"evaluationFrequency\":\"scuyfqlamfbqhsuj\",\"enableOnnxNormalization\":\"fu\",\"gradientAccumulationStep\":\"nxqpwnikxkcajgrb\",\"layersToFreeze\":\"tsvgoocqs\",\"learningRate\":\"mzlpcx\",\"learningRateScheduler\":\"mhxxrqicfzfvwjd\",\"modelName\":\"kvpyeyo\",\"momentum\":\"inmpnqupdkjrzfwk\",\"nesterov\":\"uobdxw\",\"numberOfEpochs\":\"dcclcvqsr\",\"numberOfWorkers\":\"ay\",\"optimizer\":\"vwbzmfxlrymf\",\"randomSeed\":\"lpiywqnpfydrfbg\",\"stepLRGamma\":\"y\",\"stepLRStepSize\":\"yxmkhmqyncgaul\",\"trainingBatchSize\":\"styygjq\",\"validationBatchSize\":\"lmwqg\",\"warmupCosineLRCycles\":\"mqmiwxzfvvzu\",\"warmupCosineLRWarmupEpochs\":\"fgufjnbx\",\"weightDecay\":\"mwdukinhl\"},{\"trainingCropSize\":\"gde\",\"validationCropSize\":\"kzou\",\"validationResizeSize\":\"ewwpz\",\"weightedLoss\":\"wcgldohgcandx\",\"amsGradient\":\"hhtestdqt\",\"augmentations\":\"nckkpljdshv\",\"beta1\":\"k\",\"beta2\":\"ccyijjimhi\",\"distributed\":\"rqnjxmvvsduydwnw\",\"earlyStopping\":\"uhhqldrdymnswxie\",\"earlyStoppingDelay\":\"wqnghxnimvyuj\",\"earlyStoppingPatience\":\"gunnqgypuqt\",\"evaluationFrequency\":\"lque\",\"enableOnnxNormalization\":\"mvyumgmmuebsnzn\",\"gradientAccumulationStep\":\"squfmjxcyoseq\",\"layersToFreeze\":\"zisvbrqgcyjpgaw\",\"learningRate\":\"kwonrzpghl\",\"learningRateScheduler\":\"tbgblxbuibrvjzta\",\"modelName\":\"vs\",\"momentum\":\"jihvfjcqrttjfuq\",\"nesterov\":\"fjewfeqbavdo\",\"numberOfEpochs\":\"wy\",\"numberOfWorkers\":\"fm\",\"optimizer\":\"lvxgwzz\",\"randomSeed\":\"dtlcjgpvcqzv\",\"stepLRGamma\":\"b\",\"stepLRStepSize\":\"wx\",\"trainingBatchSize\":\"xrmx\",\"validationBatchSize\":\"drwynbgovazoym\",\"warmupCosineLRCycles\":\"hhplkhww\",\"warmupCosineLRWarmupEpochs\":\"atveqm\",\"weightDecay\":\"cswzeyxrye\"},{\"trainingCropSize\":\"mhpwbukl\",\"validationCropSize\":\"mfasgtlvhqpoilos\",\"validationResizeSize\":\"emcezevftm\",\"weightedLoss\":\"l\",\"amsGradient\":\"kjyghztms\",\"augmentations\":\"wtpcflcezswwvw\",\"beta1\":\"tdjtvbfpfhru\",\"beta2\":\"syqcjnqswxdowum\",\"distributed\":\"ukrcdiohcl\",\"earlyStopping\":\"dnhfknebwedd\",\"earlyStoppingDelay\":\"yzcwy\",\"earlyStoppingPatience\":\"mkaqldqabnwvpaq\",\"evaluationFrequency\":\"xf\",\"enableOnnxNormalization\":\"igcfddofxnf\",\"gradientAccumulationStep\":\"jyyrqaedw\",\"layersToFreeze\":\"ocytjgoeayokrw\",\"learningRate\":\"ihwpadhedbfobd\",\"learningRateScheduler\":\"vothmkhjaoz\",\"modelName\":\"wfcn\",\"momentum\":\"bpoelhscmyhrhjv\",\"nesterov\":\"fqbokndwp\",\"numberOfEpochs\":\"qwojoev\",\"numberOfWorkers\":\"ufytdxmly\",\"optimizer\":\"lyvapbkrbu\",\"randomSeed\":\"gtdltlcuha\",\"stepLRGamma\":\"ijvaylze\",\"stepLRStepSize\":\"lpsftqkrvm\",\"trainingBatchSize\":\"bvvcpw\",\"validationBatchSize\":\"suspnhmzy\",\"warmupCosineLRCycles\":\"fetev\",\"warmupCosineLRWarmupEpochs\":\"tf\",\"weightDecay\":\"wacycsyotctkhf\"},{\"trainingCropSize\":\"satvcs\",\"validationCropSize\":\"mhnmizhvprhqqw\",\"validationResizeSize\":\"blehhkplo\",\"weightedLoss\":\"gottaksad\",\"amsGradient\":\"ghmmtbtdvucfvvra\",\"augmentations\":\"eurdeewlsuxp\",\"beta1\":\"wkdwjyjiznioroof\",\"beta2\":\"taspmcrei\",\"distributed\":\"ftrnighminuwqxu\",\"earlyStopping\":\"robgwfmsxj\",\"earlyStoppingDelay\":\"ylwx\",\"earlyStoppingPatience\":\"zjow\",\"evaluationFrequency\":\"geerclbl\",\"enableOnnxNormalization\":\"hpwachyeu\",\"gradientAccumulationStep\":\"wmvwryvdi\",\"layersToFreeze\":\"ii\",\"learningRate\":\"pruccwme\",\"learningRateScheduler\":\"txsytrtexegwmrq\",\"modelName\":\"wi\",\"momentum\":\"vycfjncindi\",\"nesterov\":\"q\",\"numberOfEpochs\":\"jwjuriarsb\",\"numberOfWorkers\":\"lanhzcknjxizba\",\"optimizer\":\"ygzkztxfexwacyy\",\"randomSeed\":\"lxppd\",\"stepLRGamma\":\"zkf\",\"stepLRStepSize\":\"uiiu\",\"trainingBatchSize\":\"b\",\"validationBatchSize\":\"cjy\",\"warmupCosineLRCycles\":\"dcizeqqfop\",\"warmupCosineLRWarmupEpochs\":\"opmotdsf\",\"weightDecay\":\"xqlyoazyfbkmvl\"}],\"limitSettings\":{\"maxTrials\":1571107486,\"timeout\":\"PT193H51S\",\"maxConcurrentTrials\":2050591523},\"sweepSettings\":{\"samplingAlgorithm\":\"Bayesian\",\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"evaluationInterval\":490867132,\"delayEvaluation\":787891741}},\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"kvhyejth\",\"mode\":\"ReadOnlyMount\",\"description\":\"bpergwlck\"},\"validationDataSize\":60.27486371298584,\"logVerbosity\":\"Error\",\"trainingData\":{\"jobInputType\":\"mltable\",\"uri\":\"qsokknpug\",\"mode\":\"EvalDownload\",\"description\":\"izcrjix\"},\"targetColumnName\":\"j\"}") - .toObject(ImageClassificationMultilabel.class); - Assertions.assertEquals(LogVerbosity.ERROR, model.logVerbosity()); - Assertions.assertEquals("izcrjix", model.trainingData().description()); - Assertions.assertEquals("qsokknpug", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("j", model.targetColumnName()); - Assertions.assertEquals(ClassificationMultilabelPrimaryMetrics.AUCWEIGHTED, model.primaryMetric()); - Assertions.assertEquals(true, model.modelSettings().amsGradient()); - Assertions.assertEquals("ctcxs", model.modelSettings().advancedSettings()); - Assertions.assertEquals("bzdxmsynb", model.modelSettings().augmentations()); - Assertions.assertEquals(54.66098F, model.modelSettings().beta1()); - Assertions.assertEquals(69.80503F, model.modelSettings().beta2()); - Assertions.assertEquals(1543500625, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("uzmsvzyqrbr", model.modelSettings().checkpointRunId()); - Assertions.assertEquals("i", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals("hj", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals(true, model.modelSettings().distributed()); - Assertions.assertEquals(false, model.modelSettings().earlyStopping()); - Assertions.assertEquals(583009502, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(858094139, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(1286684068, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(true, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(47403047, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(1160956769, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(47.12773F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.STEP, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("boz", model.modelSettings().modelName()); - Assertions.assertEquals(40.360588F, model.modelSettings().momentum()); - Assertions.assertEquals(true, model.modelSettings().nesterov()); - Assertions.assertEquals(766236373, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(2064309702, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.modelSettings().optimizer()); - Assertions.assertEquals(26532947, model.modelSettings().randomSeed()); - Assertions.assertEquals(11.640281F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(1577359960, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1671141270, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(426588698, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(4.2323647F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(913521751, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(38.36152F, model.modelSettings().weightDecay()); - Assertions.assertEquals(617578345, model.modelSettings().trainingCropSize()); - Assertions.assertEquals(102589944, model.modelSettings().validationCropSize()); - Assertions.assertEquals(1980460749, model.modelSettings().validationResizeSize()); - Assertions.assertEquals(1156963756, model.modelSettings().weightedLoss()); - Assertions.assertEquals("zdaiovrb", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("pqphk", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("yzadcrxylaypdt", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("velffohuriw", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("dfrwpsshrm", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("cclpct", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("gkscxjfsgmosp", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("bnxsqc", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("scuyfqlamfbqhsuj", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("fu", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("nxqpwnikxkcajgrb", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("tsvgoocqs", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("mzlpcx", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("mhxxrqicfzfvwjd", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("kvpyeyo", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("inmpnqupdkjrzfwk", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("uobdxw", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("dcclcvqsr", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("ay", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("vwbzmfxlrymf", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("lpiywqnpfydrfbg", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("y", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("yxmkhmqyncgaul", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("styygjq", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("lmwqg", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("mqmiwxzfvvzu", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("fgufjnbx", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("mwdukinhl", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("orgfhjxsawooauff", model.searchSpace().get(0).trainingCropSize()); - Assertions.assertEquals("fqkmwz", model.searchSpace().get(0).validationCropSize()); - Assertions.assertEquals("q", model.searchSpace().get(0).validationResizeSize()); - Assertions.assertEquals("ybmrnotoc", model.searchSpace().get(0).weightedLoss()); - Assertions.assertEquals(1571107486, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT193H51S"), model.limitSettings().timeout()); - Assertions.assertEquals(2050591523, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.BAYESIAN, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(490867132, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(787891741, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("bpergwlck", model.validationData().description()); - Assertions.assertEquals("kvhyejth", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals(60.27486371298584D, model.validationDataSize()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageClassificationMultilabel model = new ImageClassificationMultilabel().withLogVerbosity(LogVerbosity.ERROR) - .withTrainingData(new MLTableJobInput().withDescription("izcrjix") - .withUri("qsokknpug") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD)) - .withTargetColumnName("j") - .withPrimaryMetric(ClassificationMultilabelPrimaryMetrics.AUCWEIGHTED) - .withModelSettings(new ImageModelSettingsClassification().withAmsGradient(true) - .withAdvancedSettings("ctcxs") - .withAugmentations("bzdxmsynb") - .withBeta1(54.66098F) - .withBeta2(69.80503F) - .withCheckpointFrequency(1543500625) - .withCheckpointRunId("uzmsvzyqrbr") - .withCheckpointModel(new MLFlowModelJobInput().withDescription("i") - .withUri("hj") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD)) - .withDistributed(true) - .withEarlyStopping(false) - .withEarlyStoppingDelay(583009502) - .withEarlyStoppingPatience(858094139) - .withEvaluationFrequency(1286684068) - .withEnableOnnxNormalization(true) - .withGradientAccumulationStep(47403047) - .withLayersToFreeze(1160956769) - .withLearningRate(47.12773F) - .withLearningRateScheduler(LearningRateScheduler.STEP) - .withModelName("boz") - .withMomentum(40.360588F) - .withNesterov(true) - .withNumberOfEpochs(766236373) - .withNumberOfWorkers(2064309702) - .withOptimizer(StochasticOptimizer.NONE) - .withRandomSeed(26532947) - .withStepLRGamma(11.640281F) - .withStepLRStepSize(1577359960) - .withTrainingBatchSize(1671141270) - .withValidationBatchSize(426588698) - .withWarmupCosineLRCycles(4.2323647F) - .withWarmupCosineLRWarmupEpochs(913521751) - .withWeightDecay(38.36152F) - .withTrainingCropSize(617578345) - .withValidationCropSize(102589944) - .withValidationResizeSize(1980460749) - .withWeightedLoss(1156963756)) - .withSearchSpace(Arrays.asList( - new ImageModelDistributionSettingsClassification().withAmsGradient("zdaiovrb") - .withAugmentations("pqphk") - .withBeta1("yzadcrxylaypdt") - .withBeta2("velffohuriw") - .withDistributed("dfrwpsshrm") - .withEarlyStopping("cclpct") - .withEarlyStoppingDelay("gkscxjfsgmosp") - .withEarlyStoppingPatience("bnxsqc") - .withEvaluationFrequency("scuyfqlamfbqhsuj") - .withEnableOnnxNormalization("fu") - .withGradientAccumulationStep("nxqpwnikxkcajgrb") - .withLayersToFreeze("tsvgoocqs") - .withLearningRate("mzlpcx") - .withLearningRateScheduler("mhxxrqicfzfvwjd") - .withModelName("kvpyeyo") - .withMomentum("inmpnqupdkjrzfwk") - .withNesterov("uobdxw") - .withNumberOfEpochs("dcclcvqsr") - .withNumberOfWorkers("ay") - .withOptimizer("vwbzmfxlrymf") - .withRandomSeed("lpiywqnpfydrfbg") - .withStepLRGamma("y") - .withStepLRStepSize("yxmkhmqyncgaul") - .withTrainingBatchSize("styygjq") - .withValidationBatchSize("lmwqg") - .withWarmupCosineLRCycles("mqmiwxzfvvzu") - .withWarmupCosineLRWarmupEpochs("fgufjnbx") - .withWeightDecay("mwdukinhl") - .withTrainingCropSize("orgfhjxsawooauff") - .withValidationCropSize("fqkmwz") - .withValidationResizeSize("q") - .withWeightedLoss("ybmrnotoc"), - new ImageModelDistributionSettingsClassification().withAmsGradient("hhtestdqt") - .withAugmentations("nckkpljdshv") - .withBeta1("k") - .withBeta2("ccyijjimhi") - .withDistributed("rqnjxmvvsduydwnw") - .withEarlyStopping("uhhqldrdymnswxie") - .withEarlyStoppingDelay("wqnghxnimvyuj") - .withEarlyStoppingPatience("gunnqgypuqt") - .withEvaluationFrequency("lque") - .withEnableOnnxNormalization("mvyumgmmuebsnzn") - .withGradientAccumulationStep("squfmjxcyoseq") - .withLayersToFreeze("zisvbrqgcyjpgaw") - .withLearningRate("kwonrzpghl") - .withLearningRateScheduler("tbgblxbuibrvjzta") - .withModelName("vs") - .withMomentum("jihvfjcqrttjfuq") - .withNesterov("fjewfeqbavdo") - .withNumberOfEpochs("wy") - .withNumberOfWorkers("fm") - .withOptimizer("lvxgwzz") - .withRandomSeed("dtlcjgpvcqzv") - .withStepLRGamma("b") - .withStepLRStepSize("wx") - .withTrainingBatchSize("xrmx") - .withValidationBatchSize("drwynbgovazoym") - .withWarmupCosineLRCycles("hhplkhww") - .withWarmupCosineLRWarmupEpochs("atveqm") - .withWeightDecay("cswzeyxrye") - .withTrainingCropSize("gde") - .withValidationCropSize("kzou") - .withValidationResizeSize("ewwpz") - .withWeightedLoss("wcgldohgcandx"), - new ImageModelDistributionSettingsClassification().withAmsGradient("kjyghztms") - .withAugmentations("wtpcflcezswwvw") - .withBeta1("tdjtvbfpfhru") - .withBeta2("syqcjnqswxdowum") - .withDistributed("ukrcdiohcl") - .withEarlyStopping("dnhfknebwedd") - .withEarlyStoppingDelay("yzcwy") - .withEarlyStoppingPatience("mkaqldqabnwvpaq") - .withEvaluationFrequency("xf") - .withEnableOnnxNormalization("igcfddofxnf") - .withGradientAccumulationStep("jyyrqaedw") - .withLayersToFreeze("ocytjgoeayokrw") - .withLearningRate("ihwpadhedbfobd") - .withLearningRateScheduler("vothmkhjaoz") - .withModelName("wfcn") - .withMomentum("bpoelhscmyhrhjv") - .withNesterov("fqbokndwp") - .withNumberOfEpochs("qwojoev") - .withNumberOfWorkers("ufytdxmly") - .withOptimizer("lyvapbkrbu") - .withRandomSeed("gtdltlcuha") - .withStepLRGamma("ijvaylze") - .withStepLRStepSize("lpsftqkrvm") - .withTrainingBatchSize("bvvcpw") - .withValidationBatchSize("suspnhmzy") - .withWarmupCosineLRCycles("fetev") - .withWarmupCosineLRWarmupEpochs("tf") - .withWeightDecay("wacycsyotctkhf") - .withTrainingCropSize("mhpwbukl") - .withValidationCropSize("mfasgtlvhqpoilos") - .withValidationResizeSize("emcezevftm") - .withWeightedLoss("l"), - new ImageModelDistributionSettingsClassification().withAmsGradient("ghmmtbtdvucfvvra") - .withAugmentations("eurdeewlsuxp") - .withBeta1("wkdwjyjiznioroof") - .withBeta2("taspmcrei") - .withDistributed("ftrnighminuwqxu") - .withEarlyStopping("robgwfmsxj") - .withEarlyStoppingDelay("ylwx") - .withEarlyStoppingPatience("zjow") - .withEvaluationFrequency("geerclbl") - .withEnableOnnxNormalization("hpwachyeu") - .withGradientAccumulationStep("wmvwryvdi") - .withLayersToFreeze("ii") - .withLearningRate("pruccwme") - .withLearningRateScheduler("txsytrtexegwmrq") - .withModelName("wi") - .withMomentum("vycfjncindi") - .withNesterov("q") - .withNumberOfEpochs("jwjuriarsb") - .withNumberOfWorkers("lanhzcknjxizba") - .withOptimizer("ygzkztxfexwacyy") - .withRandomSeed("lxppd") - .withStepLRGamma("zkf") - .withStepLRStepSize("uiiu") - .withTrainingBatchSize("b") - .withValidationBatchSize("cjy") - .withWarmupCosineLRCycles("dcizeqqfop") - .withWarmupCosineLRWarmupEpochs("opmotdsf") - .withWeightDecay("xqlyoazyfbkmvl") - .withTrainingCropSize("satvcs") - .withValidationCropSize("mhnmizhvprhqqw") - .withValidationResizeSize("blehhkplo") - .withWeightedLoss("gottaksad"))) - .withLimitSettings(new ImageLimitSettings().withMaxTrials(1571107486) - .withTimeout(Duration.parse("PT193H51S")) - .withMaxConcurrentTrials(2050591523)) - .withSweepSettings(new ImageSweepSettings().withSamplingAlgorithm(SamplingAlgorithmType.BAYESIAN) - .withEarlyTermination( - new EarlyTerminationPolicy().withEvaluationInterval(490867132).withDelayEvaluation(787891741))) - .withValidationData(new MLTableJobInput().withDescription("bpergwlck") - .withUri("kvhyejth") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT)) - .withValidationDataSize(60.27486371298584D); - model = BinaryData.fromObject(model).toObject(ImageClassificationMultilabel.class); - Assertions.assertEquals(LogVerbosity.ERROR, model.logVerbosity()); - Assertions.assertEquals("izcrjix", model.trainingData().description()); - Assertions.assertEquals("qsokknpug", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("j", model.targetColumnName()); - Assertions.assertEquals(ClassificationMultilabelPrimaryMetrics.AUCWEIGHTED, model.primaryMetric()); - Assertions.assertEquals(true, model.modelSettings().amsGradient()); - Assertions.assertEquals("ctcxs", model.modelSettings().advancedSettings()); - Assertions.assertEquals("bzdxmsynb", model.modelSettings().augmentations()); - Assertions.assertEquals(54.66098F, model.modelSettings().beta1()); - Assertions.assertEquals(69.80503F, model.modelSettings().beta2()); - Assertions.assertEquals(1543500625, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("uzmsvzyqrbr", model.modelSettings().checkpointRunId()); - Assertions.assertEquals("i", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals("hj", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals(true, model.modelSettings().distributed()); - Assertions.assertEquals(false, model.modelSettings().earlyStopping()); - Assertions.assertEquals(583009502, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(858094139, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(1286684068, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(true, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(47403047, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(1160956769, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(47.12773F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.STEP, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("boz", model.modelSettings().modelName()); - Assertions.assertEquals(40.360588F, model.modelSettings().momentum()); - Assertions.assertEquals(true, model.modelSettings().nesterov()); - Assertions.assertEquals(766236373, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(2064309702, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.modelSettings().optimizer()); - Assertions.assertEquals(26532947, model.modelSettings().randomSeed()); - Assertions.assertEquals(11.640281F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(1577359960, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1671141270, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(426588698, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(4.2323647F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(913521751, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(38.36152F, model.modelSettings().weightDecay()); - Assertions.assertEquals(617578345, model.modelSettings().trainingCropSize()); - Assertions.assertEquals(102589944, model.modelSettings().validationCropSize()); - Assertions.assertEquals(1980460749, model.modelSettings().validationResizeSize()); - Assertions.assertEquals(1156963756, model.modelSettings().weightedLoss()); - Assertions.assertEquals("zdaiovrb", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("pqphk", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("yzadcrxylaypdt", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("velffohuriw", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("dfrwpsshrm", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("cclpct", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("gkscxjfsgmosp", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("bnxsqc", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("scuyfqlamfbqhsuj", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("fu", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("nxqpwnikxkcajgrb", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("tsvgoocqs", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("mzlpcx", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("mhxxrqicfzfvwjd", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("kvpyeyo", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("inmpnqupdkjrzfwk", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("uobdxw", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("dcclcvqsr", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("ay", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("vwbzmfxlrymf", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("lpiywqnpfydrfbg", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("y", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("yxmkhmqyncgaul", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("styygjq", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("lmwqg", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("mqmiwxzfvvzu", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("fgufjnbx", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("mwdukinhl", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("orgfhjxsawooauff", model.searchSpace().get(0).trainingCropSize()); - Assertions.assertEquals("fqkmwz", model.searchSpace().get(0).validationCropSize()); - Assertions.assertEquals("q", model.searchSpace().get(0).validationResizeSize()); - Assertions.assertEquals("ybmrnotoc", model.searchSpace().get(0).weightedLoss()); - Assertions.assertEquals(1571107486, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT193H51S"), model.limitSettings().timeout()); - Assertions.assertEquals(2050591523, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.BAYESIAN, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(490867132, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(787891741, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("bpergwlck", model.validationData().description()); - Assertions.assertEquals("kvhyejth", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals(60.27486371298584D, 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 4775d08f446fc..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationTests.java +++ /dev/null @@ -1,299 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated 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\":\"AveragePrecisionScoreWeighted\",\"modelSettings\":{\"trainingCropSize\":1833679290,\"validationCropSize\":381440577,\"validationResizeSize\":1189124637,\"weightedLoss\":2517837,\"amsGradient\":true,\"advancedSettings\":\"uarlcjiwgsxfaioc\",\"augmentations\":\"gujjgn\",\"beta1\":54.415714,\"beta2\":11.673647,\"checkpointFrequency\":1680002171,\"checkpointRunId\":\"cbpaefzqsym\",\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"uri\":\"enjc\",\"mode\":\"EvalDownload\",\"description\":\"mfucrtfod\"},\"distributed\":false,\"earlyStopping\":true,\"earlyStoppingDelay\":1307803742,\"earlyStoppingPatience\":532002430,\"evaluationFrequency\":1547790235,\"enableOnnxNormalization\":false,\"gradientAccumulationStep\":2075191599,\"layersToFreeze\":1027792262,\"learningRate\":20.873022,\"learningRateScheduler\":\"WarmupCosine\",\"modelName\":\"udxdyyrudmahswt\",\"momentum\":75.429596,\"nesterov\":false,\"numberOfEpochs\":1978635992,\"numberOfWorkers\":1173715021,\"optimizer\":\"None\",\"randomSeed\":1829590179,\"stepLRGamma\":37.33512,\"stepLRStepSize\":230541163,\"trainingBatchSize\":1518427810,\"validationBatchSize\":1851126067,\"warmupCosineLRCycles\":98.75179,\"warmupCosineLRWarmupEpochs\":453414511,\"weightDecay\":4.1702747},\"searchSpace\":[{\"trainingCropSize\":\"anx\",\"validationCropSize\":\"muvardlmzjot\",\"validationResizeSize\":\"rmuhcuhtuzlx\",\"weightedLoss\":\"yo\",\"amsGradient\":\"arpfctwrap\",\"augmentations\":\"dojq\",\"beta1\":\"zesi\",\"beta2\":\"ysnjqyowaadc\",\"distributed\":\"azab\",\"earlyStopping\":\"dtsewkaupwhlzyc\",\"earlyStoppingDelay\":\"emgjlm\",\"earlyStoppingPatience\":\"dorsirxxhy\",\"evaluationFrequency\":\"qakofajf\",\"enableOnnxNormalization\":\"prfvmkinwteyrqsh\",\"gradientAccumulationStep\":\"bcejopylbl\",\"layersToFreeze\":\"prrw\",\"learningRate\":\"pimtc\",\"learningRateScheduler\":\"fx\",\"modelName\":\"ytzfsl\",\"momentum\":\"zhqikm\",\"nesterov\":\"bliqemcdiiiskl\",\"numberOfEpochs\":\"nxx\",\"numberOfWorkers\":\"jxvtrkfkgenjqnnp\",\"optimizer\":\"kosnyxigfoujjc\",\"randomSeed\":\"dqmrlhnzkwopsw\",\"stepLRGamma\":\"inxupr\",\"stepLRStepSize\":\"yxwjezb\",\"trainingBatchSize\":\"ployuekdcpvu\",\"validationBatchSize\":\"rsvjmnsvujnjktv\",\"warmupCosineLRCycles\":\"efcjisepkdbxot\",\"warmupCosineLRWarmupEpochs\":\"jampqoclannm\",\"weightDecay\":\"nlsuqbwzstr\"}],\"limitSettings\":{\"maxTrials\":803234002,\"timeout\":\"PT72H6M3S\",\"maxConcurrentTrials\":1698507772},\"sweepSettings\":{\"samplingAlgorithm\":\"Bayesian\",\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"evaluationInterval\":2016687082,\"delayEvaluation\":336030670}},\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"nfhoksmmcul\",\"mode\":\"Download\",\"description\":\"cru\"},\"validationDataSize\":67.1284830438322,\"logVerbosity\":\"Warning\",\"trainingData\":{\"jobInputType\":\"mltable\",\"uri\":\"lsgaojbtqpq\",\"mode\":\"ReadWriteMount\",\"description\":\"tpzp\"},\"targetColumnName\":\"zflmcdsgxcelujis\"}") - .toObject(ImageClassification.class); - Assertions.assertEquals(LogVerbosity.WARNING, model.logVerbosity()); - Assertions.assertEquals("tpzp", model.trainingData().description()); - Assertions.assertEquals("lsgaojbtqpq", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("zflmcdsgxcelujis", model.targetColumnName()); - Assertions.assertEquals(ClassificationPrimaryMetrics.AVERAGE_PRECISION_SCORE_WEIGHTED, model.primaryMetric()); - Assertions.assertEquals(true, model.modelSettings().amsGradient()); - Assertions.assertEquals("uarlcjiwgsxfaioc", model.modelSettings().advancedSettings()); - Assertions.assertEquals("gujjgn", model.modelSettings().augmentations()); - Assertions.assertEquals(54.415714F, model.modelSettings().beta1()); - Assertions.assertEquals(11.673647F, model.modelSettings().beta2()); - Assertions.assertEquals(1680002171, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("cbpaefzqsym", model.modelSettings().checkpointRunId()); - Assertions.assertEquals("mfucrtfod", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals("enjc", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals(false, model.modelSettings().distributed()); - Assertions.assertEquals(true, model.modelSettings().earlyStopping()); - Assertions.assertEquals(1307803742, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(532002430, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(1547790235, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(false, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(2075191599, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(1027792262, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(20.873022F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.WARMUP_COSINE, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("udxdyyrudmahswt", model.modelSettings().modelName()); - Assertions.assertEquals(75.429596F, model.modelSettings().momentum()); - Assertions.assertEquals(false, model.modelSettings().nesterov()); - Assertions.assertEquals(1978635992, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(1173715021, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.modelSettings().optimizer()); - Assertions.assertEquals(1829590179, model.modelSettings().randomSeed()); - Assertions.assertEquals(37.33512F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(230541163, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1518427810, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(1851126067, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(98.75179F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(453414511, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(4.1702747F, model.modelSettings().weightDecay()); - Assertions.assertEquals(1833679290, model.modelSettings().trainingCropSize()); - Assertions.assertEquals(381440577, model.modelSettings().validationCropSize()); - Assertions.assertEquals(1189124637, model.modelSettings().validationResizeSize()); - Assertions.assertEquals(2517837, model.modelSettings().weightedLoss()); - Assertions.assertEquals("arpfctwrap", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("dojq", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("zesi", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("ysnjqyowaadc", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("azab", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("dtsewkaupwhlzyc", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("emgjlm", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("dorsirxxhy", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("qakofajf", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("prfvmkinwteyrqsh", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("bcejopylbl", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("prrw", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("pimtc", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("fx", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("ytzfsl", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("zhqikm", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("bliqemcdiiiskl", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("nxx", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("jxvtrkfkgenjqnnp", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("kosnyxigfoujjc", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("dqmrlhnzkwopsw", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("inxupr", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("yxwjezb", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("ployuekdcpvu", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("rsvjmnsvujnjktv", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("efcjisepkdbxot", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("jampqoclannm", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("nlsuqbwzstr", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("anx", model.searchSpace().get(0).trainingCropSize()); - Assertions.assertEquals("muvardlmzjot", model.searchSpace().get(0).validationCropSize()); - Assertions.assertEquals("rmuhcuhtuzlx", model.searchSpace().get(0).validationResizeSize()); - Assertions.assertEquals("yo", model.searchSpace().get(0).weightedLoss()); - Assertions.assertEquals(803234002, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT72H6M3S"), model.limitSettings().timeout()); - Assertions.assertEquals(1698507772, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.BAYESIAN, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(2016687082, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(336030670, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("cru", model.validationData().description()); - Assertions.assertEquals("nfhoksmmcul", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals(67.1284830438322D, model.validationDataSize()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageClassification model - = new ImageClassification().withLogVerbosity(LogVerbosity.WARNING) - .withTrainingData(new MLTableJobInput().withDescription("tpzp") - .withUri("lsgaojbtqpq") - .withMode(InputDeliveryMode.READ_WRITE_MOUNT)) - .withTargetColumnName("zflmcdsgxcelujis") - .withPrimaryMetric(ClassificationPrimaryMetrics.AVERAGE_PRECISION_SCORE_WEIGHTED) - .withModelSettings(new ImageModelSettingsClassification().withAmsGradient(true) - .withAdvancedSettings("uarlcjiwgsxfaioc") - .withAugmentations("gujjgn") - .withBeta1(54.415714F) - .withBeta2(11.673647F) - .withCheckpointFrequency(1680002171) - .withCheckpointRunId("cbpaefzqsym") - .withCheckpointModel(new MLFlowModelJobInput().withDescription("mfucrtfod") - .withUri("enjc") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD)) - .withDistributed(false) - .withEarlyStopping(true) - .withEarlyStoppingDelay(1307803742) - .withEarlyStoppingPatience(532002430) - .withEvaluationFrequency(1547790235) - .withEnableOnnxNormalization(false) - .withGradientAccumulationStep(2075191599) - .withLayersToFreeze(1027792262) - .withLearningRate(20.873022F) - .withLearningRateScheduler(LearningRateScheduler.WARMUP_COSINE) - .withModelName("udxdyyrudmahswt") - .withMomentum(75.429596F) - .withNesterov(false) - .withNumberOfEpochs(1978635992) - .withNumberOfWorkers(1173715021) - .withOptimizer(StochasticOptimizer.NONE) - .withRandomSeed(1829590179) - .withStepLRGamma(37.33512F) - .withStepLRStepSize(230541163) - .withTrainingBatchSize(1518427810) - .withValidationBatchSize(1851126067) - .withWarmupCosineLRCycles(98.75179F) - .withWarmupCosineLRWarmupEpochs(453414511) - .withWeightDecay(4.1702747F) - .withTrainingCropSize(1833679290) - .withValidationCropSize(381440577) - .withValidationResizeSize(1189124637) - .withWeightedLoss(2517837)) - .withSearchSpace( - Arrays.asList(new ImageModelDistributionSettingsClassification().withAmsGradient("arpfctwrap") - .withAugmentations("dojq") - .withBeta1("zesi") - .withBeta2("ysnjqyowaadc") - .withDistributed("azab") - .withEarlyStopping("dtsewkaupwhlzyc") - .withEarlyStoppingDelay("emgjlm") - .withEarlyStoppingPatience("dorsirxxhy") - .withEvaluationFrequency("qakofajf") - .withEnableOnnxNormalization("prfvmkinwteyrqsh") - .withGradientAccumulationStep("bcejopylbl") - .withLayersToFreeze("prrw") - .withLearningRate("pimtc") - .withLearningRateScheduler("fx") - .withModelName("ytzfsl") - .withMomentum("zhqikm") - .withNesterov("bliqemcdiiiskl") - .withNumberOfEpochs("nxx") - .withNumberOfWorkers("jxvtrkfkgenjqnnp") - .withOptimizer("kosnyxigfoujjc") - .withRandomSeed("dqmrlhnzkwopsw") - .withStepLRGamma("inxupr") - .withStepLRStepSize("yxwjezb") - .withTrainingBatchSize("ployuekdcpvu") - .withValidationBatchSize("rsvjmnsvujnjktv") - .withWarmupCosineLRCycles("efcjisepkdbxot") - .withWarmupCosineLRWarmupEpochs("jampqoclannm") - .withWeightDecay("nlsuqbwzstr") - .withTrainingCropSize("anx") - .withValidationCropSize("muvardlmzjot") - .withValidationResizeSize("rmuhcuhtuzlx") - .withWeightedLoss("yo"))) - .withLimitSettings(new ImageLimitSettings().withMaxTrials(803234002) - .withTimeout(Duration.parse("PT72H6M3S")) - .withMaxConcurrentTrials(1698507772)) - .withSweepSettings( - new ImageSweepSettings().withSamplingAlgorithm(SamplingAlgorithmType.BAYESIAN) - .withEarlyTermination(new EarlyTerminationPolicy().withEvaluationInterval(2016687082) - .withDelayEvaluation(336030670))) - .withValidationData(new MLTableJobInput().withDescription("cru") - .withUri("nfhoksmmcul") - .withMode(InputDeliveryMode.DOWNLOAD)) - .withValidationDataSize(67.1284830438322D); - model = BinaryData.fromObject(model).toObject(ImageClassification.class); - Assertions.assertEquals(LogVerbosity.WARNING, model.logVerbosity()); - Assertions.assertEquals("tpzp", model.trainingData().description()); - Assertions.assertEquals("lsgaojbtqpq", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("zflmcdsgxcelujis", model.targetColumnName()); - Assertions.assertEquals(ClassificationPrimaryMetrics.AVERAGE_PRECISION_SCORE_WEIGHTED, model.primaryMetric()); - Assertions.assertEquals(true, model.modelSettings().amsGradient()); - Assertions.assertEquals("uarlcjiwgsxfaioc", model.modelSettings().advancedSettings()); - Assertions.assertEquals("gujjgn", model.modelSettings().augmentations()); - Assertions.assertEquals(54.415714F, model.modelSettings().beta1()); - Assertions.assertEquals(11.673647F, model.modelSettings().beta2()); - Assertions.assertEquals(1680002171, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("cbpaefzqsym", model.modelSettings().checkpointRunId()); - Assertions.assertEquals("mfucrtfod", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals("enjc", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals(false, model.modelSettings().distributed()); - Assertions.assertEquals(true, model.modelSettings().earlyStopping()); - Assertions.assertEquals(1307803742, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(532002430, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(1547790235, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(false, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(2075191599, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(1027792262, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(20.873022F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.WARMUP_COSINE, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("udxdyyrudmahswt", model.modelSettings().modelName()); - Assertions.assertEquals(75.429596F, model.modelSettings().momentum()); - Assertions.assertEquals(false, model.modelSettings().nesterov()); - Assertions.assertEquals(1978635992, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(1173715021, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.modelSettings().optimizer()); - Assertions.assertEquals(1829590179, model.modelSettings().randomSeed()); - Assertions.assertEquals(37.33512F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(230541163, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1518427810, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(1851126067, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(98.75179F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(453414511, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(4.1702747F, model.modelSettings().weightDecay()); - Assertions.assertEquals(1833679290, model.modelSettings().trainingCropSize()); - Assertions.assertEquals(381440577, model.modelSettings().validationCropSize()); - Assertions.assertEquals(1189124637, model.modelSettings().validationResizeSize()); - Assertions.assertEquals(2517837, model.modelSettings().weightedLoss()); - Assertions.assertEquals("arpfctwrap", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("dojq", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("zesi", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("ysnjqyowaadc", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("azab", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("dtsewkaupwhlzyc", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("emgjlm", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("dorsirxxhy", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("qakofajf", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("prfvmkinwteyrqsh", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("bcejopylbl", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("prrw", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("pimtc", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("fx", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("ytzfsl", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("zhqikm", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("bliqemcdiiiskl", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("nxx", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("jxvtrkfkgenjqnnp", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("kosnyxigfoujjc", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("dqmrlhnzkwopsw", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("inxupr", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("yxwjezb", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("ployuekdcpvu", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("rsvjmnsvujnjktv", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("efcjisepkdbxot", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("jampqoclannm", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("nlsuqbwzstr", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("anx", model.searchSpace().get(0).trainingCropSize()); - Assertions.assertEquals("muvardlmzjot", model.searchSpace().get(0).validationCropSize()); - Assertions.assertEquals("rmuhcuhtuzlx", model.searchSpace().get(0).validationResizeSize()); - Assertions.assertEquals("yo", model.searchSpace().get(0).weightedLoss()); - Assertions.assertEquals(803234002, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT72H6M3S"), model.limitSettings().timeout()); - Assertions.assertEquals(1698507772, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.BAYESIAN, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(2016687082, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(336030670, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("cru", model.validationData().description()); - Assertions.assertEquals("nfhoksmmcul", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals(67.1284830438322D, 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 fbe5cb2279dc7..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageInstanceSegmentationTests.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.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\":1534306057,\"boxScoreThreshold\":27.125877,\"imageSize\":509776627,\"maxSize\":1800994072,\"minSize\":1064698713,\"modelSize\":\"Small\",\"multiScale\":false,\"nmsIouThreshold\":73.876884,\"tileGridSize\":\"b\",\"tileOverlapRatio\":98.34619,\"tilePredictionsNmsThreshold\":49.36939,\"validationIouThreshold\":23.7808,\"validationMetricType\":\"None\",\"amsGradient\":false,\"advancedSettings\":\"qddlggbq\",\"augmentations\":\"lgzubak\",\"beta1\":52.478916,\"beta2\":73.25457,\"checkpointFrequency\":44605172,\"checkpointRunId\":\"fnsffetpkmixwew\",\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"uri\":\"s\",\"mode\":\"Download\",\"description\":\"epnqvxgvohdb\"},\"distributed\":true,\"earlyStopping\":false,\"earlyStoppingDelay\":469971245,\"earlyStoppingPatience\":1372482998,\"evaluationFrequency\":234642424,\"enableOnnxNormalization\":true,\"gradientAccumulationStep\":1882721834,\"layersToFreeze\":342131546,\"learningRate\":8.727491,\"learningRateScheduler\":\"Step\",\"modelName\":\"xqhpjhuboh\",\"momentum\":40.88772,\"nesterov\":false,\"numberOfEpochs\":1117928548,\"numberOfWorkers\":568762031,\"optimizer\":\"Sgd\",\"randomSeed\":32020513,\"stepLRGamma\":86.87302,\"stepLRStepSize\":173984136,\"trainingBatchSize\":212469610,\"validationBatchSize\":775443642,\"warmupCosineLRCycles\":4.8310876,\"warmupCosineLRWarmupEpochs\":1009329595,\"weightDecay\":38.67607},\"searchSpace\":[{\"boxDetectionsPerImage\":\"amqx\",\"boxScoreThreshold\":\"ssanybzzg\",\"imageSize\":\"dfeumyjsvcdh\",\"maxSize\":\"wkhookj\",\"minSize\":\"zxezriwgo\",\"modelSize\":\"apcqksaaapxjh\",\"multiScale\":\"tibenwsd\",\"nmsIouThreshold\":\"vdaahlfrcqklpmvz\",\"tileGridSize\":\"reszyaqgom\",\"tileOverlapRatio\":\"mfggeokfekc\",\"tilePredictionsNmsThreshold\":\"lwkyeahhh\",\"validationIouThreshold\":\"pulnrfcqufmcihp\",\"validationMetricType\":\"owrer\",\"amsGradient\":\"xptch\",\"augmentations\":\"yqqidqimlgbbfjm\",\"beta1\":\"jvxlhmpmh\",\"beta2\":\"t\",\"distributed\":\"phqeofy\",\"earlyStopping\":\"snlow\",\"earlyStoppingDelay\":\"mcqixuanccqvjf\",\"earlyStoppingPatience\":\"fqpmquxpj\",\"evaluationFrequency\":\"faar\",\"enableOnnxNormalization\":\"ci\",\"gradientAccumulationStep\":\"mufzgugrbl\",\"layersToFreeze\":\"l\",\"learningRate\":\"ssnqe\",\"learningRateScheduler\":\"otbptg\",\"modelName\":\"manxx\",\"momentum\":\"qfmdqecvtam\",\"nesterov\":\"zmnobfeww\",\"numberOfEpochs\":\"ibxovu\",\"numberOfWorkers\":\"qjrkbln\",\"optimizer\":\"clwgycv\",\"randomSeed\":\"nzjcyqqzhembtbw\",\"stepLRGamma\":\"lbadp\",\"stepLRStepSize\":\"jdleajvmvvlooubs\",\"trainingBatchSize\":\"ipjeo\",\"validationBatchSize\":\"kgocj\",\"warmupCosineLRCycles\":\"lupfazus\",\"warmupCosineLRWarmupEpochs\":\"dhuslgdwz\",\"weightDecay\":\"dqyxajclgr\"},{\"boxDetectionsPerImage\":\"vqcwyzoqzk\",\"boxScoreThreshold\":\"cwwsj\",\"imageSize\":\"iixepbntqqwwgfgs\",\"maxSize\":\"ilefej\",\"minSize\":\"wrznequ\",\"modelSize\":\"nttwk\",\"multiScale\":\"ajksbs\",\"nmsIouThreshold\":\"gjmqjhgcydijnmcv\",\"tileGridSize\":\"ssfcriqxzixtd\",\"tileOverlapRatio\":\"wmvcdkucpxpyafrw\",\"tilePredictionsNmsThreshold\":\"orogeuv\",\"validationIouThreshold\":\"rspnrsjsem\",\"validationMetricType\":\"ofrsnq\",\"amsGradient\":\"jp\",\"augmentations\":\"exutike\",\"beta1\":\"m\",\"beta2\":\"rpub\",\"distributed\":\"dhvos\",\"earlyStopping\":\"zscueza\",\"earlyStoppingDelay\":\"vdfwgqjhewcffrx\",\"earlyStoppingPatience\":\"ezkhzp\",\"evaluationFrequency\":\"qissen\",\"enableOnnxNormalization\":\"rusyzai\",\"gradientAccumulationStep\":\"psjnpck\",\"layersToFreeze\":\"ujyduonbdawsao\",\"learningRate\":\"vvm\",\"learningRateScheduler\":\"kxjarsbbdddw\",\"modelName\":\"qxa\",\"momentum\":\"xqkdyqjvzvcgrds\",\"nesterov\":\"esfkqqxuhv\",\"numberOfEpochs\":\"lbrouszxac\",\"numberOfWorkers\":\"uk\",\"optimizer\":\"goojjfuk\",\"randomSeed\":\"bc\",\"stepLRGamma\":\"nhgbtzvxxvsbc\",\"stepLRStepSize\":\"fkrfnkcni\",\"trainingBatchSize\":\"swxmfurqm\",\"validationBatchSize\":\"wwp\",\"warmupCosineLRCycles\":\"um\",\"warmupCosineLRWarmupEpochs\":\"ahbqsvnkxm\",\"weightDecay\":\"zuae\"}],\"limitSettings\":{\"maxTrials\":1864326135,\"timeout\":\"PT127H34M59S\",\"maxConcurrentTrials\":645713420},\"sweepSettings\":{\"samplingAlgorithm\":\"Grid\",\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"evaluationInterval\":1109486386,\"delayEvaluation\":682993372}},\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"zzmiemqyft\",\"mode\":\"EvalDownload\",\"description\":\"sw\"},\"validationDataSize\":7.272261053343065,\"logVerbosity\":\"Warning\",\"trainingData\":{\"jobInputType\":\"mltable\",\"uri\":\"ghpakbqyhlsorn\",\"mode\":\"EvalDownload\",\"description\":\"qagkncjmybn\"},\"targetColumnName\":\"vztnjawrhulemm\"}") - .toObject(ImageInstanceSegmentation.class); - Assertions.assertEquals(LogVerbosity.WARNING, model.logVerbosity()); - Assertions.assertEquals("qagkncjmybn", model.trainingData().description()); - Assertions.assertEquals("ghpakbqyhlsorn", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("vztnjawrhulemm", model.targetColumnName()); - Assertions.assertEquals(InstanceSegmentationPrimaryMetrics.MEAN_AVERAGE_PRECISION, model.primaryMetric()); - Assertions.assertEquals(false, model.modelSettings().amsGradient()); - Assertions.assertEquals("qddlggbq", model.modelSettings().advancedSettings()); - Assertions.assertEquals("lgzubak", model.modelSettings().augmentations()); - Assertions.assertEquals(52.478916F, model.modelSettings().beta1()); - Assertions.assertEquals(73.25457F, model.modelSettings().beta2()); - Assertions.assertEquals(44605172, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("fnsffetpkmixwew", model.modelSettings().checkpointRunId()); - Assertions.assertEquals("epnqvxgvohdb", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals("s", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals(true, model.modelSettings().distributed()); - Assertions.assertEquals(false, model.modelSettings().earlyStopping()); - Assertions.assertEquals(469971245, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(1372482998, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(234642424, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(true, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1882721834, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(342131546, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(8.727491F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.STEP, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("xqhpjhuboh", model.modelSettings().modelName()); - Assertions.assertEquals(40.88772F, model.modelSettings().momentum()); - Assertions.assertEquals(false, model.modelSettings().nesterov()); - Assertions.assertEquals(1117928548, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(568762031, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.SGD, model.modelSettings().optimizer()); - Assertions.assertEquals(32020513, model.modelSettings().randomSeed()); - Assertions.assertEquals(86.87302F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(173984136, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(212469610, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(775443642, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(4.8310876F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(1009329595, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(38.67607F, model.modelSettings().weightDecay()); - Assertions.assertEquals(1534306057, model.modelSettings().boxDetectionsPerImage()); - Assertions.assertEquals(27.125877F, model.modelSettings().boxScoreThreshold()); - Assertions.assertEquals(509776627, model.modelSettings().imageSize()); - Assertions.assertEquals(1800994072, model.modelSettings().maxSize()); - Assertions.assertEquals(1064698713, model.modelSettings().minSize()); - Assertions.assertEquals(ModelSize.SMALL, model.modelSettings().modelSize()); - Assertions.assertEquals(false, model.modelSettings().multiScale()); - Assertions.assertEquals(73.876884F, model.modelSettings().nmsIouThreshold()); - Assertions.assertEquals("b", model.modelSettings().tileGridSize()); - Assertions.assertEquals(98.34619F, model.modelSettings().tileOverlapRatio()); - Assertions.assertEquals(49.36939F, model.modelSettings().tilePredictionsNmsThreshold()); - Assertions.assertEquals(23.7808F, model.modelSettings().validationIouThreshold()); - Assertions.assertEquals(ValidationMetricType.NONE, model.modelSettings().validationMetricType()); - Assertions.assertEquals("xptch", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("yqqidqimlgbbfjm", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("jvxlhmpmh", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("t", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("phqeofy", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("snlow", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("mcqixuanccqvjf", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("fqpmquxpj", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("faar", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("ci", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("mufzgugrbl", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("l", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("ssnqe", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("otbptg", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("manxx", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("qfmdqecvtam", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("zmnobfeww", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("ibxovu", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("qjrkbln", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("clwgycv", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("nzjcyqqzhembtbw", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("lbadp", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("jdleajvmvvlooubs", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("ipjeo", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("kgocj", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("lupfazus", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("dhuslgdwz", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("dqyxajclgr", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("amqx", model.searchSpace().get(0).boxDetectionsPerImage()); - Assertions.assertEquals("ssanybzzg", model.searchSpace().get(0).boxScoreThreshold()); - Assertions.assertEquals("dfeumyjsvcdh", model.searchSpace().get(0).imageSize()); - Assertions.assertEquals("wkhookj", model.searchSpace().get(0).maxSize()); - Assertions.assertEquals("zxezriwgo", model.searchSpace().get(0).minSize()); - Assertions.assertEquals("apcqksaaapxjh", model.searchSpace().get(0).modelSize()); - Assertions.assertEquals("tibenwsd", model.searchSpace().get(0).multiScale()); - Assertions.assertEquals("vdaahlfrcqklpmvz", model.searchSpace().get(0).nmsIouThreshold()); - Assertions.assertEquals("reszyaqgom", model.searchSpace().get(0).tileGridSize()); - Assertions.assertEquals("mfggeokfekc", model.searchSpace().get(0).tileOverlapRatio()); - Assertions.assertEquals("lwkyeahhh", model.searchSpace().get(0).tilePredictionsNmsThreshold()); - Assertions.assertEquals("pulnrfcqufmcihp", model.searchSpace().get(0).validationIouThreshold()); - Assertions.assertEquals("owrer", model.searchSpace().get(0).validationMetricType()); - Assertions.assertEquals(1864326135, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT127H34M59S"), model.limitSettings().timeout()); - Assertions.assertEquals(645713420, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.GRID, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(1109486386, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(682993372, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("sw", model.validationData().description()); - Assertions.assertEquals("zzmiemqyft", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals(7.272261053343065D, model.validationDataSize()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageInstanceSegmentation model = new ImageInstanceSegmentation().withLogVerbosity(LogVerbosity.WARNING) - .withTrainingData(new MLTableJobInput().withDescription("qagkncjmybn") - .withUri("ghpakbqyhlsorn") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD)) - .withTargetColumnName("vztnjawrhulemm") - .withPrimaryMetric(InstanceSegmentationPrimaryMetrics.MEAN_AVERAGE_PRECISION) - .withModelSettings(new ImageModelSettingsObjectDetection().withAmsGradient(false) - .withAdvancedSettings("qddlggbq") - .withAugmentations("lgzubak") - .withBeta1(52.478916F) - .withBeta2(73.25457F) - .withCheckpointFrequency(44605172) - .withCheckpointRunId("fnsffetpkmixwew") - .withCheckpointModel(new MLFlowModelJobInput().withDescription("epnqvxgvohdb") - .withUri("s") - .withMode(InputDeliveryMode.DOWNLOAD)) - .withDistributed(true) - .withEarlyStopping(false) - .withEarlyStoppingDelay(469971245) - .withEarlyStoppingPatience(1372482998) - .withEvaluationFrequency(234642424) - .withEnableOnnxNormalization(true) - .withGradientAccumulationStep(1882721834) - .withLayersToFreeze(342131546) - .withLearningRate(8.727491F) - .withLearningRateScheduler(LearningRateScheduler.STEP) - .withModelName("xqhpjhuboh") - .withMomentum(40.88772F) - .withNesterov(false) - .withNumberOfEpochs(1117928548) - .withNumberOfWorkers(568762031) - .withOptimizer(StochasticOptimizer.SGD) - .withRandomSeed(32020513) - .withStepLRGamma(86.87302F) - .withStepLRStepSize(173984136) - .withTrainingBatchSize(212469610) - .withValidationBatchSize(775443642) - .withWarmupCosineLRCycles(4.8310876F) - .withWarmupCosineLRWarmupEpochs(1009329595) - .withWeightDecay(38.67607F) - .withBoxDetectionsPerImage(1534306057) - .withBoxScoreThreshold(27.125877F) - .withImageSize(509776627) - .withMaxSize(1800994072) - .withMinSize(1064698713) - .withModelSize(ModelSize.SMALL) - .withMultiScale(false) - .withNmsIouThreshold(73.876884F) - .withTileGridSize("b") - .withTileOverlapRatio(98.34619F) - .withTilePredictionsNmsThreshold(49.36939F) - .withValidationIouThreshold(23.7808F) - .withValidationMetricType(ValidationMetricType.NONE)) - .withSearchSpace(Arrays.asList( - new ImageModelDistributionSettingsObjectDetection().withAmsGradient("xptch") - .withAugmentations("yqqidqimlgbbfjm") - .withBeta1("jvxlhmpmh") - .withBeta2("t") - .withDistributed("phqeofy") - .withEarlyStopping("snlow") - .withEarlyStoppingDelay("mcqixuanccqvjf") - .withEarlyStoppingPatience("fqpmquxpj") - .withEvaluationFrequency("faar") - .withEnableOnnxNormalization("ci") - .withGradientAccumulationStep("mufzgugrbl") - .withLayersToFreeze("l") - .withLearningRate("ssnqe") - .withLearningRateScheduler("otbptg") - .withModelName("manxx") - .withMomentum("qfmdqecvtam") - .withNesterov("zmnobfeww") - .withNumberOfEpochs("ibxovu") - .withNumberOfWorkers("qjrkbln") - .withOptimizer("clwgycv") - .withRandomSeed("nzjcyqqzhembtbw") - .withStepLRGamma("lbadp") - .withStepLRStepSize("jdleajvmvvlooubs") - .withTrainingBatchSize("ipjeo") - .withValidationBatchSize("kgocj") - .withWarmupCosineLRCycles("lupfazus") - .withWarmupCosineLRWarmupEpochs("dhuslgdwz") - .withWeightDecay("dqyxajclgr") - .withBoxDetectionsPerImage("amqx") - .withBoxScoreThreshold("ssanybzzg") - .withImageSize("dfeumyjsvcdh") - .withMaxSize("wkhookj") - .withMinSize("zxezriwgo") - .withModelSize("apcqksaaapxjh") - .withMultiScale("tibenwsd") - .withNmsIouThreshold("vdaahlfrcqklpmvz") - .withTileGridSize("reszyaqgom") - .withTileOverlapRatio("mfggeokfekc") - .withTilePredictionsNmsThreshold("lwkyeahhh") - .withValidationIouThreshold("pulnrfcqufmcihp") - .withValidationMetricType("owrer"), - new ImageModelDistributionSettingsObjectDetection().withAmsGradient("jp") - .withAugmentations("exutike") - .withBeta1("m") - .withBeta2("rpub") - .withDistributed("dhvos") - .withEarlyStopping("zscueza") - .withEarlyStoppingDelay("vdfwgqjhewcffrx") - .withEarlyStoppingPatience("ezkhzp") - .withEvaluationFrequency("qissen") - .withEnableOnnxNormalization("rusyzai") - .withGradientAccumulationStep("psjnpck") - .withLayersToFreeze("ujyduonbdawsao") - .withLearningRate("vvm") - .withLearningRateScheduler("kxjarsbbdddw") - .withModelName("qxa") - .withMomentum("xqkdyqjvzvcgrds") - .withNesterov("esfkqqxuhv") - .withNumberOfEpochs("lbrouszxac") - .withNumberOfWorkers("uk") - .withOptimizer("goojjfuk") - .withRandomSeed("bc") - .withStepLRGamma("nhgbtzvxxvsbc") - .withStepLRStepSize("fkrfnkcni") - .withTrainingBatchSize("swxmfurqm") - .withValidationBatchSize("wwp") - .withWarmupCosineLRCycles("um") - .withWarmupCosineLRWarmupEpochs("ahbqsvnkxm") - .withWeightDecay("zuae") - .withBoxDetectionsPerImage("vqcwyzoqzk") - .withBoxScoreThreshold("cwwsj") - .withImageSize("iixepbntqqwwgfgs") - .withMaxSize("ilefej") - .withMinSize("wrznequ") - .withModelSize("nttwk") - .withMultiScale("ajksbs") - .withNmsIouThreshold("gjmqjhgcydijnmcv") - .withTileGridSize("ssfcriqxzixtd") - .withTileOverlapRatio("wmvcdkucpxpyafrw") - .withTilePredictionsNmsThreshold("orogeuv") - .withValidationIouThreshold("rspnrsjsem") - .withValidationMetricType("ofrsnq"))) - .withLimitSettings(new ImageLimitSettings().withMaxTrials(1864326135) - .withTimeout(Duration.parse("PT127H34M59S")) - .withMaxConcurrentTrials(645713420)) - .withSweepSettings(new ImageSweepSettings().withSamplingAlgorithm(SamplingAlgorithmType.GRID) - .withEarlyTermination( - new EarlyTerminationPolicy().withEvaluationInterval(1109486386).withDelayEvaluation(682993372))) - .withValidationData(new MLTableJobInput().withDescription("sw") - .withUri("zzmiemqyft") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD)) - .withValidationDataSize(7.272261053343065D); - model = BinaryData.fromObject(model).toObject(ImageInstanceSegmentation.class); - Assertions.assertEquals(LogVerbosity.WARNING, model.logVerbosity()); - Assertions.assertEquals("qagkncjmybn", model.trainingData().description()); - Assertions.assertEquals("ghpakbqyhlsorn", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("vztnjawrhulemm", model.targetColumnName()); - Assertions.assertEquals(InstanceSegmentationPrimaryMetrics.MEAN_AVERAGE_PRECISION, model.primaryMetric()); - Assertions.assertEquals(false, model.modelSettings().amsGradient()); - Assertions.assertEquals("qddlggbq", model.modelSettings().advancedSettings()); - Assertions.assertEquals("lgzubak", model.modelSettings().augmentations()); - Assertions.assertEquals(52.478916F, model.modelSettings().beta1()); - Assertions.assertEquals(73.25457F, model.modelSettings().beta2()); - Assertions.assertEquals(44605172, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("fnsffetpkmixwew", model.modelSettings().checkpointRunId()); - Assertions.assertEquals("epnqvxgvohdb", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals("s", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals(true, model.modelSettings().distributed()); - Assertions.assertEquals(false, model.modelSettings().earlyStopping()); - Assertions.assertEquals(469971245, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(1372482998, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(234642424, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(true, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1882721834, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(342131546, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(8.727491F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.STEP, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("xqhpjhuboh", model.modelSettings().modelName()); - Assertions.assertEquals(40.88772F, model.modelSettings().momentum()); - Assertions.assertEquals(false, model.modelSettings().nesterov()); - Assertions.assertEquals(1117928548, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(568762031, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.SGD, model.modelSettings().optimizer()); - Assertions.assertEquals(32020513, model.modelSettings().randomSeed()); - Assertions.assertEquals(86.87302F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(173984136, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(212469610, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(775443642, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(4.8310876F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(1009329595, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(38.67607F, model.modelSettings().weightDecay()); - Assertions.assertEquals(1534306057, model.modelSettings().boxDetectionsPerImage()); - Assertions.assertEquals(27.125877F, model.modelSettings().boxScoreThreshold()); - Assertions.assertEquals(509776627, model.modelSettings().imageSize()); - Assertions.assertEquals(1800994072, model.modelSettings().maxSize()); - Assertions.assertEquals(1064698713, model.modelSettings().minSize()); - Assertions.assertEquals(ModelSize.SMALL, model.modelSettings().modelSize()); - Assertions.assertEquals(false, model.modelSettings().multiScale()); - Assertions.assertEquals(73.876884F, model.modelSettings().nmsIouThreshold()); - Assertions.assertEquals("b", model.modelSettings().tileGridSize()); - Assertions.assertEquals(98.34619F, model.modelSettings().tileOverlapRatio()); - Assertions.assertEquals(49.36939F, model.modelSettings().tilePredictionsNmsThreshold()); - Assertions.assertEquals(23.7808F, model.modelSettings().validationIouThreshold()); - Assertions.assertEquals(ValidationMetricType.NONE, model.modelSettings().validationMetricType()); - Assertions.assertEquals("xptch", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("yqqidqimlgbbfjm", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("jvxlhmpmh", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("t", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("phqeofy", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("snlow", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("mcqixuanccqvjf", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("fqpmquxpj", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("faar", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("ci", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("mufzgugrbl", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("l", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("ssnqe", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("otbptg", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("manxx", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("qfmdqecvtam", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("zmnobfeww", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("ibxovu", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("qjrkbln", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("clwgycv", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("nzjcyqqzhembtbw", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("lbadp", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("jdleajvmvvlooubs", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("ipjeo", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("kgocj", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("lupfazus", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("dhuslgdwz", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("dqyxajclgr", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("amqx", model.searchSpace().get(0).boxDetectionsPerImage()); - Assertions.assertEquals("ssanybzzg", model.searchSpace().get(0).boxScoreThreshold()); - Assertions.assertEquals("dfeumyjsvcdh", model.searchSpace().get(0).imageSize()); - Assertions.assertEquals("wkhookj", model.searchSpace().get(0).maxSize()); - Assertions.assertEquals("zxezriwgo", model.searchSpace().get(0).minSize()); - Assertions.assertEquals("apcqksaaapxjh", model.searchSpace().get(0).modelSize()); - Assertions.assertEquals("tibenwsd", model.searchSpace().get(0).multiScale()); - Assertions.assertEquals("vdaahlfrcqklpmvz", model.searchSpace().get(0).nmsIouThreshold()); - Assertions.assertEquals("reszyaqgom", model.searchSpace().get(0).tileGridSize()); - Assertions.assertEquals("mfggeokfekc", model.searchSpace().get(0).tileOverlapRatio()); - Assertions.assertEquals("lwkyeahhh", model.searchSpace().get(0).tilePredictionsNmsThreshold()); - Assertions.assertEquals("pulnrfcqufmcihp", model.searchSpace().get(0).validationIouThreshold()); - Assertions.assertEquals("owrer", model.searchSpace().get(0).validationMetricType()); - Assertions.assertEquals(1864326135, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT127H34M59S"), model.limitSettings().timeout()); - Assertions.assertEquals(645713420, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.GRID, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(1109486386, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(682993372, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("sw", model.validationData().description()); - Assertions.assertEquals("zzmiemqyft", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals(7.272261053343065D, 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 93834ce195f4b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageLimitSettingsTests.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.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("{\"maxTrials\":1226753892,\"timeout\":\"PT148H19M11S\",\"maxConcurrentTrials\":1388239886}") - .toObject(ImageLimitSettings.class); - Assertions.assertEquals(1226753892, model.maxTrials()); - Assertions.assertEquals(Duration.parse("PT148H19M11S"), model.timeout()); - Assertions.assertEquals(1388239886, model.maxConcurrentTrials()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageLimitSettings model = new ImageLimitSettings().withMaxTrials(1226753892) - .withTimeout(Duration.parse("PT148H19M11S")) - .withMaxConcurrentTrials(1388239886); - model = BinaryData.fromObject(model).toObject(ImageLimitSettings.class); - Assertions.assertEquals(1226753892, model.maxTrials()); - Assertions.assertEquals(Duration.parse("PT148H19M11S"), model.timeout()); - Assertions.assertEquals(1388239886, model.maxConcurrentTrials()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageMetadataTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageMetadataTests.java deleted file mode 100644 index b9ad759562c4c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageMetadataTests.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.ImageMetadata; -import org.junit.jupiter.api.Assertions; - -public final class ImageMetadataTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageMetadata model = BinaryData.fromString( - "{\"currentImageVersion\":\"alahovuuwxhm\",\"latestImageVersion\":\"jnhj\",\"isLatestOsImageVersion\":false}") - .toObject(ImageMetadata.class); - Assertions.assertEquals("alahovuuwxhm", model.currentImageVersion()); - Assertions.assertEquals("jnhj", model.latestImageVersion()); - Assertions.assertEquals(false, model.isLatestOsImageVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageMetadata model = new ImageMetadata().withCurrentImageVersion("alahovuuwxhm") - .withLatestImageVersion("jnhj") - .withIsLatestOsImageVersion(false); - model = BinaryData.fromObject(model).toObject(ImageMetadata.class); - Assertions.assertEquals("alahovuuwxhm", model.currentImageVersion()); - Assertions.assertEquals("jnhj", model.latestImageVersion()); - Assertions.assertEquals(false, model.isLatestOsImageVersion()); - } -} 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 e09043459cf1f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsClassificationTests.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.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\":\"xmmqmt\",\"validationCropSize\":\"ky\",\"validationResizeSize\":\"exwdonbexf\",\"weightedLoss\":\"daubheeggzgr\",\"amsGradient\":\"tlfozuumrtgjqgac\",\"augmentations\":\"tnsyxzxjm\",\"beta1\":\"nb\",\"beta2\":\"azofm\",\"distributed\":\"vtemaspmanydscdk\",\"earlyStopping\":\"dpwjcbhaahntof\",\"earlyStoppingDelay\":\"fh\",\"earlyStoppingPatience\":\"ixo\",\"evaluationFrequency\":\"kzdfiv\",\"enableOnnxNormalization\":\"jybsrwz\",\"gradientAccumulationStep\":\"rgt\",\"layersToFreeze\":\"hmfppinmgi\",\"learningRate\":\"smkw\",\"learningRateScheduler\":\"gfragjhxerxlobkd\",\"modelName\":\"qhvmmniiqy\",\"momentum\":\"lhjnskbggicnqwl\",\"nesterov\":\"m\",\"numberOfEpochs\":\"blxk\",\"numberOfWorkers\":\"qgvxrktjcjigcw\",\"optimizer\":\"panbqxasevc\",\"randomSeed\":\"fp\",\"stepLRGamma\":\"edyybruholaemwcg\",\"stepLRStepSize\":\"mrimaabsqql\",\"trainingBatchSize\":\"b\",\"validationBatchSize\":\"ow\",\"warmupCosineLRCycles\":\"hdkmbjsmihrijezb\",\"warmupCosineLRWarmupEpochs\":\"jwfcz\",\"weightDecay\":\"kvb\"}") - .toObject(ImageModelDistributionSettingsClassification.class); - Assertions.assertEquals("tlfozuumrtgjqgac", model.amsGradient()); - Assertions.assertEquals("tnsyxzxjm", model.augmentations()); - Assertions.assertEquals("nb", model.beta1()); - Assertions.assertEquals("azofm", model.beta2()); - Assertions.assertEquals("vtemaspmanydscdk", model.distributed()); - Assertions.assertEquals("dpwjcbhaahntof", model.earlyStopping()); - Assertions.assertEquals("fh", model.earlyStoppingDelay()); - Assertions.assertEquals("ixo", model.earlyStoppingPatience()); - Assertions.assertEquals("kzdfiv", model.evaluationFrequency()); - Assertions.assertEquals("jybsrwz", model.enableOnnxNormalization()); - Assertions.assertEquals("rgt", model.gradientAccumulationStep()); - Assertions.assertEquals("hmfppinmgi", model.layersToFreeze()); - Assertions.assertEquals("smkw", model.learningRate()); - Assertions.assertEquals("gfragjhxerxlobkd", model.learningRateScheduler()); - Assertions.assertEquals("qhvmmniiqy", model.modelName()); - Assertions.assertEquals("lhjnskbggicnqwl", model.momentum()); - Assertions.assertEquals("m", model.nesterov()); - Assertions.assertEquals("blxk", model.numberOfEpochs()); - Assertions.assertEquals("qgvxrktjcjigcw", model.numberOfWorkers()); - Assertions.assertEquals("panbqxasevc", model.optimizer()); - Assertions.assertEquals("fp", model.randomSeed()); - Assertions.assertEquals("edyybruholaemwcg", model.stepLRGamma()); - Assertions.assertEquals("mrimaabsqql", model.stepLRStepSize()); - Assertions.assertEquals("b", model.trainingBatchSize()); - Assertions.assertEquals("ow", model.validationBatchSize()); - Assertions.assertEquals("hdkmbjsmihrijezb", model.warmupCosineLRCycles()); - Assertions.assertEquals("jwfcz", model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("kvb", model.weightDecay()); - Assertions.assertEquals("xmmqmt", model.trainingCropSize()); - Assertions.assertEquals("ky", model.validationCropSize()); - Assertions.assertEquals("exwdonbexf", model.validationResizeSize()); - Assertions.assertEquals("daubheeggzgr", model.weightedLoss()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageModelDistributionSettingsClassification model - = new ImageModelDistributionSettingsClassification().withAmsGradient("tlfozuumrtgjqgac") - .withAugmentations("tnsyxzxjm") - .withBeta1("nb") - .withBeta2("azofm") - .withDistributed("vtemaspmanydscdk") - .withEarlyStopping("dpwjcbhaahntof") - .withEarlyStoppingDelay("fh") - .withEarlyStoppingPatience("ixo") - .withEvaluationFrequency("kzdfiv") - .withEnableOnnxNormalization("jybsrwz") - .withGradientAccumulationStep("rgt") - .withLayersToFreeze("hmfppinmgi") - .withLearningRate("smkw") - .withLearningRateScheduler("gfragjhxerxlobkd") - .withModelName("qhvmmniiqy") - .withMomentum("lhjnskbggicnqwl") - .withNesterov("m") - .withNumberOfEpochs("blxk") - .withNumberOfWorkers("qgvxrktjcjigcw") - .withOptimizer("panbqxasevc") - .withRandomSeed("fp") - .withStepLRGamma("edyybruholaemwcg") - .withStepLRStepSize("mrimaabsqql") - .withTrainingBatchSize("b") - .withValidationBatchSize("ow") - .withWarmupCosineLRCycles("hdkmbjsmihrijezb") - .withWarmupCosineLRWarmupEpochs("jwfcz") - .withWeightDecay("kvb") - .withTrainingCropSize("xmmqmt") - .withValidationCropSize("ky") - .withValidationResizeSize("exwdonbexf") - .withWeightedLoss("daubheeggzgr"); - model = BinaryData.fromObject(model).toObject(ImageModelDistributionSettingsClassification.class); - Assertions.assertEquals("tlfozuumrtgjqgac", model.amsGradient()); - Assertions.assertEquals("tnsyxzxjm", model.augmentations()); - Assertions.assertEquals("nb", model.beta1()); - Assertions.assertEquals("azofm", model.beta2()); - Assertions.assertEquals("vtemaspmanydscdk", model.distributed()); - Assertions.assertEquals("dpwjcbhaahntof", model.earlyStopping()); - Assertions.assertEquals("fh", model.earlyStoppingDelay()); - Assertions.assertEquals("ixo", model.earlyStoppingPatience()); - Assertions.assertEquals("kzdfiv", model.evaluationFrequency()); - Assertions.assertEquals("jybsrwz", model.enableOnnxNormalization()); - Assertions.assertEquals("rgt", model.gradientAccumulationStep()); - Assertions.assertEquals("hmfppinmgi", model.layersToFreeze()); - Assertions.assertEquals("smkw", model.learningRate()); - Assertions.assertEquals("gfragjhxerxlobkd", model.learningRateScheduler()); - Assertions.assertEquals("qhvmmniiqy", model.modelName()); - Assertions.assertEquals("lhjnskbggicnqwl", model.momentum()); - Assertions.assertEquals("m", model.nesterov()); - Assertions.assertEquals("blxk", model.numberOfEpochs()); - Assertions.assertEquals("qgvxrktjcjigcw", model.numberOfWorkers()); - Assertions.assertEquals("panbqxasevc", model.optimizer()); - Assertions.assertEquals("fp", model.randomSeed()); - Assertions.assertEquals("edyybruholaemwcg", model.stepLRGamma()); - Assertions.assertEquals("mrimaabsqql", model.stepLRStepSize()); - Assertions.assertEquals("b", model.trainingBatchSize()); - Assertions.assertEquals("ow", model.validationBatchSize()); - Assertions.assertEquals("hdkmbjsmihrijezb", model.warmupCosineLRCycles()); - Assertions.assertEquals("jwfcz", model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("kvb", model.weightDecay()); - Assertions.assertEquals("xmmqmt", model.trainingCropSize()); - Assertions.assertEquals("ky", model.validationCropSize()); - Assertions.assertEquals("exwdonbexf", model.validationResizeSize()); - Assertions.assertEquals("daubheeggzgr", 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 6ade9f3cb8cbb..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsObjectDetectionTests.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.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\":\"wkkfzzetl\",\"boxScoreThreshold\":\"dyxzlvwywjvr\",\"imageSize\":\"qpwwlzpddarc\",\"maxSize\":\"dwhslxebaj\",\"minSize\":\"knmstbdoprwkamp\",\"modelSize\":\"wpbldz\",\"multiScale\":\"udrcycm\",\"nmsIouThreshold\":\"uzymhlhihqknlv\",\"tileGridSize\":\"n\",\"tileOverlapRatio\":\"kopaiildcp\",\"tilePredictionsNmsThreshold\":\"khquxsy\",\"validationIouThreshold\":\"fpgvedrobujnjgyb\",\"validationMetricType\":\"mqx\",\"amsGradient\":\"idullnjgcpskg\",\"augmentations\":\"nytslgsazuqznghx\",\"beta1\":\"yqz\",\"beta2\":\"dkpvnrvzw\",\"distributed\":\"fxsfybntmveho\",\"earlyStopping\":\"lyuvbgtzqzqwe\",\"earlyStoppingDelay\":\"dybnairvhpqsvb\",\"earlyStoppingPatience\":\"ogeatrcnqnvn\",\"evaluationFrequency\":\"rfcs\",\"enableOnnxNormalization\":\"jnkoiz\",\"gradientAccumulationStep\":\"sqbibaa\",\"layersToFreeze\":\"icovj\",\"learningRate\":\"vwrmjx\",\"learningRateScheduler\":\"uod\",\"modelName\":\"czbassqfyylwpp\",\"momentum\":\"gkbzbloas\",\"nesterov\":\"xhqvovdpmht\",\"numberOfEpochs\":\"vsqjs\",\"numberOfWorkers\":\"jnqtaqg\",\"optimizer\":\"bfkceincnrecj\",\"randomSeed\":\"ywevsfgdrmnszdo\",\"stepLRGamma\":\"j\",\"stepLRStepSize\":\"svz\",\"trainingBatchSize\":\"xtcwgh\",\"validationBatchSize\":\"aevhgsulwvg\",\"warmupCosineLRCycles\":\"ufigvfjjuzki\",\"warmupCosineLRWarmupEpochs\":\"ciwuhyzekypy\",\"weightDecay\":\"ljlbzdlby\"}") - .toObject(ImageModelDistributionSettingsObjectDetection.class); - Assertions.assertEquals("idullnjgcpskg", model.amsGradient()); - Assertions.assertEquals("nytslgsazuqznghx", model.augmentations()); - Assertions.assertEquals("yqz", model.beta1()); - Assertions.assertEquals("dkpvnrvzw", model.beta2()); - Assertions.assertEquals("fxsfybntmveho", model.distributed()); - Assertions.assertEquals("lyuvbgtzqzqwe", model.earlyStopping()); - Assertions.assertEquals("dybnairvhpqsvb", model.earlyStoppingDelay()); - Assertions.assertEquals("ogeatrcnqnvn", model.earlyStoppingPatience()); - Assertions.assertEquals("rfcs", model.evaluationFrequency()); - Assertions.assertEquals("jnkoiz", model.enableOnnxNormalization()); - Assertions.assertEquals("sqbibaa", model.gradientAccumulationStep()); - Assertions.assertEquals("icovj", model.layersToFreeze()); - Assertions.assertEquals("vwrmjx", model.learningRate()); - Assertions.assertEquals("uod", model.learningRateScheduler()); - Assertions.assertEquals("czbassqfyylwpp", model.modelName()); - Assertions.assertEquals("gkbzbloas", model.momentum()); - Assertions.assertEquals("xhqvovdpmht", model.nesterov()); - Assertions.assertEquals("vsqjs", model.numberOfEpochs()); - Assertions.assertEquals("jnqtaqg", model.numberOfWorkers()); - Assertions.assertEquals("bfkceincnrecj", model.optimizer()); - Assertions.assertEquals("ywevsfgdrmnszdo", model.randomSeed()); - Assertions.assertEquals("j", model.stepLRGamma()); - Assertions.assertEquals("svz", model.stepLRStepSize()); - Assertions.assertEquals("xtcwgh", model.trainingBatchSize()); - Assertions.assertEquals("aevhgsulwvg", model.validationBatchSize()); - Assertions.assertEquals("ufigvfjjuzki", model.warmupCosineLRCycles()); - Assertions.assertEquals("ciwuhyzekypy", model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("ljlbzdlby", model.weightDecay()); - Assertions.assertEquals("wkkfzzetl", model.boxDetectionsPerImage()); - Assertions.assertEquals("dyxzlvwywjvr", model.boxScoreThreshold()); - Assertions.assertEquals("qpwwlzpddarc", model.imageSize()); - Assertions.assertEquals("dwhslxebaj", model.maxSize()); - Assertions.assertEquals("knmstbdoprwkamp", model.minSize()); - Assertions.assertEquals("wpbldz", model.modelSize()); - Assertions.assertEquals("udrcycm", model.multiScale()); - Assertions.assertEquals("uzymhlhihqknlv", model.nmsIouThreshold()); - Assertions.assertEquals("n", model.tileGridSize()); - Assertions.assertEquals("kopaiildcp", model.tileOverlapRatio()); - Assertions.assertEquals("khquxsy", model.tilePredictionsNmsThreshold()); - Assertions.assertEquals("fpgvedrobujnjgyb", model.validationIouThreshold()); - Assertions.assertEquals("mqx", model.validationMetricType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageModelDistributionSettingsObjectDetection model - = new ImageModelDistributionSettingsObjectDetection().withAmsGradient("idullnjgcpskg") - .withAugmentations("nytslgsazuqznghx") - .withBeta1("yqz") - .withBeta2("dkpvnrvzw") - .withDistributed("fxsfybntmveho") - .withEarlyStopping("lyuvbgtzqzqwe") - .withEarlyStoppingDelay("dybnairvhpqsvb") - .withEarlyStoppingPatience("ogeatrcnqnvn") - .withEvaluationFrequency("rfcs") - .withEnableOnnxNormalization("jnkoiz") - .withGradientAccumulationStep("sqbibaa") - .withLayersToFreeze("icovj") - .withLearningRate("vwrmjx") - .withLearningRateScheduler("uod") - .withModelName("czbassqfyylwpp") - .withMomentum("gkbzbloas") - .withNesterov("xhqvovdpmht") - .withNumberOfEpochs("vsqjs") - .withNumberOfWorkers("jnqtaqg") - .withOptimizer("bfkceincnrecj") - .withRandomSeed("ywevsfgdrmnszdo") - .withStepLRGamma("j") - .withStepLRStepSize("svz") - .withTrainingBatchSize("xtcwgh") - .withValidationBatchSize("aevhgsulwvg") - .withWarmupCosineLRCycles("ufigvfjjuzki") - .withWarmupCosineLRWarmupEpochs("ciwuhyzekypy") - .withWeightDecay("ljlbzdlby") - .withBoxDetectionsPerImage("wkkfzzetl") - .withBoxScoreThreshold("dyxzlvwywjvr") - .withImageSize("qpwwlzpddarc") - .withMaxSize("dwhslxebaj") - .withMinSize("knmstbdoprwkamp") - .withModelSize("wpbldz") - .withMultiScale("udrcycm") - .withNmsIouThreshold("uzymhlhihqknlv") - .withTileGridSize("n") - .withTileOverlapRatio("kopaiildcp") - .withTilePredictionsNmsThreshold("khquxsy") - .withValidationIouThreshold("fpgvedrobujnjgyb") - .withValidationMetricType("mqx"); - model = BinaryData.fromObject(model).toObject(ImageModelDistributionSettingsObjectDetection.class); - Assertions.assertEquals("idullnjgcpskg", model.amsGradient()); - Assertions.assertEquals("nytslgsazuqznghx", model.augmentations()); - Assertions.assertEquals("yqz", model.beta1()); - Assertions.assertEquals("dkpvnrvzw", model.beta2()); - Assertions.assertEquals("fxsfybntmveho", model.distributed()); - Assertions.assertEquals("lyuvbgtzqzqwe", model.earlyStopping()); - Assertions.assertEquals("dybnairvhpqsvb", model.earlyStoppingDelay()); - Assertions.assertEquals("ogeatrcnqnvn", model.earlyStoppingPatience()); - Assertions.assertEquals("rfcs", model.evaluationFrequency()); - Assertions.assertEquals("jnkoiz", model.enableOnnxNormalization()); - Assertions.assertEquals("sqbibaa", model.gradientAccumulationStep()); - Assertions.assertEquals("icovj", model.layersToFreeze()); - Assertions.assertEquals("vwrmjx", model.learningRate()); - Assertions.assertEquals("uod", model.learningRateScheduler()); - Assertions.assertEquals("czbassqfyylwpp", model.modelName()); - Assertions.assertEquals("gkbzbloas", model.momentum()); - Assertions.assertEquals("xhqvovdpmht", model.nesterov()); - Assertions.assertEquals("vsqjs", model.numberOfEpochs()); - Assertions.assertEquals("jnqtaqg", model.numberOfWorkers()); - Assertions.assertEquals("bfkceincnrecj", model.optimizer()); - Assertions.assertEquals("ywevsfgdrmnszdo", model.randomSeed()); - Assertions.assertEquals("j", model.stepLRGamma()); - Assertions.assertEquals("svz", model.stepLRStepSize()); - Assertions.assertEquals("xtcwgh", model.trainingBatchSize()); - Assertions.assertEquals("aevhgsulwvg", model.validationBatchSize()); - Assertions.assertEquals("ufigvfjjuzki", model.warmupCosineLRCycles()); - Assertions.assertEquals("ciwuhyzekypy", model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("ljlbzdlby", model.weightDecay()); - Assertions.assertEquals("wkkfzzetl", model.boxDetectionsPerImage()); - Assertions.assertEquals("dyxzlvwywjvr", model.boxScoreThreshold()); - Assertions.assertEquals("qpwwlzpddarc", model.imageSize()); - Assertions.assertEquals("dwhslxebaj", model.maxSize()); - Assertions.assertEquals("knmstbdoprwkamp", model.minSize()); - Assertions.assertEquals("wpbldz", model.modelSize()); - Assertions.assertEquals("udrcycm", model.multiScale()); - Assertions.assertEquals("uzymhlhihqknlv", model.nmsIouThreshold()); - Assertions.assertEquals("n", model.tileGridSize()); - Assertions.assertEquals("kopaiildcp", model.tileOverlapRatio()); - Assertions.assertEquals("khquxsy", model.tilePredictionsNmsThreshold()); - Assertions.assertEquals("fpgvedrobujnjgyb", model.validationIouThreshold()); - Assertions.assertEquals("mqx", 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 657137ce3ad8c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsTests.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.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\":\"kbsvbwy\",\"augmentations\":\"ygnbknhjgclxaxwc\",\"beta1\":\"asp\",\"beta2\":\"zkucszghdoaqipmn\",\"distributed\":\"lfrsbzrnmuv\",\"earlyStopping\":\"pu\",\"earlyStoppingDelay\":\"ddtbfmekjcnginxd\",\"earlyStoppingPatience\":\"aoy\",\"evaluationFrequency\":\"fvgyxzmxynofxl\",\"enableOnnxNormalization\":\"xoqxtdnzujsj\",\"gradientAccumulationStep\":\"krpskcjhmm\",\"layersToFreeze\":\"bnivdqtkykp\",\"learningRate\":\"nlsfgnyscac\",\"learningRateScheduler\":\"tbzetxyg\",\"modelName\":\"iceecvjwy\",\"momentum\":\"eoxmpzzw\",\"nesterov\":\"drdvha\",\"numberOfEpochs\":\"kx\",\"numberOfWorkers\":\"vz\",\"optimizer\":\"xmbrygmwibiosiq\",\"randomSeed\":\"kqfdqwdrtx\",\"stepLRGamma\":\"daglmrcok\",\"stepLRStepSize\":\"ert\",\"trainingBatchSize\":\"unzsiywhubym\",\"validationBatchSize\":\"opikzebqnnfywtkq\",\"warmupCosineLRCycles\":\"sdlkhcz\",\"warmupCosineLRWarmupEpochs\":\"pmgfjculojhhylx\",\"weightDecay\":\"vfiyymot\"}") - .toObject(ImageModelDistributionSettings.class); - Assertions.assertEquals("kbsvbwy", model.amsGradient()); - Assertions.assertEquals("ygnbknhjgclxaxwc", model.augmentations()); - Assertions.assertEquals("asp", model.beta1()); - Assertions.assertEquals("zkucszghdoaqipmn", model.beta2()); - Assertions.assertEquals("lfrsbzrnmuv", model.distributed()); - Assertions.assertEquals("pu", model.earlyStopping()); - Assertions.assertEquals("ddtbfmekjcnginxd", model.earlyStoppingDelay()); - Assertions.assertEquals("aoy", model.earlyStoppingPatience()); - Assertions.assertEquals("fvgyxzmxynofxl", model.evaluationFrequency()); - Assertions.assertEquals("xoqxtdnzujsj", model.enableOnnxNormalization()); - Assertions.assertEquals("krpskcjhmm", model.gradientAccumulationStep()); - Assertions.assertEquals("bnivdqtkykp", model.layersToFreeze()); - Assertions.assertEquals("nlsfgnyscac", model.learningRate()); - Assertions.assertEquals("tbzetxyg", model.learningRateScheduler()); - Assertions.assertEquals("iceecvjwy", model.modelName()); - Assertions.assertEquals("eoxmpzzw", model.momentum()); - Assertions.assertEquals("drdvha", model.nesterov()); - Assertions.assertEquals("kx", model.numberOfEpochs()); - Assertions.assertEquals("vz", model.numberOfWorkers()); - Assertions.assertEquals("xmbrygmwibiosiq", model.optimizer()); - Assertions.assertEquals("kqfdqwdrtx", model.randomSeed()); - Assertions.assertEquals("daglmrcok", model.stepLRGamma()); - Assertions.assertEquals("ert", model.stepLRStepSize()); - Assertions.assertEquals("unzsiywhubym", model.trainingBatchSize()); - Assertions.assertEquals("opikzebqnnfywtkq", model.validationBatchSize()); - Assertions.assertEquals("sdlkhcz", model.warmupCosineLRCycles()); - Assertions.assertEquals("pmgfjculojhhylx", model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("vfiyymot", model.weightDecay()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageModelDistributionSettings model = new ImageModelDistributionSettings().withAmsGradient("kbsvbwy") - .withAugmentations("ygnbknhjgclxaxwc") - .withBeta1("asp") - .withBeta2("zkucszghdoaqipmn") - .withDistributed("lfrsbzrnmuv") - .withEarlyStopping("pu") - .withEarlyStoppingDelay("ddtbfmekjcnginxd") - .withEarlyStoppingPatience("aoy") - .withEvaluationFrequency("fvgyxzmxynofxl") - .withEnableOnnxNormalization("xoqxtdnzujsj") - .withGradientAccumulationStep("krpskcjhmm") - .withLayersToFreeze("bnivdqtkykp") - .withLearningRate("nlsfgnyscac") - .withLearningRateScheduler("tbzetxyg") - .withModelName("iceecvjwy") - .withMomentum("eoxmpzzw") - .withNesterov("drdvha") - .withNumberOfEpochs("kx") - .withNumberOfWorkers("vz") - .withOptimizer("xmbrygmwibiosiq") - .withRandomSeed("kqfdqwdrtx") - .withStepLRGamma("daglmrcok") - .withStepLRStepSize("ert") - .withTrainingBatchSize("unzsiywhubym") - .withValidationBatchSize("opikzebqnnfywtkq") - .withWarmupCosineLRCycles("sdlkhcz") - .withWarmupCosineLRWarmupEpochs("pmgfjculojhhylx") - .withWeightDecay("vfiyymot"); - model = BinaryData.fromObject(model).toObject(ImageModelDistributionSettings.class); - Assertions.assertEquals("kbsvbwy", model.amsGradient()); - Assertions.assertEquals("ygnbknhjgclxaxwc", model.augmentations()); - Assertions.assertEquals("asp", model.beta1()); - Assertions.assertEquals("zkucszghdoaqipmn", model.beta2()); - Assertions.assertEquals("lfrsbzrnmuv", model.distributed()); - Assertions.assertEquals("pu", model.earlyStopping()); - Assertions.assertEquals("ddtbfmekjcnginxd", model.earlyStoppingDelay()); - Assertions.assertEquals("aoy", model.earlyStoppingPatience()); - Assertions.assertEquals("fvgyxzmxynofxl", model.evaluationFrequency()); - Assertions.assertEquals("xoqxtdnzujsj", model.enableOnnxNormalization()); - Assertions.assertEquals("krpskcjhmm", model.gradientAccumulationStep()); - Assertions.assertEquals("bnivdqtkykp", model.layersToFreeze()); - Assertions.assertEquals("nlsfgnyscac", model.learningRate()); - Assertions.assertEquals("tbzetxyg", model.learningRateScheduler()); - Assertions.assertEquals("iceecvjwy", model.modelName()); - Assertions.assertEquals("eoxmpzzw", model.momentum()); - Assertions.assertEquals("drdvha", model.nesterov()); - Assertions.assertEquals("kx", model.numberOfEpochs()); - Assertions.assertEquals("vz", model.numberOfWorkers()); - Assertions.assertEquals("xmbrygmwibiosiq", model.optimizer()); - Assertions.assertEquals("kqfdqwdrtx", model.randomSeed()); - Assertions.assertEquals("daglmrcok", model.stepLRGamma()); - Assertions.assertEquals("ert", model.stepLRStepSize()); - Assertions.assertEquals("unzsiywhubym", model.trainingBatchSize()); - Assertions.assertEquals("opikzebqnnfywtkq", model.validationBatchSize()); - Assertions.assertEquals("sdlkhcz", model.warmupCosineLRCycles()); - Assertions.assertEquals("pmgfjculojhhylx", model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("vfiyymot", 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 884e95b216846..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsClassificationTests.java +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated 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\":2019850919,\"validationCropSize\":1207062922,\"validationResizeSize\":284324942,\"weightedLoss\":1254415877,\"amsGradient\":true,\"advancedSettings\":\"vscbgngcrusxhir\",\"augmentations\":\"gcvsvkkjbjolpy\",\"beta1\":58.230556,\"beta2\":50.90398,\"checkpointFrequency\":901298308,\"checkpointRunId\":\"advhmli\",\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"uri\":\"igowxxbhtpsyioqe\",\"mode\":\"ReadOnlyMount\",\"description\":\"qszz\"},\"distributed\":true,\"earlyStopping\":false,\"earlyStoppingDelay\":958652184,\"earlyStoppingPatience\":1740509933,\"evaluationFrequency\":1046556371,\"enableOnnxNormalization\":true,\"gradientAccumulationStep\":321986139,\"layersToFreeze\":1384834321,\"learningRate\":89.54964,\"learningRateScheduler\":\"Step\",\"modelName\":\"ompnbnfgyweojbep\",\"momentum\":27.62385,\"nesterov\":true,\"numberOfEpochs\":810296596,\"numberOfWorkers\":1614250259,\"optimizer\":\"None\",\"randomSeed\":1918105896,\"stepLRGamma\":55.955624,\"stepLRStepSize\":1172060548,\"trainingBatchSize\":2093190507,\"validationBatchSize\":1129435958,\"warmupCosineLRCycles\":27.577805,\"warmupCosineLRWarmupEpochs\":1232186738,\"weightDecay\":96.705475}") - .toObject(ImageModelSettingsClassification.class); - Assertions.assertEquals(true, model.amsGradient()); - Assertions.assertEquals("vscbgngcrusxhir", model.advancedSettings()); - Assertions.assertEquals("gcvsvkkjbjolpy", model.augmentations()); - Assertions.assertEquals(58.230556F, model.beta1()); - Assertions.assertEquals(50.90398F, model.beta2()); - Assertions.assertEquals(901298308, model.checkpointFrequency()); - Assertions.assertEquals("advhmli", model.checkpointRunId()); - Assertions.assertEquals("qszz", model.checkpointModel().description()); - Assertions.assertEquals("igowxxbhtpsyioqe", model.checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.checkpointModel().mode()); - Assertions.assertEquals(true, model.distributed()); - Assertions.assertEquals(false, model.earlyStopping()); - Assertions.assertEquals(958652184, model.earlyStoppingDelay()); - Assertions.assertEquals(1740509933, model.earlyStoppingPatience()); - Assertions.assertEquals(1046556371, model.evaluationFrequency()); - Assertions.assertEquals(true, model.enableOnnxNormalization()); - Assertions.assertEquals(321986139, model.gradientAccumulationStep()); - Assertions.assertEquals(1384834321, model.layersToFreeze()); - Assertions.assertEquals(89.54964F, model.learningRate()); - Assertions.assertEquals(LearningRateScheduler.STEP, model.learningRateScheduler()); - Assertions.assertEquals("ompnbnfgyweojbep", model.modelName()); - Assertions.assertEquals(27.62385F, model.momentum()); - Assertions.assertEquals(true, model.nesterov()); - Assertions.assertEquals(810296596, model.numberOfEpochs()); - Assertions.assertEquals(1614250259, model.numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.optimizer()); - Assertions.assertEquals(1918105896, model.randomSeed()); - Assertions.assertEquals(55.955624F, model.stepLRGamma()); - Assertions.assertEquals(1172060548, model.stepLRStepSize()); - Assertions.assertEquals(2093190507, model.trainingBatchSize()); - Assertions.assertEquals(1129435958, model.validationBatchSize()); - Assertions.assertEquals(27.577805F, model.warmupCosineLRCycles()); - Assertions.assertEquals(1232186738, model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(96.705475F, model.weightDecay()); - Assertions.assertEquals(2019850919, model.trainingCropSize()); - Assertions.assertEquals(1207062922, model.validationCropSize()); - Assertions.assertEquals(284324942, model.validationResizeSize()); - Assertions.assertEquals(1254415877, model.weightedLoss()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageModelSettingsClassification model = new ImageModelSettingsClassification().withAmsGradient(true) - .withAdvancedSettings("vscbgngcrusxhir") - .withAugmentations("gcvsvkkjbjolpy") - .withBeta1(58.230556F) - .withBeta2(50.90398F) - .withCheckpointFrequency(901298308) - .withCheckpointRunId("advhmli") - .withCheckpointModel(new MLFlowModelJobInput().withDescription("qszz") - .withUri("igowxxbhtpsyioqe") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT)) - .withDistributed(true) - .withEarlyStopping(false) - .withEarlyStoppingDelay(958652184) - .withEarlyStoppingPatience(1740509933) - .withEvaluationFrequency(1046556371) - .withEnableOnnxNormalization(true) - .withGradientAccumulationStep(321986139) - .withLayersToFreeze(1384834321) - .withLearningRate(89.54964F) - .withLearningRateScheduler(LearningRateScheduler.STEP) - .withModelName("ompnbnfgyweojbep") - .withMomentum(27.62385F) - .withNesterov(true) - .withNumberOfEpochs(810296596) - .withNumberOfWorkers(1614250259) - .withOptimizer(StochasticOptimizer.NONE) - .withRandomSeed(1918105896) - .withStepLRGamma(55.955624F) - .withStepLRStepSize(1172060548) - .withTrainingBatchSize(2093190507) - .withValidationBatchSize(1129435958) - .withWarmupCosineLRCycles(27.577805F) - .withWarmupCosineLRWarmupEpochs(1232186738) - .withWeightDecay(96.705475F) - .withTrainingCropSize(2019850919) - .withValidationCropSize(1207062922) - .withValidationResizeSize(284324942) - .withWeightedLoss(1254415877); - model = BinaryData.fromObject(model).toObject(ImageModelSettingsClassification.class); - Assertions.assertEquals(true, model.amsGradient()); - Assertions.assertEquals("vscbgngcrusxhir", model.advancedSettings()); - Assertions.assertEquals("gcvsvkkjbjolpy", model.augmentations()); - Assertions.assertEquals(58.230556F, model.beta1()); - Assertions.assertEquals(50.90398F, model.beta2()); - Assertions.assertEquals(901298308, model.checkpointFrequency()); - Assertions.assertEquals("advhmli", model.checkpointRunId()); - Assertions.assertEquals("qszz", model.checkpointModel().description()); - Assertions.assertEquals("igowxxbhtpsyioqe", model.checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.checkpointModel().mode()); - Assertions.assertEquals(true, model.distributed()); - Assertions.assertEquals(false, model.earlyStopping()); - Assertions.assertEquals(958652184, model.earlyStoppingDelay()); - Assertions.assertEquals(1740509933, model.earlyStoppingPatience()); - Assertions.assertEquals(1046556371, model.evaluationFrequency()); - Assertions.assertEquals(true, model.enableOnnxNormalization()); - Assertions.assertEquals(321986139, model.gradientAccumulationStep()); - Assertions.assertEquals(1384834321, model.layersToFreeze()); - Assertions.assertEquals(89.54964F, model.learningRate()); - Assertions.assertEquals(LearningRateScheduler.STEP, model.learningRateScheduler()); - Assertions.assertEquals("ompnbnfgyweojbep", model.modelName()); - Assertions.assertEquals(27.62385F, model.momentum()); - Assertions.assertEquals(true, model.nesterov()); - Assertions.assertEquals(810296596, model.numberOfEpochs()); - Assertions.assertEquals(1614250259, model.numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.optimizer()); - Assertions.assertEquals(1918105896, model.randomSeed()); - Assertions.assertEquals(55.955624F, model.stepLRGamma()); - Assertions.assertEquals(1172060548, model.stepLRStepSize()); - Assertions.assertEquals(2093190507, model.trainingBatchSize()); - Assertions.assertEquals(1129435958, model.validationBatchSize()); - Assertions.assertEquals(27.577805F, model.warmupCosineLRCycles()); - Assertions.assertEquals(1232186738, model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(96.705475F, model.weightDecay()); - Assertions.assertEquals(2019850919, model.trainingCropSize()); - Assertions.assertEquals(1207062922, model.validationCropSize()); - Assertions.assertEquals(284324942, model.validationResizeSize()); - Assertions.assertEquals(1254415877, 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 c0ebd36aa1849..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsObjectDetectionTests.java +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated 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\":838831750,\"boxScoreThreshold\":1.4475048,\"imageSize\":1865047625,\"maxSize\":1873973420,\"minSize\":314456492,\"modelSize\":\"Medium\",\"multiScale\":false,\"nmsIouThreshold\":73.60141,\"tileGridSize\":\"ae\",\"tileOverlapRatio\":38.204247,\"tilePredictionsNmsThreshold\":50.140213,\"validationIouThreshold\":76.77868,\"validationMetricType\":\"Voc\",\"amsGradient\":false,\"advancedSettings\":\"iurni\",\"augmentations\":\"pdyttqmiu\",\"beta1\":79.63432,\"beta2\":48.798817,\"checkpointFrequency\":1957117329,\"checkpointRunId\":\"mhhtuq\",\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"uri\":\"xynof\",\"mode\":\"EvalMount\",\"description\":\"fixngxeb\"},\"distributed\":true,\"earlyStopping\":true,\"earlyStoppingDelay\":1452325370,\"earlyStoppingPatience\":312132877,\"evaluationFrequency\":216348432,\"enableOnnxNormalization\":true,\"gradientAccumulationStep\":2915542,\"layersToFreeze\":1485527211,\"learningRate\":7.0822835,\"learningRateScheduler\":\"None\",\"modelName\":\"jlbsmndafbncuyj\",\"momentum\":57.50032,\"nesterov\":true,\"numberOfEpochs\":529757711,\"numberOfWorkers\":1143101731,\"optimizer\":\"None\",\"randomSeed\":1522797644,\"stepLRGamma\":73.525085,\"stepLRStepSize\":2081472947,\"trainingBatchSize\":1138618692,\"validationBatchSize\":917946265,\"warmupCosineLRCycles\":66.47967,\"warmupCosineLRWarmupEpochs\":1182072687,\"weightDecay\":30.044836}") - .toObject(ImageModelSettingsObjectDetection.class); - Assertions.assertEquals(false, model.amsGradient()); - Assertions.assertEquals("iurni", model.advancedSettings()); - Assertions.assertEquals("pdyttqmiu", model.augmentations()); - Assertions.assertEquals(79.63432F, model.beta1()); - Assertions.assertEquals(48.798817F, model.beta2()); - Assertions.assertEquals(1957117329, model.checkpointFrequency()); - Assertions.assertEquals("mhhtuq", model.checkpointRunId()); - Assertions.assertEquals("fixngxeb", model.checkpointModel().description()); - Assertions.assertEquals("xynof", model.checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.checkpointModel().mode()); - Assertions.assertEquals(true, model.distributed()); - Assertions.assertEquals(true, model.earlyStopping()); - Assertions.assertEquals(1452325370, model.earlyStoppingDelay()); - Assertions.assertEquals(312132877, model.earlyStoppingPatience()); - Assertions.assertEquals(216348432, model.evaluationFrequency()); - Assertions.assertEquals(true, model.enableOnnxNormalization()); - Assertions.assertEquals(2915542, model.gradientAccumulationStep()); - Assertions.assertEquals(1485527211, model.layersToFreeze()); - Assertions.assertEquals(7.0822835F, model.learningRate()); - Assertions.assertEquals(LearningRateScheduler.NONE, model.learningRateScheduler()); - Assertions.assertEquals("jlbsmndafbncuyj", model.modelName()); - Assertions.assertEquals(57.50032F, model.momentum()); - Assertions.assertEquals(true, model.nesterov()); - Assertions.assertEquals(529757711, model.numberOfEpochs()); - Assertions.assertEquals(1143101731, model.numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.optimizer()); - Assertions.assertEquals(1522797644, model.randomSeed()); - Assertions.assertEquals(73.525085F, model.stepLRGamma()); - Assertions.assertEquals(2081472947, model.stepLRStepSize()); - Assertions.assertEquals(1138618692, model.trainingBatchSize()); - Assertions.assertEquals(917946265, model.validationBatchSize()); - Assertions.assertEquals(66.47967F, model.warmupCosineLRCycles()); - Assertions.assertEquals(1182072687, model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(30.044836F, model.weightDecay()); - Assertions.assertEquals(838831750, model.boxDetectionsPerImage()); - Assertions.assertEquals(1.4475048F, model.boxScoreThreshold()); - Assertions.assertEquals(1865047625, model.imageSize()); - Assertions.assertEquals(1873973420, model.maxSize()); - Assertions.assertEquals(314456492, model.minSize()); - Assertions.assertEquals(ModelSize.MEDIUM, model.modelSize()); - Assertions.assertEquals(false, model.multiScale()); - Assertions.assertEquals(73.60141F, model.nmsIouThreshold()); - Assertions.assertEquals("ae", model.tileGridSize()); - Assertions.assertEquals(38.204247F, model.tileOverlapRatio()); - Assertions.assertEquals(50.140213F, model.tilePredictionsNmsThreshold()); - Assertions.assertEquals(76.77868F, model.validationIouThreshold()); - Assertions.assertEquals(ValidationMetricType.VOC, model.validationMetricType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageModelSettingsObjectDetection model = new ImageModelSettingsObjectDetection().withAmsGradient(false) - .withAdvancedSettings("iurni") - .withAugmentations("pdyttqmiu") - .withBeta1(79.63432F) - .withBeta2(48.798817F) - .withCheckpointFrequency(1957117329) - .withCheckpointRunId("mhhtuq") - .withCheckpointModel(new MLFlowModelJobInput().withDescription("fixngxeb") - .withUri("xynof") - .withMode(InputDeliveryMode.EVAL_MOUNT)) - .withDistributed(true) - .withEarlyStopping(true) - .withEarlyStoppingDelay(1452325370) - .withEarlyStoppingPatience(312132877) - .withEvaluationFrequency(216348432) - .withEnableOnnxNormalization(true) - .withGradientAccumulationStep(2915542) - .withLayersToFreeze(1485527211) - .withLearningRate(7.0822835F) - .withLearningRateScheduler(LearningRateScheduler.NONE) - .withModelName("jlbsmndafbncuyj") - .withMomentum(57.50032F) - .withNesterov(true) - .withNumberOfEpochs(529757711) - .withNumberOfWorkers(1143101731) - .withOptimizer(StochasticOptimizer.NONE) - .withRandomSeed(1522797644) - .withStepLRGamma(73.525085F) - .withStepLRStepSize(2081472947) - .withTrainingBatchSize(1138618692) - .withValidationBatchSize(917946265) - .withWarmupCosineLRCycles(66.47967F) - .withWarmupCosineLRWarmupEpochs(1182072687) - .withWeightDecay(30.044836F) - .withBoxDetectionsPerImage(838831750) - .withBoxScoreThreshold(1.4475048F) - .withImageSize(1865047625) - .withMaxSize(1873973420) - .withMinSize(314456492) - .withModelSize(ModelSize.MEDIUM) - .withMultiScale(false) - .withNmsIouThreshold(73.60141F) - .withTileGridSize("ae") - .withTileOverlapRatio(38.204247F) - .withTilePredictionsNmsThreshold(50.140213F) - .withValidationIouThreshold(76.77868F) - .withValidationMetricType(ValidationMetricType.VOC); - model = BinaryData.fromObject(model).toObject(ImageModelSettingsObjectDetection.class); - Assertions.assertEquals(false, model.amsGradient()); - Assertions.assertEquals("iurni", model.advancedSettings()); - Assertions.assertEquals("pdyttqmiu", model.augmentations()); - Assertions.assertEquals(79.63432F, model.beta1()); - Assertions.assertEquals(48.798817F, model.beta2()); - Assertions.assertEquals(1957117329, model.checkpointFrequency()); - Assertions.assertEquals("mhhtuq", model.checkpointRunId()); - Assertions.assertEquals("fixngxeb", model.checkpointModel().description()); - Assertions.assertEquals("xynof", model.checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.checkpointModel().mode()); - Assertions.assertEquals(true, model.distributed()); - Assertions.assertEquals(true, model.earlyStopping()); - Assertions.assertEquals(1452325370, model.earlyStoppingDelay()); - Assertions.assertEquals(312132877, model.earlyStoppingPatience()); - Assertions.assertEquals(216348432, model.evaluationFrequency()); - Assertions.assertEquals(true, model.enableOnnxNormalization()); - Assertions.assertEquals(2915542, model.gradientAccumulationStep()); - Assertions.assertEquals(1485527211, model.layersToFreeze()); - Assertions.assertEquals(7.0822835F, model.learningRate()); - Assertions.assertEquals(LearningRateScheduler.NONE, model.learningRateScheduler()); - Assertions.assertEquals("jlbsmndafbncuyj", model.modelName()); - Assertions.assertEquals(57.50032F, model.momentum()); - Assertions.assertEquals(true, model.nesterov()); - Assertions.assertEquals(529757711, model.numberOfEpochs()); - Assertions.assertEquals(1143101731, model.numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.optimizer()); - Assertions.assertEquals(1522797644, model.randomSeed()); - Assertions.assertEquals(73.525085F, model.stepLRGamma()); - Assertions.assertEquals(2081472947, model.stepLRStepSize()); - Assertions.assertEquals(1138618692, model.trainingBatchSize()); - Assertions.assertEquals(917946265, model.validationBatchSize()); - Assertions.assertEquals(66.47967F, model.warmupCosineLRCycles()); - Assertions.assertEquals(1182072687, model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(30.044836F, model.weightDecay()); - Assertions.assertEquals(838831750, model.boxDetectionsPerImage()); - Assertions.assertEquals(1.4475048F, model.boxScoreThreshold()); - Assertions.assertEquals(1865047625, model.imageSize()); - Assertions.assertEquals(1873973420, model.maxSize()); - Assertions.assertEquals(314456492, model.minSize()); - Assertions.assertEquals(ModelSize.MEDIUM, model.modelSize()); - Assertions.assertEquals(false, model.multiScale()); - Assertions.assertEquals(73.60141F, model.nmsIouThreshold()); - Assertions.assertEquals("ae", model.tileGridSize()); - Assertions.assertEquals(38.204247F, model.tileOverlapRatio()); - Assertions.assertEquals(50.140213F, model.tilePredictionsNmsThreshold()); - Assertions.assertEquals(76.77868F, model.validationIouThreshold()); - Assertions.assertEquals(ValidationMetricType.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 d3ac029e49d15..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsTests.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated 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( - "{\"amsGradient\":false,\"advancedSettings\":\"bjepzwhj\",\"augmentations\":\"fdgbggcjxzhbl\",\"beta1\":22.508585,\"beta2\":51.947952,\"checkpointFrequency\":1855309521,\"checkpointRunId\":\"ym\",\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"uri\":\"bhdosmbngkql\",\"mode\":\"ReadWriteMount\",\"description\":\"uvxdmxexatmd\"},\"distributed\":false,\"earlyStopping\":true,\"earlyStoppingDelay\":307725158,\"earlyStoppingPatience\":1605028001,\"evaluationFrequency\":696774738,\"enableOnnxNormalization\":true,\"gradientAccumulationStep\":1911706738,\"layersToFreeze\":10967468,\"learningRate\":8.704895,\"learningRateScheduler\":\"WarmupCosine\",\"modelName\":\"kzsoxz\",\"momentum\":17.274517,\"nesterov\":false,\"numberOfEpochs\":401465476,\"numberOfWorkers\":381354685,\"optimizer\":\"Sgd\",\"randomSeed\":1477736921,\"stepLRGamma\":48.98826,\"stepLRStepSize\":960769540,\"trainingBatchSize\":556171799,\"validationBatchSize\":2147008649,\"warmupCosineLRCycles\":63.310665,\"warmupCosineLRWarmupEpochs\":218469091,\"weightDecay\":33.301514}") - .toObject(ImageModelSettings.class); - Assertions.assertEquals(false, model.amsGradient()); - Assertions.assertEquals("bjepzwhj", model.advancedSettings()); - Assertions.assertEquals("fdgbggcjxzhbl", model.augmentations()); - Assertions.assertEquals(22.508585F, model.beta1()); - Assertions.assertEquals(51.947952F, model.beta2()); - Assertions.assertEquals(1855309521, model.checkpointFrequency()); - Assertions.assertEquals("ym", model.checkpointRunId()); - Assertions.assertEquals("uvxdmxexatmd", model.checkpointModel().description()); - Assertions.assertEquals("bhdosmbngkql", model.checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.checkpointModel().mode()); - Assertions.assertEquals(false, model.distributed()); - Assertions.assertEquals(true, model.earlyStopping()); - Assertions.assertEquals(307725158, model.earlyStoppingDelay()); - Assertions.assertEquals(1605028001, model.earlyStoppingPatience()); - Assertions.assertEquals(696774738, model.evaluationFrequency()); - Assertions.assertEquals(true, model.enableOnnxNormalization()); - Assertions.assertEquals(1911706738, model.gradientAccumulationStep()); - Assertions.assertEquals(10967468, model.layersToFreeze()); - Assertions.assertEquals(8.704895F, model.learningRate()); - Assertions.assertEquals(LearningRateScheduler.WARMUP_COSINE, model.learningRateScheduler()); - Assertions.assertEquals("kzsoxz", model.modelName()); - Assertions.assertEquals(17.274517F, model.momentum()); - Assertions.assertEquals(false, model.nesterov()); - Assertions.assertEquals(401465476, model.numberOfEpochs()); - Assertions.assertEquals(381354685, model.numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.SGD, model.optimizer()); - Assertions.assertEquals(1477736921, model.randomSeed()); - Assertions.assertEquals(48.98826F, model.stepLRGamma()); - Assertions.assertEquals(960769540, model.stepLRStepSize()); - Assertions.assertEquals(556171799, model.trainingBatchSize()); - Assertions.assertEquals(2147008649, model.validationBatchSize()); - Assertions.assertEquals(63.310665F, model.warmupCosineLRCycles()); - Assertions.assertEquals(218469091, model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(33.301514F, model.weightDecay()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageModelSettings model = new ImageModelSettings().withAmsGradient(false) - .withAdvancedSettings("bjepzwhj") - .withAugmentations("fdgbggcjxzhbl") - .withBeta1(22.508585F) - .withBeta2(51.947952F) - .withCheckpointFrequency(1855309521) - .withCheckpointRunId("ym") - .withCheckpointModel(new MLFlowModelJobInput().withDescription("uvxdmxexatmd") - .withUri("bhdosmbngkql") - .withMode(InputDeliveryMode.READ_WRITE_MOUNT)) - .withDistributed(false) - .withEarlyStopping(true) - .withEarlyStoppingDelay(307725158) - .withEarlyStoppingPatience(1605028001) - .withEvaluationFrequency(696774738) - .withEnableOnnxNormalization(true) - .withGradientAccumulationStep(1911706738) - .withLayersToFreeze(10967468) - .withLearningRate(8.704895F) - .withLearningRateScheduler(LearningRateScheduler.WARMUP_COSINE) - .withModelName("kzsoxz") - .withMomentum(17.274517F) - .withNesterov(false) - .withNumberOfEpochs(401465476) - .withNumberOfWorkers(381354685) - .withOptimizer(StochasticOptimizer.SGD) - .withRandomSeed(1477736921) - .withStepLRGamma(48.98826F) - .withStepLRStepSize(960769540) - .withTrainingBatchSize(556171799) - .withValidationBatchSize(2147008649) - .withWarmupCosineLRCycles(63.310665F) - .withWarmupCosineLRWarmupEpochs(218469091) - .withWeightDecay(33.301514F); - model = BinaryData.fromObject(model).toObject(ImageModelSettings.class); - Assertions.assertEquals(false, model.amsGradient()); - Assertions.assertEquals("bjepzwhj", model.advancedSettings()); - Assertions.assertEquals("fdgbggcjxzhbl", model.augmentations()); - Assertions.assertEquals(22.508585F, model.beta1()); - Assertions.assertEquals(51.947952F, model.beta2()); - Assertions.assertEquals(1855309521, model.checkpointFrequency()); - Assertions.assertEquals("ym", model.checkpointRunId()); - Assertions.assertEquals("uvxdmxexatmd", model.checkpointModel().description()); - Assertions.assertEquals("bhdosmbngkql", model.checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.checkpointModel().mode()); - Assertions.assertEquals(false, model.distributed()); - Assertions.assertEquals(true, model.earlyStopping()); - Assertions.assertEquals(307725158, model.earlyStoppingDelay()); - Assertions.assertEquals(1605028001, model.earlyStoppingPatience()); - Assertions.assertEquals(696774738, model.evaluationFrequency()); - Assertions.assertEquals(true, model.enableOnnxNormalization()); - Assertions.assertEquals(1911706738, model.gradientAccumulationStep()); - Assertions.assertEquals(10967468, model.layersToFreeze()); - Assertions.assertEquals(8.704895F, model.learningRate()); - Assertions.assertEquals(LearningRateScheduler.WARMUP_COSINE, model.learningRateScheduler()); - Assertions.assertEquals("kzsoxz", model.modelName()); - Assertions.assertEquals(17.274517F, model.momentum()); - Assertions.assertEquals(false, model.nesterov()); - Assertions.assertEquals(401465476, model.numberOfEpochs()); - Assertions.assertEquals(381354685, model.numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.SGD, model.optimizer()); - Assertions.assertEquals(1477736921, model.randomSeed()); - Assertions.assertEquals(48.98826F, model.stepLRGamma()); - Assertions.assertEquals(960769540, model.stepLRStepSize()); - Assertions.assertEquals(556171799, model.trainingBatchSize()); - Assertions.assertEquals(2147008649, model.validationBatchSize()); - Assertions.assertEquals(63.310665F, model.warmupCosineLRCycles()); - Assertions.assertEquals(218469091, model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(33.301514F, 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 50659c8622c70..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageObjectDetectionBaseTests.java +++ /dev/null @@ -1,456 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated 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\":1628267631,\"boxScoreThreshold\":29.993313,\"imageSize\":1142675426,\"maxSize\":926269302,\"minSize\":1191635799,\"modelSize\":\"ExtraLarge\",\"multiScale\":false,\"nmsIouThreshold\":32.659657,\"tileGridSize\":\"taxjucltjlxsgce\",\"tileOverlapRatio\":78.93754,\"tilePredictionsNmsThreshold\":16.3262,\"validationIouThreshold\":95.671394,\"validationMetricType\":\"Voc\",\"amsGradient\":false,\"advancedSettings\":\"vfjyzufldif\",\"augmentations\":\"vlutggmaacxauhv\",\"beta1\":26.423735,\"beta2\":35.01808,\"checkpointFrequency\":79908941,\"checkpointRunId\":\"qxtoiyygktsrjyxx\",\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"uri\":\"wfzbkve\",\"mode\":\"ReadWriteMount\",\"description\":\"xphsowbe\"},\"distributed\":true,\"earlyStopping\":true,\"earlyStoppingDelay\":1870801520,\"earlyStoppingPatience\":1858531947,\"evaluationFrequency\":500672005,\"enableOnnxNormalization\":true,\"gradientAccumulationStep\":1493541388,\"layersToFreeze\":1056931812,\"learningRate\":71.24121,\"learningRateScheduler\":\"Step\",\"modelName\":\"rafjajvkyxmm\",\"momentum\":42.656822,\"nesterov\":false,\"numberOfEpochs\":1801731269,\"numberOfWorkers\":1139337478,\"optimizer\":\"None\",\"randomSeed\":1799945532,\"stepLRGamma\":31.64695,\"stepLRStepSize\":762243556,\"trainingBatchSize\":250358057,\"validationBatchSize\":403241529,\"warmupCosineLRCycles\":45.694794,\"warmupCosineLRWarmupEpochs\":459919584,\"weightDecay\":87.26493},\"searchSpace\":[{\"boxDetectionsPerImage\":\"yphfxnrpdh\",\"boxScoreThreshold\":\"okyqsfkxfsy\",\"imageSize\":\"ihqbtod\",\"maxSize\":\"yxbvkvwzdmv\",\"minSize\":\"qwcrugyo\",\"modelSize\":\"za\",\"multiScale\":\"jdvvlrhocr\",\"nmsIouThreshold\":\"vxundqzbvbps\",\"tileGridSize\":\"qhxtozfgdkwbkur\",\"tileOverlapRatio\":\"piigf\",\"tilePredictionsNmsThreshold\":\"keutuipjclzjwaq\",\"validationIouThreshold\":\"qydewuwxyllz\",\"validationMetricType\":\"evt\",\"amsGradient\":\"wczochw\",\"augmentations\":\"k\",\"beta1\":\"ynfpkyvnhiysdho\",\"beta2\":\"slhraqkiwlwkff\",\"distributed\":\"qwmwqoguflteat\",\"earlyStopping\":\"gefzj\",\"earlyStoppingDelay\":\"jtqbgysi\",\"earlyStoppingPatience\":\"hnvxwtd\",\"evaluationFrequency\":\"cbjdbtqy\",\"enableOnnxNormalization\":\"xu\",\"gradientAccumulationStep\":\"aujqgbbjv\",\"layersToFreeze\":\"oawh\",\"learningRate\":\"smbcsloygsab\",\"learningRateScheduler\":\"d\",\"modelName\":\"ronsdunr\",\"momentum\":\"vz\",\"nesterov\":\"tqhgz\",\"numberOfEpochs\":\"xtrvfdbqs\",\"numberOfWorkers\":\"qjbvitptpvsffa\",\"optimizer\":\"hpiwrmu\",\"randomSeed\":\"gjw\",\"stepLRGamma\":\"fdwfbwxy\",\"stepLRStepSize\":\"qtmg\",\"trainingBatchSize\":\"pdrmegajr\",\"validationBatchSize\":\"twymzs\",\"warmupCosineLRCycles\":\"qkkge\",\"warmupCosineLRWarmupEpochs\":\"iphgli\",\"weightDecay\":\"qsco\"},{\"boxDetectionsPerImage\":\"kj\",\"boxScoreThreshold\":\"axsqcomji\",\"imageSize\":\"incev\",\"maxSize\":\"kdevpximzii\",\"minSize\":\"eqmduvtvodqxxpqh\",\"modelSize\":\"qibtblmc\",\"multiScale\":\"j\",\"nmsIouThreshold\":\"notdofqvpbqsdqk\",\"tileGridSize\":\"bqsbbmitaf\",\"tileOverlapRatio\":\"zgcxsvqlcquf\",\"tilePredictionsNmsThreshold\":\"amxo\",\"validationIouThreshold\":\"gc\",\"validationMetricType\":\"yutehlkarvtipquk\",\"amsGradient\":\"iknsgo\",\"augmentations\":\"nswhpcek\",\"beta1\":\"vmfnnbbxn\",\"beta2\":\"fkk\",\"distributed\":\"eetxtpwcv\",\"earlyStopping\":\"fwsunjzijaciwmm\",\"earlyStoppingDelay\":\"tqdonbzzs\",\"earlyStoppingPatience\":\"zyviiwsu\",\"evaluationFrequency\":\"zhw\",\"enableOnnxNormalization\":\"uifkzqqhb\",\"gradientAccumulationStep\":\"loilmkfbeo\",\"layersToFreeze\":\"pjpngvyvuo\",\"learningRate\":\"dlpsx\",\"learningRateScheduler\":\"ugfw\",\"modelName\":\"qn\",\"momentum\":\"clo\",\"nesterov\":\"mvswxvjeleif\",\"numberOfEpochs\":\"d\",\"numberOfWorkers\":\"wwulkrybpaevy\",\"optimizer\":\"yjecrqkwakkch\",\"randomSeed\":\"oulborcxuibsdqbd\",\"stepLRGamma\":\"lp\",\"stepLRStepSize\":\"t\",\"trainingBatchSize\":\"wpgweoqhbj\",\"validationBatchSize\":\"qfbleruf\",\"warmupCosineLRCycles\":\"lcshjucihbym\",\"warmupCosineLRWarmupEpochs\":\"vtpnerxvje\",\"weightDecay\":\"ra\"},{\"boxDetectionsPerImage\":\"lhbimyii\",\"boxScoreThreshold\":\"a\",\"imageSize\":\"thtpqgfzdosi\",\"maxSize\":\"d\",\"minSize\":\"vflgzhc\",\"modelSize\":\"gwahcrxo\",\"multiScale\":\"rutvnpccxz\",\"nmsIouThreshold\":\"xpmhzghhhk\",\"tileGridSize\":\"njdtujqzvhnj\",\"tileOverlapRatio\":\"mxnhtm\",\"tilePredictionsNmsThreshold\":\"tqlfxolrwvtl\",\"validationIouThreshold\":\"yfjswequf\",\"validationMetricType\":\"yyopoaytwwgw\",\"amsGradient\":\"b\",\"augmentations\":\"bvufrkwjiemimdtn\",\"beta1\":\"wew\",\"beta2\":\"kreeeddd\",\"distributed\":\"tfquu\",\"earlyStopping\":\"clhsiigeeuw\",\"earlyStoppingDelay\":\"nqyxfedq\",\"earlyStoppingPatience\":\"tdqwynxo\",\"evaluationFrequency\":\"vbzpggpwme\",\"enableOnnxNormalization\":\"bqajejir\",\"gradientAccumulationStep\":\"vrvkgpogplb\",\"layersToFreeze\":\"vlnhx\",\"learningRate\":\"njhina\",\"learningRateScheduler\":\"esbxnepqmjmoplu\",\"modelName\":\"ykkfhsovadkrm\",\"momentum\":\"mwqpdkesjqbzkqm\",\"nesterov\":\"poriwbwggijtspzj\",\"numberOfEpochs\":\"rhikwsbzrhdug\",\"numberOfWorkers\":\"htrgz\",\"optimizer\":\"unjf\",\"randomSeed\":\"jhiycbauseqnczk\",\"stepLRGamma\":\"hvtuwyjsqwzsz\",\"stepLRStepSize\":\"zjg\",\"trainingBatchSize\":\"nkfnyskwwunq\",\"validationBatchSize\":\"za\",\"warmupCosineLRCycles\":\"jmslhi\",\"warmupCosineLRWarmupEpochs\":\"ukvbljpxpr\",\"weightDecay\":\"chyluqa\"},{\"boxDetectionsPerImage\":\"cufjjfxt\",\"boxScoreThreshold\":\"tqdstahhhsa\",\"imageSize\":\"xsri\",\"maxSize\":\"cw\",\"minSize\":\"aesyyefm\",\"modelSize\":\"oqotiiqbgpasrv\",\"multiScale\":\"tistyikjhorlx\",\"nmsIouThreshold\":\"ypk\",\"tileGridSize\":\"nycntr\",\"tileOverlapRatio\":\"xwtdmbqjtsuhqh\",\"tilePredictionsNmsThreshold\":\"xtdyqavfxbqmzxsy\",\"validationIouThreshold\":\"sinpaamihwbghvw\",\"validationMetricType\":\"pbgchcgsfzhb\",\"amsGradient\":\"iys\",\"augmentations\":\"jsdjpg\",\"beta1\":\"ysgwkcfferznzcbi\",\"beta2\":\"veomkhfeqc\",\"distributed\":\"plfpohimgckycjp\",\"earlyStopping\":\"b\",\"earlyStoppingDelay\":\"bznxsuloutnpbm\",\"earlyStoppingPatience\":\"oqohgp\",\"evaluationFrequency\":\"dmwk\",\"enableOnnxNormalization\":\"pfhsldqdza\",\"gradientAccumulationStep\":\"unye\",\"layersToFreeze\":\"yzdsytcikswhcam\",\"learningRate\":\"y\",\"learningRateScheduler\":\"xkcgsfcmvhadr\",\"modelName\":\"atvyrkljqkqws\",\"momentum\":\"tvjkowggxawwdm\",\"nesterov\":\"pnkteiidlbovwb\",\"numberOfEpochs\":\"prgeg\",\"numberOfWorkers\":\"ihkjcnerekyjuls\",\"optimizer\":\"wnqhqlqgpwxtvc\",\"randomSeed\":\"avv\",\"stepLRGamma\":\"xwvegenlrj\",\"stepLRStepSize\":\"mwevguyflnxel\",\"trainingBatchSize\":\"kfzcdetowwezhy\",\"validationBatchSize\":\"di\",\"warmupCosineLRCycles\":\"wqlqacs\",\"warmupCosineLRWarmupEpochs\":\"birtybcelfjn\",\"weightDecay\":\"dnjyhzfax\"}],\"limitSettings\":{\"maxTrials\":2124800129,\"timeout\":\"PT94H33M13S\",\"maxConcurrentTrials\":1476171773},\"sweepSettings\":{\"samplingAlgorithm\":\"Bayesian\",\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"evaluationInterval\":334216826,\"delayEvaluation\":297072472}},\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"xsorchazr\",\"mode\":\"Download\",\"description\":\"yhl\"},\"validationDataSize\":53.57251340621531}") - .toObject(ImageObjectDetectionBase.class); - Assertions.assertEquals(2124800129, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT94H33M13S"), model.limitSettings().timeout()); - Assertions.assertEquals(1476171773, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.BAYESIAN, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(334216826, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(297072472, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("yhl", model.validationData().description()); - Assertions.assertEquals("xsorchazr", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals(53.57251340621531D, model.validationDataSize()); - Assertions.assertEquals(false, model.modelSettings().amsGradient()); - Assertions.assertEquals("vfjyzufldif", model.modelSettings().advancedSettings()); - Assertions.assertEquals("vlutggmaacxauhv", model.modelSettings().augmentations()); - Assertions.assertEquals(26.423735F, model.modelSettings().beta1()); - Assertions.assertEquals(35.01808F, model.modelSettings().beta2()); - Assertions.assertEquals(79908941, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("qxtoiyygktsrjyxx", model.modelSettings().checkpointRunId()); - Assertions.assertEquals("xphsowbe", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals("wfzbkve", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals(true, model.modelSettings().distributed()); - Assertions.assertEquals(true, model.modelSettings().earlyStopping()); - Assertions.assertEquals(1870801520, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(1858531947, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(500672005, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(true, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1493541388, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(1056931812, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(71.24121F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.STEP, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("rafjajvkyxmm", model.modelSettings().modelName()); - Assertions.assertEquals(42.656822F, model.modelSettings().momentum()); - Assertions.assertEquals(false, model.modelSettings().nesterov()); - Assertions.assertEquals(1801731269, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(1139337478, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.modelSettings().optimizer()); - Assertions.assertEquals(1799945532, model.modelSettings().randomSeed()); - Assertions.assertEquals(31.64695F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(762243556, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(250358057, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(403241529, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(45.694794F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(459919584, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(87.26493F, model.modelSettings().weightDecay()); - Assertions.assertEquals(1628267631, model.modelSettings().boxDetectionsPerImage()); - Assertions.assertEquals(29.993313F, model.modelSettings().boxScoreThreshold()); - Assertions.assertEquals(1142675426, model.modelSettings().imageSize()); - Assertions.assertEquals(926269302, model.modelSettings().maxSize()); - Assertions.assertEquals(1191635799, model.modelSettings().minSize()); - Assertions.assertEquals(ModelSize.EXTRA_LARGE, model.modelSettings().modelSize()); - Assertions.assertEquals(false, model.modelSettings().multiScale()); - Assertions.assertEquals(32.659657F, model.modelSettings().nmsIouThreshold()); - Assertions.assertEquals("taxjucltjlxsgce", model.modelSettings().tileGridSize()); - Assertions.assertEquals(78.93754F, model.modelSettings().tileOverlapRatio()); - Assertions.assertEquals(16.3262F, model.modelSettings().tilePredictionsNmsThreshold()); - Assertions.assertEquals(95.671394F, model.modelSettings().validationIouThreshold()); - Assertions.assertEquals(ValidationMetricType.VOC, model.modelSettings().validationMetricType()); - Assertions.assertEquals("wczochw", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("k", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("ynfpkyvnhiysdho", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("slhraqkiwlwkff", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("qwmwqoguflteat", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("gefzj", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("jtqbgysi", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("hnvxwtd", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("cbjdbtqy", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("xu", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("aujqgbbjv", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("oawh", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("smbcsloygsab", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("d", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("ronsdunr", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("vz", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("tqhgz", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("xtrvfdbqs", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("qjbvitptpvsffa", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("hpiwrmu", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("gjw", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("fdwfbwxy", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("qtmg", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("pdrmegajr", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("twymzs", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("qkkge", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("iphgli", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("qsco", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("yphfxnrpdh", model.searchSpace().get(0).boxDetectionsPerImage()); - Assertions.assertEquals("okyqsfkxfsy", model.searchSpace().get(0).boxScoreThreshold()); - Assertions.assertEquals("ihqbtod", model.searchSpace().get(0).imageSize()); - Assertions.assertEquals("yxbvkvwzdmv", model.searchSpace().get(0).maxSize()); - Assertions.assertEquals("qwcrugyo", model.searchSpace().get(0).minSize()); - Assertions.assertEquals("za", model.searchSpace().get(0).modelSize()); - Assertions.assertEquals("jdvvlrhocr", model.searchSpace().get(0).multiScale()); - Assertions.assertEquals("vxundqzbvbps", model.searchSpace().get(0).nmsIouThreshold()); - Assertions.assertEquals("qhxtozfgdkwbkur", model.searchSpace().get(0).tileGridSize()); - Assertions.assertEquals("piigf", model.searchSpace().get(0).tileOverlapRatio()); - Assertions.assertEquals("keutuipjclzjwaq", model.searchSpace().get(0).tilePredictionsNmsThreshold()); - Assertions.assertEquals("qydewuwxyllz", model.searchSpace().get(0).validationIouThreshold()); - Assertions.assertEquals("evt", model.searchSpace().get(0).validationMetricType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageObjectDetectionBase model = new ImageObjectDetectionBase() - .withLimitSettings(new ImageLimitSettings().withMaxTrials(2124800129) - .withTimeout(Duration.parse("PT94H33M13S")) - .withMaxConcurrentTrials(1476171773)) - .withSweepSettings(new ImageSweepSettings().withSamplingAlgorithm(SamplingAlgorithmType.BAYESIAN) - .withEarlyTermination( - new EarlyTerminationPolicy().withEvaluationInterval(334216826).withDelayEvaluation(297072472))) - .withValidationData( - new MLTableJobInput().withDescription("yhl").withUri("xsorchazr").withMode(InputDeliveryMode.DOWNLOAD)) - .withValidationDataSize(53.57251340621531D) - .withModelSettings(new ImageModelSettingsObjectDetection().withAmsGradient(false) - .withAdvancedSettings("vfjyzufldif") - .withAugmentations("vlutggmaacxauhv") - .withBeta1(26.423735F) - .withBeta2(35.01808F) - .withCheckpointFrequency(79908941) - .withCheckpointRunId("qxtoiyygktsrjyxx") - .withCheckpointModel(new MLFlowModelJobInput().withDescription("xphsowbe") - .withUri("wfzbkve") - .withMode(InputDeliveryMode.READ_WRITE_MOUNT)) - .withDistributed(true) - .withEarlyStopping(true) - .withEarlyStoppingDelay(1870801520) - .withEarlyStoppingPatience(1858531947) - .withEvaluationFrequency(500672005) - .withEnableOnnxNormalization(true) - .withGradientAccumulationStep(1493541388) - .withLayersToFreeze(1056931812) - .withLearningRate(71.24121F) - .withLearningRateScheduler(LearningRateScheduler.STEP) - .withModelName("rafjajvkyxmm") - .withMomentum(42.656822F) - .withNesterov(false) - .withNumberOfEpochs(1801731269) - .withNumberOfWorkers(1139337478) - .withOptimizer(StochasticOptimizer.NONE) - .withRandomSeed(1799945532) - .withStepLRGamma(31.64695F) - .withStepLRStepSize(762243556) - .withTrainingBatchSize(250358057) - .withValidationBatchSize(403241529) - .withWarmupCosineLRCycles(45.694794F) - .withWarmupCosineLRWarmupEpochs(459919584) - .withWeightDecay(87.26493F) - .withBoxDetectionsPerImage(1628267631) - .withBoxScoreThreshold(29.993313F) - .withImageSize(1142675426) - .withMaxSize(926269302) - .withMinSize(1191635799) - .withModelSize(ModelSize.EXTRA_LARGE) - .withMultiScale(false) - .withNmsIouThreshold(32.659657F) - .withTileGridSize("taxjucltjlxsgce") - .withTileOverlapRatio(78.93754F) - .withTilePredictionsNmsThreshold(16.3262F) - .withValidationIouThreshold(95.671394F) - .withValidationMetricType(ValidationMetricType.VOC)) - .withSearchSpace(Arrays.asList( - new ImageModelDistributionSettingsObjectDetection().withAmsGradient("wczochw") - .withAugmentations("k") - .withBeta1("ynfpkyvnhiysdho") - .withBeta2("slhraqkiwlwkff") - .withDistributed("qwmwqoguflteat") - .withEarlyStopping("gefzj") - .withEarlyStoppingDelay("jtqbgysi") - .withEarlyStoppingPatience("hnvxwtd") - .withEvaluationFrequency("cbjdbtqy") - .withEnableOnnxNormalization("xu") - .withGradientAccumulationStep("aujqgbbjv") - .withLayersToFreeze("oawh") - .withLearningRate("smbcsloygsab") - .withLearningRateScheduler("d") - .withModelName("ronsdunr") - .withMomentum("vz") - .withNesterov("tqhgz") - .withNumberOfEpochs("xtrvfdbqs") - .withNumberOfWorkers("qjbvitptpvsffa") - .withOptimizer("hpiwrmu") - .withRandomSeed("gjw") - .withStepLRGamma("fdwfbwxy") - .withStepLRStepSize("qtmg") - .withTrainingBatchSize("pdrmegajr") - .withValidationBatchSize("twymzs") - .withWarmupCosineLRCycles("qkkge") - .withWarmupCosineLRWarmupEpochs("iphgli") - .withWeightDecay("qsco") - .withBoxDetectionsPerImage("yphfxnrpdh") - .withBoxScoreThreshold("okyqsfkxfsy") - .withImageSize("ihqbtod") - .withMaxSize("yxbvkvwzdmv") - .withMinSize("qwcrugyo") - .withModelSize("za") - .withMultiScale("jdvvlrhocr") - .withNmsIouThreshold("vxundqzbvbps") - .withTileGridSize("qhxtozfgdkwbkur") - .withTileOverlapRatio("piigf") - .withTilePredictionsNmsThreshold("keutuipjclzjwaq") - .withValidationIouThreshold("qydewuwxyllz") - .withValidationMetricType("evt"), - new ImageModelDistributionSettingsObjectDetection().withAmsGradient("iknsgo") - .withAugmentations("nswhpcek") - .withBeta1("vmfnnbbxn") - .withBeta2("fkk") - .withDistributed("eetxtpwcv") - .withEarlyStopping("fwsunjzijaciwmm") - .withEarlyStoppingDelay("tqdonbzzs") - .withEarlyStoppingPatience("zyviiwsu") - .withEvaluationFrequency("zhw") - .withEnableOnnxNormalization("uifkzqqhb") - .withGradientAccumulationStep("loilmkfbeo") - .withLayersToFreeze("pjpngvyvuo") - .withLearningRate("dlpsx") - .withLearningRateScheduler("ugfw") - .withModelName("qn") - .withMomentum("clo") - .withNesterov("mvswxvjeleif") - .withNumberOfEpochs("d") - .withNumberOfWorkers("wwulkrybpaevy") - .withOptimizer("yjecrqkwakkch") - .withRandomSeed("oulborcxuibsdqbd") - .withStepLRGamma("lp") - .withStepLRStepSize("t") - .withTrainingBatchSize("wpgweoqhbj") - .withValidationBatchSize("qfbleruf") - .withWarmupCosineLRCycles("lcshjucihbym") - .withWarmupCosineLRWarmupEpochs("vtpnerxvje") - .withWeightDecay("ra") - .withBoxDetectionsPerImage("kj") - .withBoxScoreThreshold("axsqcomji") - .withImageSize("incev") - .withMaxSize("kdevpximzii") - .withMinSize("eqmduvtvodqxxpqh") - .withModelSize("qibtblmc") - .withMultiScale("j") - .withNmsIouThreshold("notdofqvpbqsdqk") - .withTileGridSize("bqsbbmitaf") - .withTileOverlapRatio("zgcxsvqlcquf") - .withTilePredictionsNmsThreshold("amxo") - .withValidationIouThreshold("gc") - .withValidationMetricType("yutehlkarvtipquk"), - new ImageModelDistributionSettingsObjectDetection().withAmsGradient("b") - .withAugmentations("bvufrkwjiemimdtn") - .withBeta1("wew") - .withBeta2("kreeeddd") - .withDistributed("tfquu") - .withEarlyStopping("clhsiigeeuw") - .withEarlyStoppingDelay("nqyxfedq") - .withEarlyStoppingPatience("tdqwynxo") - .withEvaluationFrequency("vbzpggpwme") - .withEnableOnnxNormalization("bqajejir") - .withGradientAccumulationStep("vrvkgpogplb") - .withLayersToFreeze("vlnhx") - .withLearningRate("njhina") - .withLearningRateScheduler("esbxnepqmjmoplu") - .withModelName("ykkfhsovadkrm") - .withMomentum("mwqpdkesjqbzkqm") - .withNesterov("poriwbwggijtspzj") - .withNumberOfEpochs("rhikwsbzrhdug") - .withNumberOfWorkers("htrgz") - .withOptimizer("unjf") - .withRandomSeed("jhiycbauseqnczk") - .withStepLRGamma("hvtuwyjsqwzsz") - .withStepLRStepSize("zjg") - .withTrainingBatchSize("nkfnyskwwunq") - .withValidationBatchSize("za") - .withWarmupCosineLRCycles("jmslhi") - .withWarmupCosineLRWarmupEpochs("ukvbljpxpr") - .withWeightDecay("chyluqa") - .withBoxDetectionsPerImage("lhbimyii") - .withBoxScoreThreshold("a") - .withImageSize("thtpqgfzdosi") - .withMaxSize("d") - .withMinSize("vflgzhc") - .withModelSize("gwahcrxo") - .withMultiScale("rutvnpccxz") - .withNmsIouThreshold("xpmhzghhhk") - .withTileGridSize("njdtujqzvhnj") - .withTileOverlapRatio("mxnhtm") - .withTilePredictionsNmsThreshold("tqlfxolrwvtl") - .withValidationIouThreshold("yfjswequf") - .withValidationMetricType("yyopoaytwwgw"), - new ImageModelDistributionSettingsObjectDetection().withAmsGradient("iys") - .withAugmentations("jsdjpg") - .withBeta1("ysgwkcfferznzcbi") - .withBeta2("veomkhfeqc") - .withDistributed("plfpohimgckycjp") - .withEarlyStopping("b") - .withEarlyStoppingDelay("bznxsuloutnpbm") - .withEarlyStoppingPatience("oqohgp") - .withEvaluationFrequency("dmwk") - .withEnableOnnxNormalization("pfhsldqdza") - .withGradientAccumulationStep("unye") - .withLayersToFreeze("yzdsytcikswhcam") - .withLearningRate("y") - .withLearningRateScheduler("xkcgsfcmvhadr") - .withModelName("atvyrkljqkqws") - .withMomentum("tvjkowggxawwdm") - .withNesterov("pnkteiidlbovwb") - .withNumberOfEpochs("prgeg") - .withNumberOfWorkers("ihkjcnerekyjuls") - .withOptimizer("wnqhqlqgpwxtvc") - .withRandomSeed("avv") - .withStepLRGamma("xwvegenlrj") - .withStepLRStepSize("mwevguyflnxel") - .withTrainingBatchSize("kfzcdetowwezhy") - .withValidationBatchSize("di") - .withWarmupCosineLRCycles("wqlqacs") - .withWarmupCosineLRWarmupEpochs("birtybcelfjn") - .withWeightDecay("dnjyhzfax") - .withBoxDetectionsPerImage("cufjjfxt") - .withBoxScoreThreshold("tqdstahhhsa") - .withImageSize("xsri") - .withMaxSize("cw") - .withMinSize("aesyyefm") - .withModelSize("oqotiiqbgpasrv") - .withMultiScale("tistyikjhorlx") - .withNmsIouThreshold("ypk") - .withTileGridSize("nycntr") - .withTileOverlapRatio("xwtdmbqjtsuhqh") - .withTilePredictionsNmsThreshold("xtdyqavfxbqmzxsy") - .withValidationIouThreshold("sinpaamihwbghvw") - .withValidationMetricType("pbgchcgsfzhb"))); - model = BinaryData.fromObject(model).toObject(ImageObjectDetectionBase.class); - Assertions.assertEquals(2124800129, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT94H33M13S"), model.limitSettings().timeout()); - Assertions.assertEquals(1476171773, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.BAYESIAN, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(334216826, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(297072472, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("yhl", model.validationData().description()); - Assertions.assertEquals("xsorchazr", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals(53.57251340621531D, model.validationDataSize()); - Assertions.assertEquals(false, model.modelSettings().amsGradient()); - Assertions.assertEquals("vfjyzufldif", model.modelSettings().advancedSettings()); - Assertions.assertEquals("vlutggmaacxauhv", model.modelSettings().augmentations()); - Assertions.assertEquals(26.423735F, model.modelSettings().beta1()); - Assertions.assertEquals(35.01808F, model.modelSettings().beta2()); - Assertions.assertEquals(79908941, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("qxtoiyygktsrjyxx", model.modelSettings().checkpointRunId()); - Assertions.assertEquals("xphsowbe", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals("wfzbkve", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals(true, model.modelSettings().distributed()); - Assertions.assertEquals(true, model.modelSettings().earlyStopping()); - Assertions.assertEquals(1870801520, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(1858531947, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(500672005, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(true, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1493541388, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(1056931812, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(71.24121F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.STEP, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("rafjajvkyxmm", model.modelSettings().modelName()); - Assertions.assertEquals(42.656822F, model.modelSettings().momentum()); - Assertions.assertEquals(false, model.modelSettings().nesterov()); - Assertions.assertEquals(1801731269, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(1139337478, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.modelSettings().optimizer()); - Assertions.assertEquals(1799945532, model.modelSettings().randomSeed()); - Assertions.assertEquals(31.64695F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(762243556, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(250358057, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(403241529, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(45.694794F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(459919584, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(87.26493F, model.modelSettings().weightDecay()); - Assertions.assertEquals(1628267631, model.modelSettings().boxDetectionsPerImage()); - Assertions.assertEquals(29.993313F, model.modelSettings().boxScoreThreshold()); - Assertions.assertEquals(1142675426, model.modelSettings().imageSize()); - Assertions.assertEquals(926269302, model.modelSettings().maxSize()); - Assertions.assertEquals(1191635799, model.modelSettings().minSize()); - Assertions.assertEquals(ModelSize.EXTRA_LARGE, model.modelSettings().modelSize()); - Assertions.assertEquals(false, model.modelSettings().multiScale()); - Assertions.assertEquals(32.659657F, model.modelSettings().nmsIouThreshold()); - Assertions.assertEquals("taxjucltjlxsgce", model.modelSettings().tileGridSize()); - Assertions.assertEquals(78.93754F, model.modelSettings().tileOverlapRatio()); - Assertions.assertEquals(16.3262F, model.modelSettings().tilePredictionsNmsThreshold()); - Assertions.assertEquals(95.671394F, model.modelSettings().validationIouThreshold()); - Assertions.assertEquals(ValidationMetricType.VOC, model.modelSettings().validationMetricType()); - Assertions.assertEquals("wczochw", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("k", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("ynfpkyvnhiysdho", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("slhraqkiwlwkff", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("qwmwqoguflteat", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("gefzj", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("jtqbgysi", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("hnvxwtd", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("cbjdbtqy", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("xu", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("aujqgbbjv", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("oawh", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("smbcsloygsab", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("d", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("ronsdunr", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("vz", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("tqhgz", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("xtrvfdbqs", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("qjbvitptpvsffa", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("hpiwrmu", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("gjw", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("fdwfbwxy", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("qtmg", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("pdrmegajr", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("twymzs", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("qkkge", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("iphgli", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("qsco", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("yphfxnrpdh", model.searchSpace().get(0).boxDetectionsPerImage()); - Assertions.assertEquals("okyqsfkxfsy", model.searchSpace().get(0).boxScoreThreshold()); - Assertions.assertEquals("ihqbtod", model.searchSpace().get(0).imageSize()); - Assertions.assertEquals("yxbvkvwzdmv", model.searchSpace().get(0).maxSize()); - Assertions.assertEquals("qwcrugyo", model.searchSpace().get(0).minSize()); - Assertions.assertEquals("za", model.searchSpace().get(0).modelSize()); - Assertions.assertEquals("jdvvlrhocr", model.searchSpace().get(0).multiScale()); - Assertions.assertEquals("vxundqzbvbps", model.searchSpace().get(0).nmsIouThreshold()); - Assertions.assertEquals("qhxtozfgdkwbkur", model.searchSpace().get(0).tileGridSize()); - Assertions.assertEquals("piigf", model.searchSpace().get(0).tileOverlapRatio()); - Assertions.assertEquals("keutuipjclzjwaq", model.searchSpace().get(0).tilePredictionsNmsThreshold()); - Assertions.assertEquals("qydewuwxyllz", model.searchSpace().get(0).validationIouThreshold()); - Assertions.assertEquals("evt", 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 79f5b7f4eca3c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageObjectDetectionTests.java +++ /dev/null @@ -1,353 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated 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\":710248775,\"boxScoreThreshold\":35.895603,\"imageSize\":422240348,\"maxSize\":1978252606,\"minSize\":623951562,\"modelSize\":\"ExtraLarge\",\"multiScale\":false,\"nmsIouThreshold\":78.472176,\"tileGridSize\":\"sfhshag\",\"tileOverlapRatio\":60.31503,\"tilePredictionsNmsThreshold\":40.6852,\"validationIouThreshold\":80.38389,\"validationMetricType\":\"Voc\",\"amsGradient\":true,\"advancedSettings\":\"ynpmggqgagen\",\"augmentations\":\"bugihcdvfo\",\"beta1\":78.53713,\"beta2\":79.4358,\"checkpointFrequency\":2145428842,\"checkpointRunId\":\"jzsaxzgkqwvde\",\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"uri\":\"jnaphifk\",\"mode\":\"EvalDownload\",\"description\":\"p\"},\"distributed\":false,\"earlyStopping\":true,\"earlyStoppingDelay\":567285474,\"earlyStoppingPatience\":2035748937,\"evaluationFrequency\":1219115371,\"enableOnnxNormalization\":false,\"gradientAccumulationStep\":1955623996,\"layersToFreeze\":38012767,\"learningRate\":98.00021,\"learningRateScheduler\":\"WarmupCosine\",\"modelName\":\"mskhnkkhbyk\",\"momentum\":82.803696,\"nesterov\":true,\"numberOfEpochs\":1727395180,\"numberOfWorkers\":625230069,\"optimizer\":\"Adam\",\"randomSeed\":870078306,\"stepLRGamma\":37.18851,\"stepLRStepSize\":386873853,\"trainingBatchSize\":1358303870,\"validationBatchSize\":312601450,\"warmupCosineLRCycles\":42.782837,\"warmupCosineLRWarmupEpochs\":1409319523,\"weightDecay\":78.56785},\"searchSpace\":[{\"boxDetectionsPerImage\":\"fuzzlapy\",\"boxScoreThreshold\":\"lvzcgulae\",\"imageSize\":\"iauqsuptessjlw\",\"maxSize\":\"atpvbl\",\"minSize\":\"xgxqayga\",\"modelSize\":\"kvc\",\"multiScale\":\"pvlcjbvyez\",\"nmsIouThreshold\":\"jkqonbw\",\"tileGridSize\":\"ieyozvrcwfpucwnb\",\"tileOverlapRatio\":\"qefgzjvbx\",\"tilePredictionsNmsThreshold\":\"bg\",\"validationIouThreshold\":\"rx\",\"validationMetricType\":\"uc\",\"amsGradient\":\"gvkdlhuduk\",\"augmentations\":\"joafm\",\"beta1\":\"exulvoepknarseia\",\"beta2\":\"sqoacb\",\"distributed\":\"dgsapleqfg\",\"earlyStopping\":\"env\",\"earlyStoppingDelay\":\"glvyakeszsuuvul\",\"earlyStoppingPatience\":\"cwgg\",\"evaluationFrequency\":\"xvlqgfbrve\",\"enableOnnxNormalization\":\"c\",\"gradientAccumulationStep\":\"vphirlzbip\",\"layersToFreeze\":\"nnepkwzzzku\",\"learningRate\":\"uwcjomip\",\"learningRateScheduler\":\"kaujttwykoxv\",\"modelName\":\"ofxxdplrelfk\",\"momentum\":\"ahcbtuxlbp\",\"nesterov\":\"hrfjenrazwefiktl\",\"numberOfEpochs\":\"ashtostjixyzseci\",\"numberOfWorkers\":\"zdwjtacfvvtdpcbp\",\"optimizer\":\"omcsaugbrhfiwltk\",\"randomSeed\":\"su\",\"stepLRGamma\":\"ethklxwhcv\",\"stepLRStepSize\":\"yyhgqokjbmsr\",\"trainingBatchSize\":\"xyxxhwr\",\"validationBatchSize\":\"omaqsyilpzzb\",\"warmupCosineLRCycles\":\"nrz\",\"warmupCosineLRWarmupEpochs\":\"sxagysokli\",\"weightDecay\":\"s\"}],\"limitSettings\":{\"maxTrials\":1698205031,\"timeout\":\"PT29H19M17S\",\"maxConcurrentTrials\":716194367},\"sweepSettings\":{\"samplingAlgorithm\":\"Random\",\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"evaluationInterval\":1409785,\"delayEvaluation\":962981411}},\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"cydyllmxv\",\"mode\":\"Download\",\"description\":\"zsyqagqllcbrvaid\"},\"validationDataSize\":69.76448748367842,\"logVerbosity\":\"Critical\",\"trainingData\":{\"jobInputType\":\"mltable\",\"uri\":\"rrqwfyybpt\",\"mode\":\"EvalDownload\",\"description\":\"nogykugdla\"},\"targetColumnName\":\"avgthkslge\"}") - .toObject(ImageObjectDetection.class); - Assertions.assertEquals(LogVerbosity.CRITICAL, model.logVerbosity()); - Assertions.assertEquals("nogykugdla", model.trainingData().description()); - Assertions.assertEquals("rrqwfyybpt", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("avgthkslge", model.targetColumnName()); - Assertions.assertEquals(ObjectDetectionPrimaryMetrics.MEAN_AVERAGE_PRECISION, model.primaryMetric()); - Assertions.assertEquals(true, model.modelSettings().amsGradient()); - Assertions.assertEquals("ynpmggqgagen", model.modelSettings().advancedSettings()); - Assertions.assertEquals("bugihcdvfo", model.modelSettings().augmentations()); - Assertions.assertEquals(78.53713F, model.modelSettings().beta1()); - Assertions.assertEquals(79.4358F, model.modelSettings().beta2()); - Assertions.assertEquals(2145428842, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("jzsaxzgkqwvde", model.modelSettings().checkpointRunId()); - Assertions.assertEquals("p", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals("jnaphifk", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals(false, model.modelSettings().distributed()); - Assertions.assertEquals(true, model.modelSettings().earlyStopping()); - Assertions.assertEquals(567285474, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(2035748937, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(1219115371, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(false, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1955623996, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(38012767, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(98.00021F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.WARMUP_COSINE, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("mskhnkkhbyk", model.modelSettings().modelName()); - Assertions.assertEquals(82.803696F, model.modelSettings().momentum()); - Assertions.assertEquals(true, model.modelSettings().nesterov()); - Assertions.assertEquals(1727395180, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(625230069, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.ADAM, model.modelSettings().optimizer()); - Assertions.assertEquals(870078306, model.modelSettings().randomSeed()); - Assertions.assertEquals(37.18851F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(386873853, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1358303870, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(312601450, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(42.782837F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(1409319523, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(78.56785F, model.modelSettings().weightDecay()); - Assertions.assertEquals(710248775, model.modelSettings().boxDetectionsPerImage()); - Assertions.assertEquals(35.895603F, model.modelSettings().boxScoreThreshold()); - Assertions.assertEquals(422240348, model.modelSettings().imageSize()); - Assertions.assertEquals(1978252606, model.modelSettings().maxSize()); - Assertions.assertEquals(623951562, model.modelSettings().minSize()); - Assertions.assertEquals(ModelSize.EXTRA_LARGE, model.modelSettings().modelSize()); - Assertions.assertEquals(false, model.modelSettings().multiScale()); - Assertions.assertEquals(78.472176F, model.modelSettings().nmsIouThreshold()); - Assertions.assertEquals("sfhshag", model.modelSettings().tileGridSize()); - Assertions.assertEquals(60.31503F, model.modelSettings().tileOverlapRatio()); - Assertions.assertEquals(40.6852F, model.modelSettings().tilePredictionsNmsThreshold()); - Assertions.assertEquals(80.38389F, model.modelSettings().validationIouThreshold()); - Assertions.assertEquals(ValidationMetricType.VOC, model.modelSettings().validationMetricType()); - Assertions.assertEquals("gvkdlhuduk", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("joafm", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("exulvoepknarseia", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("sqoacb", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("dgsapleqfg", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("env", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("glvyakeszsuuvul", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("cwgg", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("xvlqgfbrve", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("c", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("vphirlzbip", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("nnepkwzzzku", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("uwcjomip", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("kaujttwykoxv", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("ofxxdplrelfk", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("ahcbtuxlbp", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("hrfjenrazwefiktl", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("ashtostjixyzseci", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("zdwjtacfvvtdpcbp", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("omcsaugbrhfiwltk", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("su", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("ethklxwhcv", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("yyhgqokjbmsr", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("xyxxhwr", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("omaqsyilpzzb", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("nrz", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("sxagysokli", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("s", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("fuzzlapy", model.searchSpace().get(0).boxDetectionsPerImage()); - Assertions.assertEquals("lvzcgulae", model.searchSpace().get(0).boxScoreThreshold()); - Assertions.assertEquals("iauqsuptessjlw", model.searchSpace().get(0).imageSize()); - Assertions.assertEquals("atpvbl", model.searchSpace().get(0).maxSize()); - Assertions.assertEquals("xgxqayga", model.searchSpace().get(0).minSize()); - Assertions.assertEquals("kvc", model.searchSpace().get(0).modelSize()); - Assertions.assertEquals("pvlcjbvyez", model.searchSpace().get(0).multiScale()); - Assertions.assertEquals("jkqonbw", model.searchSpace().get(0).nmsIouThreshold()); - Assertions.assertEquals("ieyozvrcwfpucwnb", model.searchSpace().get(0).tileGridSize()); - Assertions.assertEquals("qefgzjvbx", model.searchSpace().get(0).tileOverlapRatio()); - Assertions.assertEquals("bg", model.searchSpace().get(0).tilePredictionsNmsThreshold()); - Assertions.assertEquals("rx", model.searchSpace().get(0).validationIouThreshold()); - Assertions.assertEquals("uc", model.searchSpace().get(0).validationMetricType()); - Assertions.assertEquals(1698205031, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT29H19M17S"), model.limitSettings().timeout()); - Assertions.assertEquals(716194367, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.RANDOM, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(1409785, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(962981411, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("zsyqagqllcbrvaid", model.validationData().description()); - Assertions.assertEquals("cydyllmxv", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals(69.76448748367842D, model.validationDataSize()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageObjectDetection model = new ImageObjectDetection().withLogVerbosity(LogVerbosity.CRITICAL) - .withTrainingData(new MLTableJobInput().withDescription("nogykugdla") - .withUri("rrqwfyybpt") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD)) - .withTargetColumnName("avgthkslge") - .withPrimaryMetric(ObjectDetectionPrimaryMetrics.MEAN_AVERAGE_PRECISION) - .withModelSettings(new ImageModelSettingsObjectDetection().withAmsGradient(true) - .withAdvancedSettings("ynpmggqgagen") - .withAugmentations("bugihcdvfo") - .withBeta1(78.53713F) - .withBeta2(79.4358F) - .withCheckpointFrequency(2145428842) - .withCheckpointRunId("jzsaxzgkqwvde") - .withCheckpointModel(new MLFlowModelJobInput().withDescription("p") - .withUri("jnaphifk") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD)) - .withDistributed(false) - .withEarlyStopping(true) - .withEarlyStoppingDelay(567285474) - .withEarlyStoppingPatience(2035748937) - .withEvaluationFrequency(1219115371) - .withEnableOnnxNormalization(false) - .withGradientAccumulationStep(1955623996) - .withLayersToFreeze(38012767) - .withLearningRate(98.00021F) - .withLearningRateScheduler(LearningRateScheduler.WARMUP_COSINE) - .withModelName("mskhnkkhbyk") - .withMomentum(82.803696F) - .withNesterov(true) - .withNumberOfEpochs(1727395180) - .withNumberOfWorkers(625230069) - .withOptimizer(StochasticOptimizer.ADAM) - .withRandomSeed(870078306) - .withStepLRGamma(37.18851F) - .withStepLRStepSize(386873853) - .withTrainingBatchSize(1358303870) - .withValidationBatchSize(312601450) - .withWarmupCosineLRCycles(42.782837F) - .withWarmupCosineLRWarmupEpochs(1409319523) - .withWeightDecay(78.56785F) - .withBoxDetectionsPerImage(710248775) - .withBoxScoreThreshold(35.895603F) - .withImageSize(422240348) - .withMaxSize(1978252606) - .withMinSize(623951562) - .withModelSize(ModelSize.EXTRA_LARGE) - .withMultiScale(false) - .withNmsIouThreshold(78.472176F) - .withTileGridSize("sfhshag") - .withTileOverlapRatio(60.31503F) - .withTilePredictionsNmsThreshold(40.6852F) - .withValidationIouThreshold(80.38389F) - .withValidationMetricType(ValidationMetricType.VOC)) - .withSearchSpace( - Arrays.asList(new ImageModelDistributionSettingsObjectDetection().withAmsGradient("gvkdlhuduk") - .withAugmentations("joafm") - .withBeta1("exulvoepknarseia") - .withBeta2("sqoacb") - .withDistributed("dgsapleqfg") - .withEarlyStopping("env") - .withEarlyStoppingDelay("glvyakeszsuuvul") - .withEarlyStoppingPatience("cwgg") - .withEvaluationFrequency("xvlqgfbrve") - .withEnableOnnxNormalization("c") - .withGradientAccumulationStep("vphirlzbip") - .withLayersToFreeze("nnepkwzzzku") - .withLearningRate("uwcjomip") - .withLearningRateScheduler("kaujttwykoxv") - .withModelName("ofxxdplrelfk") - .withMomentum("ahcbtuxlbp") - .withNesterov("hrfjenrazwefiktl") - .withNumberOfEpochs("ashtostjixyzseci") - .withNumberOfWorkers("zdwjtacfvvtdpcbp") - .withOptimizer("omcsaugbrhfiwltk") - .withRandomSeed("su") - .withStepLRGamma("ethklxwhcv") - .withStepLRStepSize("yyhgqokjbmsr") - .withTrainingBatchSize("xyxxhwr") - .withValidationBatchSize("omaqsyilpzzb") - .withWarmupCosineLRCycles("nrz") - .withWarmupCosineLRWarmupEpochs("sxagysokli") - .withWeightDecay("s") - .withBoxDetectionsPerImage("fuzzlapy") - .withBoxScoreThreshold("lvzcgulae") - .withImageSize("iauqsuptessjlw") - .withMaxSize("atpvbl") - .withMinSize("xgxqayga") - .withModelSize("kvc") - .withMultiScale("pvlcjbvyez") - .withNmsIouThreshold("jkqonbw") - .withTileGridSize("ieyozvrcwfpucwnb") - .withTileOverlapRatio("qefgzjvbx") - .withTilePredictionsNmsThreshold("bg") - .withValidationIouThreshold("rx") - .withValidationMetricType("uc"))) - .withLimitSettings(new ImageLimitSettings().withMaxTrials(1698205031) - .withTimeout(Duration.parse("PT29H19M17S")) - .withMaxConcurrentTrials(716194367)) - .withSweepSettings(new ImageSweepSettings().withSamplingAlgorithm(SamplingAlgorithmType.RANDOM) - .withEarlyTermination( - new EarlyTerminationPolicy().withEvaluationInterval(1409785).withDelayEvaluation(962981411))) - .withValidationData(new MLTableJobInput().withDescription("zsyqagqllcbrvaid") - .withUri("cydyllmxv") - .withMode(InputDeliveryMode.DOWNLOAD)) - .withValidationDataSize(69.76448748367842D); - model = BinaryData.fromObject(model).toObject(ImageObjectDetection.class); - Assertions.assertEquals(LogVerbosity.CRITICAL, model.logVerbosity()); - Assertions.assertEquals("nogykugdla", model.trainingData().description()); - Assertions.assertEquals("rrqwfyybpt", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("avgthkslge", model.targetColumnName()); - Assertions.assertEquals(ObjectDetectionPrimaryMetrics.MEAN_AVERAGE_PRECISION, model.primaryMetric()); - Assertions.assertEquals(true, model.modelSettings().amsGradient()); - Assertions.assertEquals("ynpmggqgagen", model.modelSettings().advancedSettings()); - Assertions.assertEquals("bugihcdvfo", model.modelSettings().augmentations()); - Assertions.assertEquals(78.53713F, model.modelSettings().beta1()); - Assertions.assertEquals(79.4358F, model.modelSettings().beta2()); - Assertions.assertEquals(2145428842, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("jzsaxzgkqwvde", model.modelSettings().checkpointRunId()); - Assertions.assertEquals("p", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals("jnaphifk", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals(false, model.modelSettings().distributed()); - Assertions.assertEquals(true, model.modelSettings().earlyStopping()); - Assertions.assertEquals(567285474, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(2035748937, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(1219115371, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(false, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1955623996, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(38012767, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(98.00021F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.WARMUP_COSINE, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("mskhnkkhbyk", model.modelSettings().modelName()); - Assertions.assertEquals(82.803696F, model.modelSettings().momentum()); - Assertions.assertEquals(true, model.modelSettings().nesterov()); - Assertions.assertEquals(1727395180, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(625230069, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.ADAM, model.modelSettings().optimizer()); - Assertions.assertEquals(870078306, model.modelSettings().randomSeed()); - Assertions.assertEquals(37.18851F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(386873853, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1358303870, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(312601450, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(42.782837F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(1409319523, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(78.56785F, model.modelSettings().weightDecay()); - Assertions.assertEquals(710248775, model.modelSettings().boxDetectionsPerImage()); - Assertions.assertEquals(35.895603F, model.modelSettings().boxScoreThreshold()); - Assertions.assertEquals(422240348, model.modelSettings().imageSize()); - Assertions.assertEquals(1978252606, model.modelSettings().maxSize()); - Assertions.assertEquals(623951562, model.modelSettings().minSize()); - Assertions.assertEquals(ModelSize.EXTRA_LARGE, model.modelSettings().modelSize()); - Assertions.assertEquals(false, model.modelSettings().multiScale()); - Assertions.assertEquals(78.472176F, model.modelSettings().nmsIouThreshold()); - Assertions.assertEquals("sfhshag", model.modelSettings().tileGridSize()); - Assertions.assertEquals(60.31503F, model.modelSettings().tileOverlapRatio()); - Assertions.assertEquals(40.6852F, model.modelSettings().tilePredictionsNmsThreshold()); - Assertions.assertEquals(80.38389F, model.modelSettings().validationIouThreshold()); - Assertions.assertEquals(ValidationMetricType.VOC, model.modelSettings().validationMetricType()); - Assertions.assertEquals("gvkdlhuduk", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("joafm", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("exulvoepknarseia", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("sqoacb", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("dgsapleqfg", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("env", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("glvyakeszsuuvul", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("cwgg", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("xvlqgfbrve", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("c", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("vphirlzbip", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("nnepkwzzzku", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("uwcjomip", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("kaujttwykoxv", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("ofxxdplrelfk", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("ahcbtuxlbp", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("hrfjenrazwefiktl", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("ashtostjixyzseci", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("zdwjtacfvvtdpcbp", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("omcsaugbrhfiwltk", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("su", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("ethklxwhcv", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("yyhgqokjbmsr", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("xyxxhwr", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("omaqsyilpzzb", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("nrz", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("sxagysokli", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("s", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("fuzzlapy", model.searchSpace().get(0).boxDetectionsPerImage()); - Assertions.assertEquals("lvzcgulae", model.searchSpace().get(0).boxScoreThreshold()); - Assertions.assertEquals("iauqsuptessjlw", model.searchSpace().get(0).imageSize()); - Assertions.assertEquals("atpvbl", model.searchSpace().get(0).maxSize()); - Assertions.assertEquals("xgxqayga", model.searchSpace().get(0).minSize()); - Assertions.assertEquals("kvc", model.searchSpace().get(0).modelSize()); - Assertions.assertEquals("pvlcjbvyez", model.searchSpace().get(0).multiScale()); - Assertions.assertEquals("jkqonbw", model.searchSpace().get(0).nmsIouThreshold()); - Assertions.assertEquals("ieyozvrcwfpucwnb", model.searchSpace().get(0).tileGridSize()); - Assertions.assertEquals("qefgzjvbx", model.searchSpace().get(0).tileOverlapRatio()); - Assertions.assertEquals("bg", model.searchSpace().get(0).tilePredictionsNmsThreshold()); - Assertions.assertEquals("rx", model.searchSpace().get(0).validationIouThreshold()); - Assertions.assertEquals("uc", model.searchSpace().get(0).validationMetricType()); - Assertions.assertEquals(1698205031, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT29H19M17S"), model.limitSettings().timeout()); - Assertions.assertEquals(716194367, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.RANDOM, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(1409785, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(962981411, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("zsyqagqllcbrvaid", model.validationData().description()); - Assertions.assertEquals("cydyllmxv", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals(69.76448748367842D, 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 62950c7050e53..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageSweepSettingsTests.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.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( - "{\"samplingAlgorithm\":\"Grid\",\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"evaluationInterval\":1821428619,\"delayEvaluation\":232113908}}") - .toObject(ImageSweepSettings.class); - Assertions.assertEquals(SamplingAlgorithmType.GRID, model.samplingAlgorithm()); - Assertions.assertEquals(1821428619, model.earlyTermination().evaluationInterval()); - Assertions.assertEquals(232113908, model.earlyTermination().delayEvaluation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageSweepSettings model = new ImageSweepSettings().withSamplingAlgorithm(SamplingAlgorithmType.GRID) - .withEarlyTermination( - new EarlyTerminationPolicy().withEvaluationInterval(1821428619).withDelayEvaluation(232113908)); - model = BinaryData.fromObject(model).toObject(ImageSweepSettings.class); - Assertions.assertEquals(SamplingAlgorithmType.GRID, model.samplingAlgorithm()); - Assertions.assertEquals(1821428619, model.earlyTermination().evaluationInterval()); - Assertions.assertEquals(232113908, model.earlyTermination().delayEvaluation()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageTests.java deleted file mode 100644 index 943123deaa9cd..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageTests.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.Image; -import com.azure.resourcemanager.machinelearning.models.ImageType; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ImageTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Image model = BinaryData.fromString( - "{\"type\":\"azureml\",\"reference\":\"zpbgkzc\",\"\":{\"ti\":\"dataiuzvkunhdimju\",\"gofmhxwrjlv\":\"datazkaugpucdocfqpl\"}}") - .toObject(Image.class); - Assertions.assertEquals(ImageType.AZUREML, model.type()); - Assertions.assertEquals("zpbgkzc", model.reference()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Image model - = new Image().withType(ImageType.AZUREML).withReference("zpbgkzc").withAdditionalProperties(mapOf()); - model = BinaryData.fromObject(model).toObject(Image.class); - Assertions.assertEquals(ImageType.AZUREML, model.type()); - Assertions.assertEquals("zpbgkzc", model.reference()); - } - - // 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/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 a0296ceb77930..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageVerticalTests.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.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\":{\"maxTrials\":1994872439,\"timeout\":\"PT128H24M14S\",\"maxConcurrentTrials\":963869601},\"sweepSettings\":{\"samplingAlgorithm\":\"Random\",\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"evaluationInterval\":676982942,\"delayEvaluation\":1015925891}},\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"nirupkqnst\",\"mode\":\"ReadOnlyMount\",\"description\":\"ibjg\"},\"validationDataSize\":70.27294181684461}") - .toObject(ImageVertical.class); - Assertions.assertEquals(1994872439, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT128H24M14S"), model.limitSettings().timeout()); - Assertions.assertEquals(963869601, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.RANDOM, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(676982942, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(1015925891, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("ibjg", model.validationData().description()); - Assertions.assertEquals("nirupkqnst", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals(70.27294181684461D, model.validationDataSize()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageVertical model - = new ImageVertical() - .withLimitSettings(new ImageLimitSettings().withMaxTrials(1994872439) - .withTimeout(Duration.parse("PT128H24M14S")) - .withMaxConcurrentTrials(963869601)) - .withSweepSettings( - new ImageSweepSettings().withSamplingAlgorithm(SamplingAlgorithmType.RANDOM) - .withEarlyTermination(new EarlyTerminationPolicy().withEvaluationInterval(676982942) - .withDelayEvaluation(1015925891))) - .withValidationData(new MLTableJobInput().withDescription("ibjg") - .withUri("nirupkqnst") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT)) - .withValidationDataSize(70.27294181684461D); - model = BinaryData.fromObject(model).toObject(ImageVertical.class); - Assertions.assertEquals(1994872439, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT128H24M14S"), model.limitSettings().timeout()); - Assertions.assertEquals(963869601, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(SamplingAlgorithmType.RANDOM, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals(676982942, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(1015925891, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals("ibjg", model.validationData().description()); - Assertions.assertEquals("nirupkqnst", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals(70.27294181684461D, model.validationDataSize()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IndexColumnTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IndexColumnTests.java deleted file mode 100644 index 315649dc9f166..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IndexColumnTests.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.FeatureDataType; -import com.azure.resourcemanager.machinelearning.models.IndexColumn; -import org.junit.jupiter.api.Assertions; - -public final class IndexColumnTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IndexColumn model - = BinaryData.fromString("{\"dataType\":\"Boolean\",\"columnName\":\"srsx\"}").toObject(IndexColumn.class); - Assertions.assertEquals(FeatureDataType.BOOLEAN, model.dataType()); - Assertions.assertEquals("srsx", model.columnName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IndexColumn model = new IndexColumn().withDataType(FeatureDataType.BOOLEAN).withColumnName("srsx"); - model = BinaryData.fromObject(model).toObject(IndexColumn.class); - Assertions.assertEquals(FeatureDataType.BOOLEAN, model.dataType()); - Assertions.assertEquals("srsx", model.columnName()); - } -} 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 50c06facefb08..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferenceContainerPropertiesTests.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.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\":\"lnacgcc\",\"port\":682130924},\"readinessRoute\":{\"path\":\"hxkizvytnrzv\",\"port\":349650849},\"scoringRoute\":{\"path\":\"r\",\"port\":2075017284}}") - .toObject(InferenceContainerProperties.class); - Assertions.assertEquals("lnacgcc", model.livenessRoute().path()); - Assertions.assertEquals(682130924, model.livenessRoute().port()); - Assertions.assertEquals("hxkizvytnrzv", model.readinessRoute().path()); - Assertions.assertEquals(349650849, model.readinessRoute().port()); - Assertions.assertEquals("r", model.scoringRoute().path()); - Assertions.assertEquals(2075017284, model.scoringRoute().port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InferenceContainerProperties model - = new InferenceContainerProperties().withLivenessRoute(new Route().withPath("lnacgcc").withPort(682130924)) - .withReadinessRoute(new Route().withPath("hxkizvytnrzv").withPort(349650849)) - .withScoringRoute(new Route().withPath("r").withPort(2075017284)); - model = BinaryData.fromObject(model).toObject(InferenceContainerProperties.class); - Assertions.assertEquals("lnacgcc", model.livenessRoute().path()); - Assertions.assertEquals(682130924, model.livenessRoute().port()); - Assertions.assertEquals("hxkizvytnrzv", model.readinessRoute().path()); - Assertions.assertEquals(349650849, model.readinessRoute().port()); - Assertions.assertEquals("r", model.scoringRoute().path()); - Assertions.assertEquals(2075017284, 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 fae7e25b9dbfc..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InstanceTypeSchemaResourcesTests.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.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\":{\"mdlgy\":\"mw\",\"gnqfqqdlcvmyol\":\"ixokwtjawhv\",\"nzyzawatuwqko\":\"aymjchtvsnvlaq\",\"wgwima\":\"bczothymgobllms\"},\"limits\":{\"vkhgv\":\"akhtmhobcyanrfvq\",\"ymhcctopuo\":\"ogxkfnaoa\",\"hquhczygxvhajp\":\"yrnskb\"}}") - .toObject(InstanceTypeSchemaResources.class); - Assertions.assertEquals("mw", model.requests().get("mdlgy")); - Assertions.assertEquals("akhtmhobcyanrfvq", model.limits().get("vkhgv")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InstanceTypeSchemaResources model = new InstanceTypeSchemaResources() - .withRequests(mapOf("mdlgy", "mw", "gnqfqqdlcvmyol", "ixokwtjawhv", "nzyzawatuwqko", "aymjchtvsnvlaq", - "wgwima", "bczothymgobllms")) - .withLimits(mapOf("vkhgv", "akhtmhobcyanrfvq", "ymhcctopuo", "ogxkfnaoa", "hquhczygxvhajp", "yrnskb")); - model = BinaryData.fromObject(model).toObject(InstanceTypeSchemaResources.class); - Assertions.assertEquals("mw", model.requests().get("mdlgy")); - Assertions.assertEquals("akhtmhobcyanrfvq", model.limits().get("vkhgv")); - } - - // 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/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 617c9326a2fab..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InstanceTypeSchemaTests.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.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\":{\"q\":\"vl\",\"nthbbnkgzukwd\":\"xyrqo\"},\"resources\":{\"requests\":{\"mlfuyfjbp\":\"jthfceyjnc\",\"yjmqrf\":\"iddhlrufzc\"},\"limits\":{\"rsazrhxud\":\"cuselq\",\"jmr\":\"qmdtffi\"}}}") - .toObject(InstanceTypeSchema.class); - Assertions.assertEquals("vl", model.nodeSelector().get("q")); - Assertions.assertEquals("jthfceyjnc", model.resources().requests().get("mlfuyfjbp")); - Assertions.assertEquals("cuselq", model.resources().limits().get("rsazrhxud")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InstanceTypeSchema model - = new InstanceTypeSchema().withNodeSelector(mapOf("q", "vl", "nthbbnkgzukwd", "xyrqo")) - .withResources(new InstanceTypeSchemaResources() - .withRequests(mapOf("mlfuyfjbp", "jthfceyjnc", "yjmqrf", "iddhlrufzc")) - .withLimits(mapOf("rsazrhxud", "cuselq", "jmr", "qmdtffi"))); - model = BinaryData.fromObject(model).toObject(InstanceTypeSchema.class); - Assertions.assertEquals("vl", model.nodeSelector().get("q")); - Assertions.assertEquals("jthfceyjnc", model.resources().requests().get("mlfuyfjbp")); - Assertions.assertEquals("cuselq", model.resources().limits().get("rsazrhxud")); - } - - // 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/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 bc33c602dee3a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBaseInnerTests.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.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.JobBaseInner; -import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; -import com.azure.resourcemanager.machinelearning.models.IdentityConfiguration; -import com.azure.resourcemanager.machinelearning.models.JobBaseProperties; -import com.azure.resourcemanager.machinelearning.models.JobService; -import com.azure.resourcemanager.machinelearning.models.Nodes; -import com.azure.resourcemanager.machinelearning.models.NotificationSetting; -import com.azure.resourcemanager.machinelearning.models.Webhook; -import java.util.Arrays; -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\",\"displayName\":\"agxnvhycvdimw\",\"status\":\"CancelRequested\",\"experimentName\":\"gzgy\",\"services\":{\"auzpjlx\":{\"jobServiceType\":\"rw\",\"port\":1907482272,\"endpoint\":\"ye\",\"status\":\"kdhmeottawjyosx\",\"errorMessage\":\"hnhjtfvpndpmi\",\"properties\":{\"l\":\"nwynudq\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"abnsmj\":{\"jobServiceType\":\"huxiqhzlraymez\",\"port\":161523803,\"endpoint\":\"ihmxrfdsajredn\",\"status\":\"yshtuwgmev\",\"errorMessage\":\"fpwzyifrkgwltx\",\"properties\":{\"r\":\"pxgzdyimsfayor\",\"oge\":\"vk\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"f\":{\"jobServiceType\":\"ynq\",\"port\":1693738620,\"endpoint\":\"qs\",\"status\":\"vwjtqpkevmyltjc\",\"errorMessage\":\"pxklurccl\",\"properties\":{\"gpxvkqmaupxvpi\":\"annnoytzposewx\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}}},\"computeId\":\"fyzyzeyuub\",\"isArchived\":false,\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"componentId\":\"l\",\"notificationSetting\":{\"emails\":[\"ith\",\"ygvfltgvdihoyn\"],\"emailOn\":[\"JobCancelled\",\"JobFailed\",\"JobCompleted\",\"JobFailed\"],\"webhooks\":{\"ucpcunnuzdqumoen\":{\"webhookType\":\"Webhook\",\"eventType\":\"cy\"},\"hqhsknd\":{\"webhookType\":\"Webhook\",\"eventType\":\"naie\"},\"anniyopetxivcnr\":{\"webhookType\":\"Webhook\",\"eventType\":\"lqkaadlknwf\"}}},\"description\":\"xnucaephblkwqp\",\"tags\":{\"uzqymtuowog\":\"bqsdtcjbctvi\",\"vbrzcdb\":\"gitsqh\"},\"properties\":{\"rdjyibqb\":\"zndscxmxeatkdbmw\",\"alfihcjmobcancd\":\"aomhjrmkuhmaxl\",\"vaknokzwjj\":\"xxqcwgaxf\",\"tixldzyyfytpqs\":\"r\"}},\"id\":\"ymmpujivy\",\"name\":\"lkjuvsmbmslzoyov\",\"type\":\"zdbpqv\"}") - .toObject(JobBaseInner.class); - Assertions.assertEquals("xnucaephblkwqp", model.properties().description()); - Assertions.assertEquals("bqsdtcjbctvi", model.properties().tags().get("uzqymtuowog")); - Assertions.assertEquals("zndscxmxeatkdbmw", model.properties().properties().get("rdjyibqb")); - Assertions.assertEquals("agxnvhycvdimw", model.properties().displayName()); - Assertions.assertEquals("gzgy", model.properties().experimentName()); - Assertions.assertEquals("rw", model.properties().services().get("auzpjlx").jobServiceType()); - Assertions.assertEquals(1907482272, model.properties().services().get("auzpjlx").port()); - Assertions.assertEquals("ye", model.properties().services().get("auzpjlx").endpoint()); - Assertions.assertEquals("nwynudq", model.properties().services().get("auzpjlx").properties().get("l")); - Assertions.assertEquals("fyzyzeyuub", model.properties().computeId()); - Assertions.assertEquals(false, model.properties().isArchived()); - Assertions.assertEquals("l", model.properties().componentId()); - Assertions.assertEquals("ith", model.properties().notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, - model.properties().notificationSetting().emailOn().get(0)); - Assertions.assertEquals("cy", - model.properties().notificationSetting().webhooks().get("ucpcunnuzdqumoen").eventType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobBaseInner model = new JobBaseInner().withProperties(new JobBaseProperties().withDescription("xnucaephblkwqp") - .withTags(mapOf("uzqymtuowog", "bqsdtcjbctvi", "vbrzcdb", "gitsqh")) - .withProperties(mapOf("rdjyibqb", "zndscxmxeatkdbmw", "alfihcjmobcancd", "aomhjrmkuhmaxl", "vaknokzwjj", - "xxqcwgaxf", "tixldzyyfytpqs", "r")) - .withDisplayName("agxnvhycvdimw") - .withExperimentName("gzgy") - .withServices(mapOf("auzpjlx", - new JobService().withJobServiceType("rw") - .withPort(1907482272) - .withEndpoint("ye") - .withProperties(mapOf("l", "nwynudq")) - .withNodes(new Nodes()), - "abnsmj", - new JobService().withJobServiceType("huxiqhzlraymez") - .withPort(161523803) - .withEndpoint("ihmxrfdsajredn") - .withProperties(mapOf("r", "pxgzdyimsfayor", "oge", "vk")) - .withNodes(new Nodes()), - "f", - new JobService().withJobServiceType("ynq") - .withPort(1693738620) - .withEndpoint("qs") - .withProperties(mapOf("gpxvkqmaupxvpi", "annnoytzposewx")) - .withNodes(new Nodes()))) - .withComputeId("fyzyzeyuub") - .withIsArchived(false) - .withIdentity(new IdentityConfiguration()) - .withComponentId("l") - .withNotificationSetting(new NotificationSetting().withEmails(Arrays.asList("ith", "ygvfltgvdihoyn")) - .withEmailOn( - Arrays.asList(EmailNotificationEnableType.JOB_CANCELLED, EmailNotificationEnableType.JOB_FAILED, - EmailNotificationEnableType.JOB_COMPLETED, EmailNotificationEnableType.JOB_FAILED)) - .withWebhooks(mapOf("ucpcunnuzdqumoen", new Webhook().withEventType("cy"), "hqhsknd", - new Webhook().withEventType("naie"), "anniyopetxivcnr", - new Webhook().withEventType("lqkaadlknwf"))))); - model = BinaryData.fromObject(model).toObject(JobBaseInner.class); - Assertions.assertEquals("xnucaephblkwqp", model.properties().description()); - Assertions.assertEquals("bqsdtcjbctvi", model.properties().tags().get("uzqymtuowog")); - Assertions.assertEquals("zndscxmxeatkdbmw", model.properties().properties().get("rdjyibqb")); - Assertions.assertEquals("agxnvhycvdimw", model.properties().displayName()); - Assertions.assertEquals("gzgy", model.properties().experimentName()); - Assertions.assertEquals("rw", model.properties().services().get("auzpjlx").jobServiceType()); - Assertions.assertEquals(1907482272, model.properties().services().get("auzpjlx").port()); - Assertions.assertEquals("ye", model.properties().services().get("auzpjlx").endpoint()); - Assertions.assertEquals("nwynudq", model.properties().services().get("auzpjlx").properties().get("l")); - Assertions.assertEquals("fyzyzeyuub", model.properties().computeId()); - Assertions.assertEquals(false, model.properties().isArchived()); - Assertions.assertEquals("l", model.properties().componentId()); - Assertions.assertEquals("ith", model.properties().notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, - model.properties().notificationSetting().emailOn().get(0)); - Assertions.assertEquals("cy", - model.properties().notificationSetting().webhooks().get("ucpcunnuzdqumoen").eventType()); - } - - // 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/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 d3c47d6ab9668..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBasePropertiesTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; -import com.azure.resourcemanager.machinelearning.models.IdentityConfiguration; -import com.azure.resourcemanager.machinelearning.models.JobBaseProperties; -import com.azure.resourcemanager.machinelearning.models.JobService; -import com.azure.resourcemanager.machinelearning.models.Nodes; -import com.azure.resourcemanager.machinelearning.models.NotificationSetting; -import com.azure.resourcemanager.machinelearning.models.Webhook; -import java.util.Arrays; -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\",\"displayName\":\"efgv\",\"status\":\"Preparing\",\"experimentName\":\"kcvtl\",\"services\":{\"kalehp\":{\"jobServiceType\":\"skvcuartrhunl\",\"port\":1593194036,\"endpoint\":\"kycndzfqivjreuy\",\"status\":\"bmnwa\",\"errorMessage\":\"tbxoee\",\"properties\":{\"myymvqdbpbhfckdv\":\"lnf\",\"b\":\"zcrcssbzhddubbnq\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"chkhufm\":{\"jobServiceType\":\"awugiqjti\",\"port\":837547009,\"endpoint\":\"dminic\",\"status\":\"eajohiyg\",\"errorMessage\":\"n\",\"properties\":{\"qcs\":\"hpczykmktpvw\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"sruqnmdvha\":{\"jobServiceType\":\"umqy\",\"port\":1595572928,\"endpoint\":\"zulo\",\"status\":\"aeuzanh\",\"errorMessage\":\"nhsenwphpzfng\",\"properties\":{\"fwbeqrkuorh\":\"lidftujwjj\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}}},\"computeId\":\"vjytiqswbq\",\"isArchived\":false,\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"componentId\":\"iytxt\",\"notificationSetting\":{\"emails\":[\"vlbpktgdstyou\",\"mbewreswmo\",\"egmmuteyxe\",\"guqigijiitns\"],\"emailOn\":[\"JobFailed\"],\"webhooks\":{\"jwaiuf\":{\"webhookType\":\"Webhook\",\"eventType\":\"ygr\"}}},\"description\":\"raybfueqfr\",\"tags\":{\"ydkygywezskieca\":\"ydgr\",\"ixqcahyhxalybxaw\":\"ygzmxieqvdsmak\",\"jodqhykincn\":\"ijpodtblxpkkwj\"},\"properties\":{\"qodkadppyibngql\":\"ehllizhceum\",\"wrxwhydtl\":\"d\",\"uyem\":\"vvadswzs\"}}") - .toObject(JobBaseProperties.class); - Assertions.assertEquals("raybfueqfr", model.description()); - Assertions.assertEquals("ydgr", model.tags().get("ydkygywezskieca")); - Assertions.assertEquals("ehllizhceum", model.properties().get("qodkadppyibngql")); - Assertions.assertEquals("efgv", model.displayName()); - Assertions.assertEquals("kcvtl", model.experimentName()); - Assertions.assertEquals("skvcuartrhunl", model.services().get("kalehp").jobServiceType()); - Assertions.assertEquals(1593194036, model.services().get("kalehp").port()); - Assertions.assertEquals("kycndzfqivjreuy", model.services().get("kalehp").endpoint()); - Assertions.assertEquals("lnf", model.services().get("kalehp").properties().get("myymvqdbpbhfckdv")); - Assertions.assertEquals("vjytiqswbq", model.computeId()); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals("iytxt", model.componentId()); - Assertions.assertEquals("vlbpktgdstyou", model.notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_FAILED, model.notificationSetting().emailOn().get(0)); - Assertions.assertEquals("ygr", model.notificationSetting().webhooks().get("jwaiuf").eventType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobBaseProperties model = new JobBaseProperties().withDescription("raybfueqfr") - .withTags( - mapOf("ydkygywezskieca", "ydgr", "ixqcahyhxalybxaw", "ygzmxieqvdsmak", "jodqhykincn", "ijpodtblxpkkwj")) - .withProperties(mapOf("qodkadppyibngql", "ehllizhceum", "wrxwhydtl", "d", "uyem", "vvadswzs")) - .withDisplayName("efgv") - .withExperimentName("kcvtl") - .withServices(mapOf("kalehp", - new JobService().withJobServiceType("skvcuartrhunl") - .withPort(1593194036) - .withEndpoint("kycndzfqivjreuy") - .withProperties(mapOf("myymvqdbpbhfckdv", "lnf", "b", "zcrcssbzhddubbnq")) - .withNodes(new Nodes()), - "chkhufm", - new JobService().withJobServiceType("awugiqjti") - .withPort(837547009) - .withEndpoint("dminic") - .withProperties(mapOf("qcs", "hpczykmktpvw")) - .withNodes(new Nodes()), - "sruqnmdvha", - new JobService().withJobServiceType("umqy") - .withPort(1595572928) - .withEndpoint("zulo") - .withProperties(mapOf("fwbeqrkuorh", "lidftujwjj")) - .withNodes(new Nodes()))) - .withComputeId("vjytiqswbq") - .withIsArchived(false) - .withIdentity(new IdentityConfiguration()) - .withComponentId("iytxt") - .withNotificationSetting(new NotificationSetting() - .withEmails(Arrays.asList("vlbpktgdstyou", "mbewreswmo", "egmmuteyxe", "guqigijiitns")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_FAILED)) - .withWebhooks(mapOf("jwaiuf", new Webhook().withEventType("ygr")))); - model = BinaryData.fromObject(model).toObject(JobBaseProperties.class); - Assertions.assertEquals("raybfueqfr", model.description()); - Assertions.assertEquals("ydgr", model.tags().get("ydkygywezskieca")); - Assertions.assertEquals("ehllizhceum", model.properties().get("qodkadppyibngql")); - Assertions.assertEquals("efgv", model.displayName()); - Assertions.assertEquals("kcvtl", model.experimentName()); - Assertions.assertEquals("skvcuartrhunl", model.services().get("kalehp").jobServiceType()); - Assertions.assertEquals(1593194036, model.services().get("kalehp").port()); - Assertions.assertEquals("kycndzfqivjreuy", model.services().get("kalehp").endpoint()); - Assertions.assertEquals("lnf", model.services().get("kalehp").properties().get("myymvqdbpbhfckdv")); - Assertions.assertEquals("vjytiqswbq", model.computeId()); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals("iytxt", model.componentId()); - Assertions.assertEquals("vlbpktgdstyou", model.notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_FAILED, model.notificationSetting().emailOn().get(0)); - Assertions.assertEquals("ygr", model.notificationSetting().webhooks().get("jwaiuf").eventType()); - } - - // 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/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 ae19cb7ea0669..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBaseResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code 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.EmailNotificationEnableType; -import com.azure.resourcemanager.machinelearning.models.IdentityConfiguration; -import com.azure.resourcemanager.machinelearning.models.JobBaseProperties; -import com.azure.resourcemanager.machinelearning.models.JobBaseResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.JobService; -import com.azure.resourcemanager.machinelearning.models.Nodes; -import com.azure.resourcemanager.machinelearning.models.NotificationSetting; -import com.azure.resourcemanager.machinelearning.models.Webhook; -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( - "{\"value\":[{\"properties\":{\"jobType\":\"JobBaseProperties\",\"displayName\":\"bjazejwwviy\",\"status\":\"Completed\",\"experimentName\":\"uhbrnnhjxsq\",\"services\":{\"umtggmuwdchozfn\":{\"jobServiceType\":\"kbiwetpozyc\",\"port\":1973801888,\"endpoint\":\"yhgfsetzle\",\"status\":\"sfledyn\",\"errorMessage\":\"pziuwfbzkkdtnh\",\"properties\":{\"pkpbafvafhlbylcc\":\"cljse\",\"fwrsofpltdbmair\":\"evxrhyz\",\"pqigtuujwouhd\":\"hvhfnracw\",\"bvitvqkjya\":\"wsigrbjbxsj\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}}},\"computeId\":\"exlvxnoakiz\",\"isArchived\":false,\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"componentId\":\"naqln\",\"notificationSetting\":{\"emails\":[\"uyxlykwphvxzcw\",\"hmpejtlkexaonw\"],\"emailOn\":[\"JobFailed\"],\"webhooks\":{\"rxhxkn\":{\"webhookType\":\"Webhook\"}}},\"description\":\"crmmkyupijuby\",\"tags\":{\"em\":\"kakfqfr\"},\"properties\":{\"dxphlk\":\"dudxjascowvfdjk\",\"dkz\":\"snmgzvyfi\",\"uqwqulsutrjbhxyk\":\"qnwsithuqolyah\"}},\"id\":\"y\",\"name\":\"ezvqq\",\"type\":\"g\"},{\"properties\":{\"jobType\":\"JobBaseProperties\",\"displayName\":\"ftbcvexreuquow\",\"status\":\"Preparing\",\"experimentName\":\"fwhreagkhyxv\",\"services\":{\"l\":{\"jobServiceType\":\"bczsulmdgglmepjp\",\"port\":1660253828,\"endpoint\":\"kgsangpszng\",\"status\":\"p\",\"errorMessage\":\"lkvec\",\"properties\":{\"foknubnoitp\":\"cngoadyedmzrg\",\"rgdg\":\"pz\",\"we\":\"vcoqraswugyxpqi\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"ckbbcc\":{\"jobServiceType\":\"skbuhzaca\",\"port\":149181411,\"endpoint\":\"tco\",\"status\":\"ujpdsxzak\",\"errorMessage\":\"jkmvbi\",\"properties\":{\"bemyeji\":\"ofqcvovjufycsjm\",\"rtudawlpjfel\":\"iuxegth\",\"bgqnz\":\"erppt\",\"ialwc\":\"nhii\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"iua\":{\"jobServiceType\":\"zpraoxn\",\"port\":606416580,\"endpoint\":\"a\",\"status\":\"gftipwc\",\"errorMessage\":\"yubhiqdx\",\"properties\":{\"gbylbuig\":\"npnuhzafccnuhi\",\"dlbnbqxvhcsy\":\"xvatvcr\",\"xdndsbdweaderzm\":\"zlwxaeaovur\",\"ttmvmmagoaqylkjz\":\"ntopa\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}}},\"computeId\":\"cgm\",\"isArchived\":true,\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"componentId\":\"inzcpdltkrlgj\",\"notificationSetting\":{\"emails\":[\"rvcqguefzhomphe\",\"durelyujl\",\"youmpc\"],\"emailOn\":[\"JobCompleted\",\"JobCancelled\",\"JobCompleted\",\"JobCompleted\"],\"webhooks\":{\"ptajbrzmq\":{\"webhookType\":\"Webhook\"},\"ucycijo\":{\"webhookType\":\"Webhook\"}}},\"description\":\"xiutgjcyzyzj\",\"tags\":{\"fwwvuatbwbqam\":\"qjbtxjeaoqaqbzgy\"},\"properties\":{\"pkcvmwf\":\"liys\",\"pmywbormcq\":\"uxx\",\"mcsmyqwixvcp\":\"iciijqpkzfbojx\"}},\"id\":\"kwywzwofalic\",\"name\":\"duoiqt\",\"type\":\"mt\"}],\"nextLink\":\"sknxrwzawnvsbcf\"}") - .toObject(JobBaseResourceArmPaginatedResult.class); - Assertions.assertEquals("crmmkyupijuby", model.value().get(0).properties().description()); - Assertions.assertEquals("kakfqfr", model.value().get(0).properties().tags().get("em")); - Assertions.assertEquals("dudxjascowvfdjk", model.value().get(0).properties().properties().get("dxphlk")); - Assertions.assertEquals("bjazejwwviy", model.value().get(0).properties().displayName()); - Assertions.assertEquals("uhbrnnhjxsq", model.value().get(0).properties().experimentName()); - Assertions.assertEquals("kbiwetpozyc", - model.value().get(0).properties().services().get("umtggmuwdchozfn").jobServiceType()); - Assertions.assertEquals(1973801888, model.value().get(0).properties().services().get("umtggmuwdchozfn").port()); - Assertions.assertEquals("yhgfsetzle", - model.value().get(0).properties().services().get("umtggmuwdchozfn").endpoint()); - Assertions.assertEquals("cljse", - model.value().get(0).properties().services().get("umtggmuwdchozfn").properties().get("pkpbafvafhlbylcc")); - Assertions.assertEquals("exlvxnoakiz", model.value().get(0).properties().computeId()); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("naqln", model.value().get(0).properties().componentId()); - Assertions.assertEquals("uyxlykwphvxzcw", - model.value().get(0).properties().notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_FAILED, - model.value().get(0).properties().notificationSetting().emailOn().get(0)); - Assertions.assertEquals("sknxrwzawnvsbcf", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobBaseResourceArmPaginatedResult model = new JobBaseResourceArmPaginatedResult() - .withValue(Arrays.asList( - new JobBaseInner().withProperties(new JobBaseProperties().withDescription("crmmkyupijuby") - .withTags(mapOf("em", "kakfqfr")) - .withProperties( - mapOf("dxphlk", "dudxjascowvfdjk", "dkz", "snmgzvyfi", "uqwqulsutrjbhxyk", "qnwsithuqolyah")) - .withDisplayName("bjazejwwviy") - .withExperimentName("uhbrnnhjxsq") - .withServices(mapOf("umtggmuwdchozfn", - new JobService().withJobServiceType("kbiwetpozyc") - .withPort(1973801888) - .withEndpoint("yhgfsetzle") - .withProperties(mapOf("pkpbafvafhlbylcc", "cljse", "fwrsofpltdbmair", "evxrhyz", - "pqigtuujwouhd", "hvhfnracw", "bvitvqkjya", "wsigrbjbxsj")) - .withNodes(new Nodes()))) - .withComputeId("exlvxnoakiz") - .withIsArchived(false) - .withIdentity(new IdentityConfiguration()) - .withComponentId("naqln") - .withNotificationSetting(new NotificationSetting() - .withEmails(Arrays.asList("uyxlykwphvxzcw", "hmpejtlkexaonw")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_FAILED)) - .withWebhooks(mapOf("rxhxkn", new Webhook())))), - new JobBaseInner().withProperties(new JobBaseProperties().withDescription("xiutgjcyzyzj") - .withTags(mapOf("fwwvuatbwbqam", "qjbtxjeaoqaqbzgy")) - .withProperties(mapOf("pkcvmwf", "liys", "pmywbormcq", "uxx", "mcsmyqwixvcp", "iciijqpkzfbojx")) - .withDisplayName("ftbcvexreuquow") - .withExperimentName("fwhreagkhyxv") - .withServices(mapOf("l", - new JobService().withJobServiceType("bczsulmdgglmepjp") - .withPort(1660253828) - .withEndpoint("kgsangpszng") - .withProperties( - mapOf("foknubnoitp", "cngoadyedmzrg", "rgdg", "pz", "we", "vcoqraswugyxpqi")) - .withNodes(new Nodes()), - "ckbbcc", - new JobService().withJobServiceType("skbuhzaca") - .withPort(149181411) - .withEndpoint("tco") - .withProperties(mapOf("bemyeji", "ofqcvovjufycsjm", "rtudawlpjfel", "iuxegth", "bgqnz", - "erppt", "ialwc", "nhii")) - .withNodes(new Nodes()), - "iua", - new JobService().withJobServiceType("zpraoxn") - .withPort(606416580) - .withEndpoint("a") - .withProperties(mapOf("gbylbuig", "npnuhzafccnuhi", "dlbnbqxvhcsy", "xvatvcr", - "xdndsbdweaderzm", "zlwxaeaovur", "ttmvmmagoaqylkjz", "ntopa")) - .withNodes(new Nodes()))) - .withComputeId("cgm") - .withIsArchived(true) - .withIdentity(new IdentityConfiguration()) - .withComponentId("inzcpdltkrlgj") - .withNotificationSetting( - new NotificationSetting().withEmails(Arrays.asList("rvcqguefzhomphe", "durelyujl", "youmpc")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_COMPLETED, - EmailNotificationEnableType.JOB_CANCELLED, EmailNotificationEnableType.JOB_COMPLETED, - EmailNotificationEnableType.JOB_COMPLETED)) - .withWebhooks(mapOf("ptajbrzmq", new Webhook(), "ucycijo", new Webhook())))))) - .withNextLink("sknxrwzawnvsbcf"); - model = BinaryData.fromObject(model).toObject(JobBaseResourceArmPaginatedResult.class); - Assertions.assertEquals("crmmkyupijuby", model.value().get(0).properties().description()); - Assertions.assertEquals("kakfqfr", model.value().get(0).properties().tags().get("em")); - Assertions.assertEquals("dudxjascowvfdjk", model.value().get(0).properties().properties().get("dxphlk")); - Assertions.assertEquals("bjazejwwviy", model.value().get(0).properties().displayName()); - Assertions.assertEquals("uhbrnnhjxsq", model.value().get(0).properties().experimentName()); - Assertions.assertEquals("kbiwetpozyc", - model.value().get(0).properties().services().get("umtggmuwdchozfn").jobServiceType()); - Assertions.assertEquals(1973801888, model.value().get(0).properties().services().get("umtggmuwdchozfn").port()); - Assertions.assertEquals("yhgfsetzle", - model.value().get(0).properties().services().get("umtggmuwdchozfn").endpoint()); - Assertions.assertEquals("cljse", - model.value().get(0).properties().services().get("umtggmuwdchozfn").properties().get("pkpbafvafhlbylcc")); - Assertions.assertEquals("exlvxnoakiz", model.value().get(0).properties().computeId()); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("naqln", model.value().get(0).properties().componentId()); - Assertions.assertEquals("uyxlykwphvxzcw", - model.value().get(0).properties().notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_FAILED, - model.value().get(0).properties().notificationSetting().emailOn().get(0)); - Assertions.assertEquals("sknxrwzawnvsbcf", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 e51367b1c7e89..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\":\"c\"}").toObject(JobInput.class); - Assertions.assertEquals("c", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobInput model = new JobInput().withDescription("c"); - model = BinaryData.fromObject(model).toObject(JobInput.class); - Assertions.assertEquals("c", 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 91ca0dca3536d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobLimitsTests.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.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\":\"PT90H5M41S\"}") - .toObject(JobLimits.class); - Assertions.assertEquals(Duration.parse("PT90H5M41S"), model.timeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobLimits model = new JobLimits().withTimeout(Duration.parse("PT90H5M41S")); - model = BinaryData.fromObject(model).toObject(JobLimits.class); - Assertions.assertEquals(Duration.parse("PT90H5M41S"), 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 cb466915ff1dc..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobOutputTests.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.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\":\"o\"}") - .toObject(JobOutput.class); - Assertions.assertEquals("o", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobOutput model = new JobOutput().withDescription("o"); - model = BinaryData.fromObject(model).toObject(JobOutput.class); - Assertions.assertEquals("o", 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 a72127c5c6621..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobResourceConfigurationTests.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.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( - "{\"shmSize\":\"ocfkumcfjxoky\",\"dockerArgs\":\"syasvfnkwmygjjek\",\"instanceCount\":713077193,\"instanceType\":\"drugjqyc\",\"properties\":{\"r\":\"dataxkrdtul\",\"tcsubmzoo\":\"datajdkl\",\"hdyslbklglm\":\"datasvobchkxfp\",\"yqshwyqxridtt\":\"datankkw\"}}") - .toObject(JobResourceConfiguration.class); - Assertions.assertEquals(713077193, model.instanceCount()); - Assertions.assertEquals("drugjqyc", model.instanceType()); - Assertions.assertEquals("ocfkumcfjxoky", model.shmSize()); - Assertions.assertEquals("syasvfnkwmygjjek", model.dockerArgs()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobResourceConfiguration model = new JobResourceConfiguration().withInstanceCount(713077193) - .withInstanceType("drugjqyc") - .withProperties(mapOf("r", "dataxkrdtul", "tcsubmzoo", "datajdkl", "hdyslbklglm", "datasvobchkxfp", - "yqshwyqxridtt", "datankkw")) - .withShmSize("ocfkumcfjxoky") - .withDockerArgs("syasvfnkwmygjjek"); - model = BinaryData.fromObject(model).toObject(JobResourceConfiguration.class); - Assertions.assertEquals(713077193, model.instanceCount()); - Assertions.assertEquals("drugjqyc", model.instanceType()); - Assertions.assertEquals("ocfkumcfjxoky", model.shmSize()); - Assertions.assertEquals("syasvfnkwmygjjek", model.dockerArgs()); - } - - // 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/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 0f89d727f4c16..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobScheduleActionTests.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.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; -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 com.azure.resourcemanager.machinelearning.models.Nodes; -import com.azure.resourcemanager.machinelearning.models.NotificationSetting; -import com.azure.resourcemanager.machinelearning.models.Webhook; -import java.util.Arrays; -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\",\"displayName\":\"fkbzbfbxjblajy\",\"status\":\"Preparing\",\"experimentName\":\"ycsbtoi\",\"services\":{\"rgihlnzffewv\":{\"jobServiceType\":\"jmofs\",\"port\":2075523091,\"endpoint\":\"gnywxu\",\"status\":\"lfj\",\"errorMessage\":\"gwtmszcf\",\"properties\":{\"pagknxma\":\"peqregfur\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"pwwvmbjecfw\":{\"jobServiceType\":\"ycjcgeipqxxsdy\",\"port\":521155711,\"endpoint\":\"ydsmmabh\",\"status\":\"lejqzhpvhxp\",\"errorMessage\":\"djze\",\"properties\":{\"ogtqscj\":\"gf\",\"cuex\":\"vqerqxkomwdzpzl\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"aagwiijcfqiywhxp\":{\"jobServiceType\":\"ghnkfrwxohlydsn\",\"port\":935936431,\"endpoint\":\"hiypbfhmihi\",\"status\":\"qozewbr\",\"errorMessage\":\"jzgkbrauxbo\",\"properties\":{\"uudrizwkwkjxlaac\":\"nnqbjxgjwsreruk\",\"evgb\":\"dikqelssybz\",\"zyjj\":\"rommkiqhypwt\",\"omzq\":\"u\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"kcu\":{\"jobServiceType\":\"apialezaydpuzu\",\"port\":301398329,\"endpoint\":\"fxlie\",\"status\":\"ot\",\"errorMessage\":\"mhssfnwh\",\"properties\":{\"ckn\":\"hh\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}}},\"computeId\":\"hdgwuzrono\",\"isArchived\":false,\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"componentId\":\"kdnwy\",\"notificationSetting\":{\"emails\":[\"ikgxkkzz\",\"zdjekebawnx\"],\"emailOn\":[\"JobCompleted\",\"JobFailed\"],\"webhooks\":{\"ulp\":{\"webhookType\":\"Webhook\",\"eventType\":\"irgcjfai\"},\"qnfforxsqtzngxbs\":{\"webhookType\":\"Webhook\",\"eventType\":\"akrxi\"},\"xcmmhipbvskcitly\":{\"webhookType\":\"Webhook\",\"eventType\":\"ewg\"}}},\"description\":\"wfsaa\",\"tags\":{\"c\":\"gb\"},\"properties\":{\"ajklnac\":\"idyli\",\"rjjaojpz\":\"dnxqeonm\"}}}") - .toObject(JobScheduleAction.class); - Assertions.assertEquals("wfsaa", model.jobDefinition().description()); - Assertions.assertEquals("gb", model.jobDefinition().tags().get("c")); - Assertions.assertEquals("idyli", model.jobDefinition().properties().get("ajklnac")); - Assertions.assertEquals("fkbzbfbxjblajy", model.jobDefinition().displayName()); - Assertions.assertEquals("ycsbtoi", model.jobDefinition().experimentName()); - Assertions.assertEquals("jmofs", model.jobDefinition().services().get("rgihlnzffewv").jobServiceType()); - Assertions.assertEquals(2075523091, model.jobDefinition().services().get("rgihlnzffewv").port()); - Assertions.assertEquals("gnywxu", model.jobDefinition().services().get("rgihlnzffewv").endpoint()); - Assertions.assertEquals("peqregfur", - model.jobDefinition().services().get("rgihlnzffewv").properties().get("pagknxma")); - Assertions.assertEquals("hdgwuzrono", model.jobDefinition().computeId()); - Assertions.assertEquals(false, model.jobDefinition().isArchived()); - Assertions.assertEquals("kdnwy", model.jobDefinition().componentId()); - Assertions.assertEquals("ikgxkkzz", model.jobDefinition().notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_COMPLETED, - model.jobDefinition().notificationSetting().emailOn().get(0)); - Assertions.assertEquals("irgcjfai", - model.jobDefinition().notificationSetting().webhooks().get("ulp").eventType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobScheduleAction model = new JobScheduleAction().withJobDefinition(new JobBaseProperties() - .withDescription("wfsaa") - .withTags(mapOf("c", "gb")) - .withProperties(mapOf("ajklnac", "idyli", "rjjaojpz", "dnxqeonm")) - .withDisplayName("fkbzbfbxjblajy") - .withExperimentName("ycsbtoi") - .withServices(mapOf("rgihlnzffewv", - new JobService().withJobServiceType("jmofs") - .withPort(2075523091) - .withEndpoint("gnywxu") - .withProperties(mapOf("pagknxma", "peqregfur")) - .withNodes(new Nodes()), - "pwwvmbjecfw", - new JobService().withJobServiceType("ycjcgeipqxxsdy") - .withPort(521155711) - .withEndpoint("ydsmmabh") - .withProperties(mapOf("ogtqscj", "gf", "cuex", "vqerqxkomwdzpzl")) - .withNodes(new Nodes()), - "aagwiijcfqiywhxp", - new JobService().withJobServiceType("ghnkfrwxohlydsn") - .withPort(935936431) - .withEndpoint("hiypbfhmihi") - .withProperties(mapOf("uudrizwkwkjxlaac", "nnqbjxgjwsreruk", "evgb", "dikqelssybz", "zyjj", - "rommkiqhypwt", "omzq", "u")) - .withNodes(new Nodes()), - "kcu", - new JobService().withJobServiceType("apialezaydpuzu") - .withPort(301398329) - .withEndpoint("fxlie") - .withProperties(mapOf("ckn", "hh")) - .withNodes(new Nodes()))) - .withComputeId("hdgwuzrono") - .withIsArchived(false) - .withIdentity(new IdentityConfiguration()) - .withComponentId("kdnwy") - .withNotificationSetting(new NotificationSetting().withEmails(Arrays.asList("ikgxkkzz", "zdjekebawnx")) - .withEmailOn( - Arrays.asList(EmailNotificationEnableType.JOB_COMPLETED, EmailNotificationEnableType.JOB_FAILED)) - .withWebhooks(mapOf("ulp", new Webhook().withEventType("irgcjfai"), "qnfforxsqtzngxbs", - new Webhook().withEventType("akrxi"), "xcmmhipbvskcitly", new Webhook().withEventType("ewg"))))); - model = BinaryData.fromObject(model).toObject(JobScheduleAction.class); - Assertions.assertEquals("wfsaa", model.jobDefinition().description()); - Assertions.assertEquals("gb", model.jobDefinition().tags().get("c")); - Assertions.assertEquals("idyli", model.jobDefinition().properties().get("ajklnac")); - Assertions.assertEquals("fkbzbfbxjblajy", model.jobDefinition().displayName()); - Assertions.assertEquals("ycsbtoi", model.jobDefinition().experimentName()); - Assertions.assertEquals("jmofs", model.jobDefinition().services().get("rgihlnzffewv").jobServiceType()); - Assertions.assertEquals(2075523091, model.jobDefinition().services().get("rgihlnzffewv").port()); - Assertions.assertEquals("gnywxu", model.jobDefinition().services().get("rgihlnzffewv").endpoint()); - Assertions.assertEquals("peqregfur", - model.jobDefinition().services().get("rgihlnzffewv").properties().get("pagknxma")); - Assertions.assertEquals("hdgwuzrono", model.jobDefinition().computeId()); - Assertions.assertEquals(false, model.jobDefinition().isArchived()); - Assertions.assertEquals("kdnwy", model.jobDefinition().componentId()); - Assertions.assertEquals("ikgxkkzz", model.jobDefinition().notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_COMPLETED, - model.jobDefinition().notificationSetting().emailOn().get(0)); - Assertions.assertEquals("irgcjfai", - model.jobDefinition().notificationSetting().webhooks().get("ulp").eventType()); - } - - // 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/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 467104c1d539e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobServiceTests.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.models.JobService; -import com.azure.resourcemanager.machinelearning.models.Nodes; -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( - "{\"jobServiceType\":\"wuowhlxlnwy\",\"port\":1884184924,\"endpoint\":\"vblgmokzk\",\"status\":\"rfowtdvrfmvlih\",\"errorMessage\":\"jdrqcrjidhftu\",\"properties\":{\"kfnjyixhafrat\":\"dxlwyojbfqz\",\"znv\":\"xmbjroum\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}}") - .toObject(JobService.class); - Assertions.assertEquals("wuowhlxlnwy", model.jobServiceType()); - Assertions.assertEquals(1884184924, model.port()); - Assertions.assertEquals("vblgmokzk", model.endpoint()); - Assertions.assertEquals("dxlwyojbfqz", model.properties().get("kfnjyixhafrat")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobService model = new JobService().withJobServiceType("wuowhlxlnwy") - .withPort(1884184924) - .withEndpoint("vblgmokzk") - .withProperties(mapOf("kfnjyixhafrat", "dxlwyojbfqz", "znv", "xmbjroum")) - .withNodes(new Nodes()); - model = BinaryData.fromObject(model).toObject(JobService.class); - Assertions.assertEquals("wuowhlxlnwy", model.jobServiceType()); - Assertions.assertEquals(1884184924, model.port()); - Assertions.assertEquals("vblgmokzk", model.endpoint()); - Assertions.assertEquals("dxlwyojbfqz", model.properties().get("kfnjyixhafrat")); - } - - // 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/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 006be11652f0a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsCancelMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class JobsCancelMockTests { - @Test - public void testCancel() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("bsibzmvd", "yoe", "pothtpaqmfwiesh", 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 e4909bcdd5e0d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights 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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; -import com.azure.resourcemanager.machinelearning.models.IdentityConfiguration; -import com.azure.resourcemanager.machinelearning.models.JobBase; -import com.azure.resourcemanager.machinelearning.models.JobBaseProperties; -import com.azure.resourcemanager.machinelearning.models.JobService; -import com.azure.resourcemanager.machinelearning.models.Nodes; -import com.azure.resourcemanager.machinelearning.models.NotificationSetting; -import com.azure.resourcemanager.machinelearning.models.Webhook; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class JobsCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"jobType\":\"JobBaseProperties\",\"displayName\":\"fhdfo\",\"status\":\"Provisioning\",\"experimentName\":\"lcfcpzajgq\",\"services\":{\"ebolhyiohcjugd\":{\"jobServiceType\":\"meqhtngrx\",\"port\":1649257125,\"endpoint\":\"sewfbllegezvwuwi\",\"status\":\"msgg\",\"errorMessage\":\"cmazilq\",\"properties\":{\"oqpyb\":\"ip\",\"aqqqtmpgr\":\"ykmdklwbqkmtw\",\"ltwedllp\":\"c\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"ydc\":{\"jobServiceType\":\"ggxszmyxguyk\",\"port\":1274422195,\"endpoint\":\"mwzplcrzdwe\",\"status\":\"vspknxraidjeddn\",\"errorMessage\":\"n\",\"properties\":{\"tnuckojqoxpw\":\"rhcfeqjkacu\",\"doyqbpzxushmltih\":\"hvfdosq\",\"rzpggs\":\"cptvkbcykntdzze\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"mcjjxx\":{\"jobServiceType\":\"neibhztlzbwb\",\"port\":852314155,\"endpoint\":\"spkgk\",\"status\":\"pvbzmyo\",\"errorMessage\":\"xstxsfztlvs\",\"properties\":{\"yfgtwxmjdbzfiac\":\"shhcdlsowyhxwh\",\"mch\":\"wmce\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"rzzxqtcgs\":{\"jobServiceType\":\"dwmjurtnolzio\",\"port\":1365609318,\"endpoint\":\"ukeplfwykr\",\"status\":\"jenpsff\",\"errorMessage\":\"zefajgb\",\"properties\":{\"cevfbiekydk\":\"xpeuahvxfn\",\"yrvdszrizpej\":\"dkzfkneck\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}}},\"computeId\":\"hzcicitykzyi\",\"isArchived\":true,\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"componentId\":\"gnfunh\",\"notificationSetting\":{\"emails\":[\"syiwm\",\"pkudhjztbwzjbqzq\"],\"emailOn\":[\"JobCompleted\"],\"webhooks\":{\"lkdsbekvprkwpvx\":{\"webhookType\":\"Webhook\",\"eventType\":\"zdb\"},\"zshfafbeh\":{\"webhookType\":\"Webhook\",\"eventType\":\"qcnv\"},\"eplpfrecri\":{\"webhookType\":\"Webhook\",\"eventType\":\"eiuexkpgrmwdwlr\"}}},\"description\":\"aba\",\"tags\":{\"sgpdbhbdxsjsox\":\"sizao\",\"inlgttvon\":\"uwuungdvvddrcpqu\",\"mitmtkcqixgqxs\":\"rpeli\",\"wqumecqyianjmv\":\"pevthuvupdsafqag\"},\"properties\":{\"xqtgzvzcfmwfogjr\":\"dkqffhux\"}},\"id\":\"tbpnh\",\"name\":\"o\",\"type\":\"lvfzwt\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("ecuve") - .withExistingWorkspace("iel", "kymqmgudvy") - .withProperties(new JobBaseProperties().withDescription("mjtxwazyvi") - .withTags(mapOf("rjmwaa", "ebffkgfiyd")) - .withProperties(mapOf("jnaotavwmrfqt", "khptyhziqeo", "cyrwvoohmcw", "gdfecju")) - .withDisplayName("cwdge") - .withExperimentName("rrvjqhoehyirsv") - .withServices(mapOf("pspaxhfuwygssssj", - new JobService().withJobServiceType("xpvqpblqubfpeome") - .withPort(153862409) - .withEndpoint("eamzlqvajztsvc") - .withProperties(mapOf("moigawlojwv", "rbfvehuweuitqeyo", "jmujz", "ovjvjjuypcnbucb")) - .withNodes(new Nodes()), - "dfeyaev", - new JobService().withJobServiceType("fep") - .withPort(405179371) - .withEndpoint("sdvjv") - .withProperties(mapOf("eynxkxqnwcekqsb", "ht", "apzebje", "cad", "jbpzdwhxputka", - "wwgverbywuuvei", "rw", "l")) - .withNodes(new Nodes()), - "mtxjca", - new JobService().withJobServiceType("qfxfiyjzuqgxbo") - .withPort(91105546) - .withEndpoint("dymdypsxkw") - .withProperties(mapOf("vsi", "zclilyoixeeiznqi")) - .withNodes(new Nodes()), - "vncxtnbutytoaini", - new JobService().withJobServiceType("sjuqqtzrnubodgou") - .withPort(1627288021) - .withEndpoint("npgugrjx") - .withProperties(mapOf("bafiqxomevketa", "tipkdb")) - .withNodes(new Nodes()))) - .withComputeId("xhzqgbaqvqe") - .withIsArchived(false) - .withIdentity(new IdentityConfiguration()) - .withComponentId("obkrgryfnbx") - .withNotificationSetting(new NotificationSetting().withEmails(Arrays.asList("yszhxoth", "yifjufzlg")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_CANCELLED)) - .withWebhooks(mapOf("sxyrywdezprycix", new Webhook().withEventType("mnuzyyc"), "k", - new Webhook().withEventType("yamochpwwykfyt"), "oudmcadcojf", - new Webhook().withEventType("dckwqvckh"))))) - .create(); - - Assertions.assertEquals("aba", response.properties().description()); - Assertions.assertEquals("sizao", response.properties().tags().get("sgpdbhbdxsjsox")); - Assertions.assertEquals("dkqffhux", response.properties().properties().get("xqtgzvzcfmwfogjr")); - Assertions.assertEquals("fhdfo", response.properties().displayName()); - Assertions.assertEquals("lcfcpzajgq", response.properties().experimentName()); - Assertions.assertEquals("meqhtngrx", response.properties().services().get("ebolhyiohcjugd").jobServiceType()); - Assertions.assertEquals(1649257125, response.properties().services().get("ebolhyiohcjugd").port()); - Assertions.assertEquals("sewfbllegezvwuwi", response.properties().services().get("ebolhyiohcjugd").endpoint()); - Assertions.assertEquals("ip", response.properties().services().get("ebolhyiohcjugd").properties().get("oqpyb")); - Assertions.assertEquals("hzcicitykzyi", response.properties().computeId()); - Assertions.assertEquals(true, response.properties().isArchived()); - Assertions.assertEquals("gnfunh", response.properties().componentId()); - Assertions.assertEquals("syiwm", response.properties().notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_COMPLETED, - response.properties().notificationSetting().emailOn().get(0)); - Assertions.assertEquals("zdb", - response.properties().notificationSetting().webhooks().get("lkdsbekvprkwpvx").eventType()); - } - - // 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/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 e1ccfcfb3107d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class JobsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("gthcdbzoxho", "ogpbogpbwe", "oxlzrijpkbrvm", 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 2c0484df76463..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; -import com.azure.resourcemanager.machinelearning.models.JobBase; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class JobsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"jobType\":\"JobBaseProperties\",\"displayName\":\"ladohniz\",\"status\":\"Unknown\",\"experimentName\":\"pqiyqvmhtyafcvto\",\"services\":{\"emzvqm\":{\"jobServiceType\":\"m\",\"port\":983563156,\"endpoint\":\"e\",\"status\":\"xqrzsngltlbs\",\"errorMessage\":\"fpl\",\"properties\":{\"jvko\":\"hkwhiorhwuujym\",\"hzng\":\"jgtourrqmch\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"fszxnzjxvdn\":{\"jobServiceType\":\"svxbagccvhnoq\",\"port\":81272000,\"endpoint\":\"pcntqoszrwkkxd\",\"status\":\"uyygdoi\",\"errorMessage\":\"fcnxrbyvbd\",\"properties\":{\"dqxff\":\"tjtzsgen\",\"pnfvzbvtxgsn\":\"jcngjcdyk\",\"hsfgaxuvaej\":\"sqjjcwggjimlcb\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"jckm\":{\"jobServiceType\":\"dlptulwgpdzlfx\",\"port\":1065400664,\"endpoint\":\"gmxynwaofnoiphwa\",\"status\":\"pugxjtuhid\",\"errorMessage\":\"szxmcqenyjwadvf\",\"properties\":{\"mjdphtfpjrbnzb\":\"tymncwj\",\"ima\":\"mrqb\",\"neprhxs\":\"eiq\",\"kto\":\"tusrpjmevszbjn\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}}},\"computeId\":\"hxxd\",\"isArchived\":true,\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"componentId\":\"nk\",\"notificationSetting\":{\"emails\":[\"tozxlt\",\"sfxxkgxw\"],\"emailOn\":[\"JobCancelled\",\"JobFailed\",\"JobFailed\"],\"webhooks\":{\"pfhhtfmhmaknp\":{\"webhookType\":\"Webhook\",\"eventType\":\"z\"},\"cnvd\":{\"webhookType\":\"Webhook\",\"eventType\":\"cfvxqrmxcrhz\"},\"rntphyjuedd\":{\"webhookType\":\"Webhook\",\"eventType\":\"iuxx\"},\"axmkuthooaicms\":{\"webhookType\":\"Webhook\",\"eventType\":\"pysmalpjabzssbu\"}}},\"description\":\"wwvb\",\"tags\":{\"i\":\"bivhjryppmmtqx\",\"gqfcoraj\":\"aef\",\"hjseceuvynh\":\"bglkffgyf\",\"xmlsudtbiycepjkl\":\"bzcufxfyzqrs\"},\"properties\":{\"xeyumwlbpyidecff\":\"dsormbvir\",\"sqwjypiosz\":\"hizwqz\",\"dglxppewtlfsw\":\"zsw\",\"vvb\":\"lwnffczwzr\"}},\"id\":\"npriyttiqdcjg\",\"name\":\"mcwmqpcwoe\",\"type\":\"jrfrucpefwdxbp\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("up", "krqeqjtzaw", "nrvgitzdjixk", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("wwvb", response.properties().description()); - Assertions.assertEquals("bivhjryppmmtqx", response.properties().tags().get("i")); - Assertions.assertEquals("dsormbvir", response.properties().properties().get("xeyumwlbpyidecff")); - Assertions.assertEquals("ladohniz", response.properties().displayName()); - Assertions.assertEquals("pqiyqvmhtyafcvto", response.properties().experimentName()); - Assertions.assertEquals("m", response.properties().services().get("emzvqm").jobServiceType()); - Assertions.assertEquals(983563156, response.properties().services().get("emzvqm").port()); - Assertions.assertEquals("e", response.properties().services().get("emzvqm").endpoint()); - Assertions.assertEquals("hkwhiorhwuujym", - response.properties().services().get("emzvqm").properties().get("jvko")); - Assertions.assertEquals("hxxd", response.properties().computeId()); - Assertions.assertEquals(true, response.properties().isArchived()); - Assertions.assertEquals("nk", response.properties().componentId()); - Assertions.assertEquals("tozxlt", response.properties().notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, - response.properties().notificationSetting().emailOn().get(0)); - Assertions.assertEquals("z", - response.properties().notificationSetting().webhooks().get("pfhhtfmhmaknp").eventType()); - } -} 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 2b253b644bfba..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsListMockTests.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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; -import com.azure.resourcemanager.machinelearning.models.JobBase; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class JobsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"jobType\":\"JobBaseProperties\",\"displayName\":\"jvzlgclia\",\"status\":\"NotStarted\",\"experimentName\":\"vihy\",\"services\":{\"ka\":{\"jobServiceType\":\"oxexvt\",\"port\":2028703772,\"endpoint\":\"ymgkirfzvtzrq\",\"status\":\"lipmuufsek\",\"errorMessage\":\"pufhwpkpejfszw\",\"properties\":{\"jcnzfajptjhwrnw\":\"swbrsmf\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}}},\"computeId\":\"afjcdccqjaefrzq\",\"isArchived\":false,\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"componentId\":\"gidrxdykjchz\",\"notificationSetting\":{\"emails\":[\"pq\",\"pgbssjqjjtcvdz\",\"tsdlp\"],\"emailOn\":[\"JobFailed\",\"JobFailed\",\"JobFailed\"],\"webhooks\":{\"nqfnz\":{\"webhookType\":\"Webhook\",\"eventType\":\"ppnjzbuvmfsfru\"},\"fepsoz\":{\"webhookType\":\"Webhook\",\"eventType\":\"ppnularnupprd\"}}},\"description\":\"xoyan\",\"tags\":{\"taqjhokhi\":\"euewaauxkvruryyq\",\"kikdatbwyarqt\":\"ghpvjqp\",\"pzdgyilwuiklbjl\":\"bjblhefqwirnx\",\"csddplg\":\"bxo\"},\"properties\":{\"oke\":\"via\",\"uosc\":\"cmadyoctmd\"}},\"id\":\"wbestntoeteu\",\"name\":\"gdgbzftsbpef\",\"type\":\"f\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("olqqpa", "zpzmojupqlus", "kzdnotgyowis", "fifmitqvypkiqlou", "zbceimsco", ListViewType.ALL, - "naehllwqmraihe", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("xoyan", response.iterator().next().properties().description()); - Assertions.assertEquals("euewaauxkvruryyq", response.iterator().next().properties().tags().get("taqjhokhi")); - Assertions.assertEquals("via", response.iterator().next().properties().properties().get("oke")); - Assertions.assertEquals("jvzlgclia", response.iterator().next().properties().displayName()); - Assertions.assertEquals("vihy", response.iterator().next().properties().experimentName()); - Assertions.assertEquals("oxexvt", - response.iterator().next().properties().services().get("ka").jobServiceType()); - Assertions.assertEquals(2028703772, response.iterator().next().properties().services().get("ka").port()); - Assertions.assertEquals("ymgkirfzvtzrq", - response.iterator().next().properties().services().get("ka").endpoint()); - Assertions.assertEquals("swbrsmf", - response.iterator().next().properties().services().get("ka").properties().get("jcnzfajptjhwrnw")); - Assertions.assertEquals("afjcdccqjaefrzq", response.iterator().next().properties().computeId()); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); - Assertions.assertEquals("gidrxdykjchz", response.iterator().next().properties().componentId()); - Assertions.assertEquals("pq", response.iterator().next().properties().notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_FAILED, - response.iterator().next().properties().notificationSetting().emailOn().get(0)); - Assertions.assertEquals("ppnjzbuvmfsfru", - response.iterator().next().properties().notificationSetting().webhooks().get("nqfnz").eventType()); - } -} 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 77081f2cc423f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/KubernetesPropertiesTests.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.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\":\"od\",\"serviceBusConnectionString\":\"vfsxx\",\"extensionPrincipalId\":\"desqlvg\",\"extensionInstanceReleaseTrain\":\"pwgoljt\",\"vcName\":\"nm\",\"namespace\":\"dobygoogxqapj\",\"defaultInstanceType\":\"azyj\",\"instanceTypes\":{\"qeq\":{\"nodeSelector\":{\"kvibfa\":\"odjnos\"},\"resources\":{\"requests\":{\"ktz\":\"trnzpducdaaktu\",\"wkppnwyytfvp\":\"oimyfpqd\",\"nwhvuldbkkejj\":\"tfjikffffgkuh\",\"xjqifhujjsbc\":\"jigawgaz\"},\"limits\":{\"rhhmojusu\":\"aahzbhuroolkol\",\"ia\":\"gfjzcvaax\",\"xkukm\":\"ahfxwccok\",\"ynuhh\":\"c\"}}}}}") - .toObject(KubernetesProperties.class); - Assertions.assertEquals("od", model.relayConnectionString()); - Assertions.assertEquals("vfsxx", model.serviceBusConnectionString()); - Assertions.assertEquals("desqlvg", model.extensionPrincipalId()); - Assertions.assertEquals("pwgoljt", model.extensionInstanceReleaseTrain()); - Assertions.assertEquals("nm", model.vcName()); - Assertions.assertEquals("dobygoogxqapj", model.namespace()); - Assertions.assertEquals("azyj", model.defaultInstanceType()); - Assertions.assertEquals("odjnos", model.instanceTypes().get("qeq").nodeSelector().get("kvibfa")); - Assertions.assertEquals("trnzpducdaaktu", model.instanceTypes().get("qeq").resources().requests().get("ktz")); - Assertions.assertEquals("aahzbhuroolkol", - model.instanceTypes().get("qeq").resources().limits().get("rhhmojusu")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - KubernetesProperties model = new KubernetesProperties().withRelayConnectionString("od") - .withServiceBusConnectionString("vfsxx") - .withExtensionPrincipalId("desqlvg") - .withExtensionInstanceReleaseTrain("pwgoljt") - .withVcName("nm") - .withNamespace("dobygoogxqapj") - .withDefaultInstanceType("azyj") - .withInstanceTypes(mapOf("qeq", new InstanceTypeSchema().withNodeSelector(mapOf("kvibfa", "odjnos")) - .withResources(new InstanceTypeSchemaResources() - .withRequests(mapOf("ktz", "trnzpducdaaktu", "wkppnwyytfvp", "oimyfpqd", "nwhvuldbkkejj", - "tfjikffffgkuh", "xjqifhujjsbc", "jigawgaz")) - .withLimits( - mapOf("rhhmojusu", "aahzbhuroolkol", "ia", "gfjzcvaax", "xkukm", "ahfxwccok", "ynuhh", "c"))))); - model = BinaryData.fromObject(model).toObject(KubernetesProperties.class); - Assertions.assertEquals("od", model.relayConnectionString()); - Assertions.assertEquals("vfsxx", model.serviceBusConnectionString()); - Assertions.assertEquals("desqlvg", model.extensionPrincipalId()); - Assertions.assertEquals("pwgoljt", model.extensionInstanceReleaseTrain()); - Assertions.assertEquals("nm", model.vcName()); - Assertions.assertEquals("dobygoogxqapj", model.namespace()); - Assertions.assertEquals("azyj", model.defaultInstanceType()); - Assertions.assertEquals("odjnos", model.instanceTypes().get("qeq").nodeSelector().get("kvibfa")); - Assertions.assertEquals("trnzpducdaaktu", model.instanceTypes().get("qeq").resources().requests().get("ktz")); - Assertions.assertEquals("aahzbhuroolkol", - model.instanceTypes().get("qeq").resources().limits().get("rhhmojusu")); - } - - // 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/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 a2fa559b16a33..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/KubernetesSchemaTests.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.InstanceTypeSchema; -import com.azure.resourcemanager.machinelearning.models.InstanceTypeSchemaResources; -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\":\"hjgczetyb\",\"serviceBusConnectionString\":\"gztlcgc\",\"extensionPrincipalId\":\"chfjvmywjzebe\",\"extensionInstanceReleaseTrain\":\"vlbefvwclj\",\"vcName\":\"pylrwoxzgwpsy\",\"namespace\":\"ijeypdvrbkerdkdk\",\"defaultInstanceType\":\"wqwjxil\",\"instanceTypes\":{\"eajbkajlcyizyddc\":{\"nodeSelector\":{\"oisfmnaybdjn\":\"feygzqp\"},\"resources\":{\"requests\":{\"ymulwivqtowl\":\"ntqontwhym\"},\"limits\":{\"j\":\"ycoybajasqubf\",\"htfxcpupuki\":\"ywhjqwmchq\",\"sa\":\"mjzpwdlvwtiwsm\",\"ltassaekewna\":\"nhqnampp\"}}}}}}") - .toObject(KubernetesSchema.class); - Assertions.assertEquals("hjgczetyb", model.properties().relayConnectionString()); - Assertions.assertEquals("gztlcgc", model.properties().serviceBusConnectionString()); - Assertions.assertEquals("chfjvmywjzebe", model.properties().extensionPrincipalId()); - Assertions.assertEquals("vlbefvwclj", model.properties().extensionInstanceReleaseTrain()); - Assertions.assertEquals("pylrwoxzgwpsy", model.properties().vcName()); - Assertions.assertEquals("ijeypdvrbkerdkdk", model.properties().namespace()); - Assertions.assertEquals("wqwjxil", model.properties().defaultInstanceType()); - Assertions.assertEquals("feygzqp", - model.properties().instanceTypes().get("eajbkajlcyizyddc").nodeSelector().get("oisfmnaybdjn")); - Assertions.assertEquals("ntqontwhym", - model.properties().instanceTypes().get("eajbkajlcyizyddc").resources().requests().get("ymulwivqtowl")); - Assertions.assertEquals("ycoybajasqubf", - model.properties().instanceTypes().get("eajbkajlcyizyddc").resources().limits().get("j")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - KubernetesSchema model = new KubernetesSchema().withProperties(new KubernetesProperties() - .withRelayConnectionString("hjgczetyb") - .withServiceBusConnectionString("gztlcgc") - .withExtensionPrincipalId("chfjvmywjzebe") - .withExtensionInstanceReleaseTrain("vlbefvwclj") - .withVcName("pylrwoxzgwpsy") - .withNamespace("ijeypdvrbkerdkdk") - .withDefaultInstanceType("wqwjxil") - .withInstanceTypes(mapOf("eajbkajlcyizyddc", - new InstanceTypeSchema().withNodeSelector(mapOf("oisfmnaybdjn", "feygzqp")) - .withResources(new InstanceTypeSchemaResources().withRequests(mapOf("ymulwivqtowl", "ntqontwhym")) - .withLimits(mapOf("j", "ycoybajasqubf", "htfxcpupuki", "ywhjqwmchq", "sa", "mjzpwdlvwtiwsm", - "ltassaekewna", "nhqnampp")))))); - model = BinaryData.fromObject(model).toObject(KubernetesSchema.class); - Assertions.assertEquals("hjgczetyb", model.properties().relayConnectionString()); - Assertions.assertEquals("gztlcgc", model.properties().serviceBusConnectionString()); - Assertions.assertEquals("chfjvmywjzebe", model.properties().extensionPrincipalId()); - Assertions.assertEquals("vlbefvwclj", model.properties().extensionInstanceReleaseTrain()); - Assertions.assertEquals("pylrwoxzgwpsy", model.properties().vcName()); - Assertions.assertEquals("ijeypdvrbkerdkdk", model.properties().namespace()); - Assertions.assertEquals("wqwjxil", model.properties().defaultInstanceType()); - Assertions.assertEquals("feygzqp", - model.properties().instanceTypes().get("eajbkajlcyizyddc").nodeSelector().get("oisfmnaybdjn")); - Assertions.assertEquals("ntqontwhym", - model.properties().instanceTypes().get("eajbkajlcyizyddc").resources().requests().get("ymulwivqtowl")); - Assertions.assertEquals("ycoybajasqubf", - model.properties().instanceTypes().get("eajbkajlcyizyddc").resources().limits().get("j")); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/LakeHouseArtifactTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/LakeHouseArtifactTests.java deleted file mode 100644 index 547174e98ce75..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/LakeHouseArtifactTests.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.LakeHouseArtifact; -import org.junit.jupiter.api.Assertions; - -public final class LakeHouseArtifactTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LakeHouseArtifact model = BinaryData.fromString("{\"artifactType\":\"LakeHouse\",\"artifactName\":\"n\"}") - .toObject(LakeHouseArtifact.class); - Assertions.assertEquals("n", model.artifactName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LakeHouseArtifact model = new LakeHouseArtifact().withArtifactName("n"); - model = BinaryData.fromObject(model).toObject(LakeHouseArtifact.class); - Assertions.assertEquals("n", model.artifactName()); - } -} 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 78909282b83f1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListAmlUserFeatureResultTests.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.ListAmlUserFeatureResult; - -public final class ListAmlUserFeatureResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ListAmlUserFeatureResult model = BinaryData.fromString( - "{\"value\":[{\"id\":\"zczfkiceevs\",\"displayName\":\"xwspcaxikhfjq\",\"description\":\"glcxkxg\"},{\"id\":\"romv\",\"displayName\":\"ysemtmesrfsvpin\",\"description\":\"pat\"},{\"id\":\"diswxspvckojazb\",\"displayName\":\"spftesubzpv\",\"description\":\"dylytcovq\"},{\"id\":\"usrf\",\"displayName\":\"d\",\"description\":\"fxnxml\"}],\"nextLink\":\"uoswkjmdih\"}") - .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 e82cd847e8c1f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListUsagesResultTests.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.ListUsagesResult; - -public final class ListUsagesResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ListUsagesResult model = BinaryData.fromString( - "{\"value\":[{\"id\":\"qn\",\"amlWorkspaceLocation\":\"oczvy\",\"type\":\"qrvkdv\",\"unit\":\"Count\",\"currentValue\":2186677248457800483,\"limit\":135145213418293643,\"name\":{\"value\":\"atkpnp\",\"localizedValue\":\"exxbczwtr\"}},{\"id\":\"iqzbq\",\"amlWorkspaceLocation\":\"sovmyokacspkwl\",\"type\":\"dobpxjmflbvvn\",\"unit\":\"Count\",\"currentValue\":3490424163698610193,\"limit\":8548098953378232008,\"name\":{\"value\":\"uqkhrsajiwku\",\"localizedValue\":\"oskg\"}},{\"id\":\"auu\",\"amlWorkspaceLocation\":\"jmvxie\",\"type\":\"ugidyjrr\",\"unit\":\"Count\",\"currentValue\":7621842593771814376,\"limit\":122532505466115624,\"name\":{\"value\":\"onpc\",\"localizedValue\":\"ocohslkevleg\"}},{\"id\":\"fbuhfmvfaxkffe\",\"amlWorkspaceLocation\":\"th\",\"type\":\"m\",\"unit\":\"Count\",\"currentValue\":9115490458846755949,\"limit\":3938193441578010473,\"name\":{\"value\":\"bzoggigrx\",\"localizedValue\":\"ur\"}}],\"nextLink\":\"xxjnspydptk\"}") - .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 c506122bb15f7..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListWorkspaceQuotasTests.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.ListWorkspaceQuotas; - -public final class ListWorkspaceQuotasTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ListWorkspaceQuotas model = BinaryData.fromString( - "{\"value\":[{\"id\":\"zjancuxr\",\"amlWorkspaceLocation\":\"wbavxbniwdj\",\"type\":\"zt\",\"name\":{\"value\":\"pgn\",\"localizedValue\":\"txhp\"},\"limit\":6965353138700786103,\"unit\":\"Count\"},{\"id\":\"abgl\",\"amlWorkspaceLocation\":\"hxw\",\"type\":\"tyq\",\"name\":{\"value\":\"bbovplwzbhvgyugu\",\"localizedValue\":\"vmkfssxqu\"},\"limit\":2455965823671467627,\"unit\":\"Count\"},{\"id\":\"gsxnkjzkdeslpv\",\"amlWorkspaceLocation\":\"pwiyig\",\"type\":\"pkdwzbai\",\"name\":{\"value\":\"baumnyqupedeoj\",\"localizedValue\":\"bckhsmtxpsi\"},\"limit\":8592172469751933163,\"unit\":\"Count\"}],\"nextLink\":\"esap\"}") - .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 31912a4ddd42b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/LiteralJobInputTests.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.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\":\"ntqrcjqpzj\",\"description\":\"pjrrhpgsjbioag\"}") - .toObject(LiteralJobInput.class); - Assertions.assertEquals("pjrrhpgsjbioag", model.description()); - Assertions.assertEquals("ntqrcjqpzj", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LiteralJobInput model = new LiteralJobInput().withDescription("pjrrhpgsjbioag").withValue("ntqrcjqpzj"); - model = BinaryData.fromObject(model).toObject(LiteralJobInput.class); - Assertions.assertEquals("pjrrhpgsjbioag", model.description()); - Assertions.assertEquals("ntqrcjqpzj", 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 5fa57b29c6ead..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLFlowModelJobInputTests.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.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\",\"uri\":\"hximkgfmxpq\",\"mode\":\"ReadWriteMount\",\"description\":\"yriwnto\"}") - .toObject(MLFlowModelJobInput.class); - Assertions.assertEquals("yriwnto", model.description()); - Assertions.assertEquals("hximkgfmxpq", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MLFlowModelJobInput model = new MLFlowModelJobInput().withDescription("yriwnto") - .withUri("hximkgfmxpq") - .withMode(InputDeliveryMode.READ_WRITE_MOUNT); - model = BinaryData.fromObject(model).toObject(MLFlowModelJobInput.class); - Assertions.assertEquals("yriwnto", model.description()); - Assertions.assertEquals("hximkgfmxpq", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } -} 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 a5dc943e5d818..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLFlowModelJobOutputTests.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.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\",\"uri\":\"i\",\"mode\":\"Direct\",\"description\":\"dqvao\"}") - .toObject(MLFlowModelJobOutput.class); - Assertions.assertEquals("dqvao", model.description()); - Assertions.assertEquals("i", model.uri()); - Assertions.assertEquals(OutputDeliveryMode.DIRECT, model.mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MLFlowModelJobOutput model - = new MLFlowModelJobOutput().withDescription("dqvao").withUri("i").withMode(OutputDeliveryMode.DIRECT); - model = BinaryData.fromObject(model).toObject(MLFlowModelJobOutput.class); - Assertions.assertEquals("dqvao", model.description()); - Assertions.assertEquals("i", model.uri()); - Assertions.assertEquals(OutputDeliveryMode.DIRECT, model.mode()); - } -} 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 1f88c2e14522a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableDataTests.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.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\":[\"xdfsfvkjc\",\"m\"],\"dataUri\":\"rsvxphtjnhptj\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"z\",\"tags\":{\"rgyzcslazp\":\"mydtdtftmizuzjd\",\"teagbgac\":\"kqoyimxpggk\",\"lpbybkisb\":\"qpjuytvude\",\"glpwdjr\":\"ifm\"},\"properties\":{\"ttuhaaax\":\"fshznu\",\"xstowagehxuihwes\":\"dcdjmdkqtxfrmbe\",\"kncypmte\":\"tjaqgbl\",\"hrfbrj\":\"spsaneyvaerpiob\"}}") - .toObject(MLTableData.class); - Assertions.assertEquals("z", model.description()); - Assertions.assertEquals("mydtdtftmizuzjd", model.tags().get("rgyzcslazp")); - Assertions.assertEquals("fshznu", model.properties().get("ttuhaaax")); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals(true, model.isAnonymous()); - Assertions.assertEquals("rsvxphtjnhptj", model.dataUri()); - Assertions.assertEquals("xdfsfvkjc", model.referencedUris().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MLTableData model = new MLTableData().withDescription("z") - .withTags(mapOf("rgyzcslazp", "mydtdtftmizuzjd", "teagbgac", "kqoyimxpggk", "lpbybkisb", "qpjuytvude", - "glpwdjr", "ifm")) - .withProperties(mapOf("ttuhaaax", "fshznu", "xstowagehxuihwes", "dcdjmdkqtxfrmbe", "kncypmte", "tjaqgbl", - "hrfbrj", "spsaneyvaerpiob")) - .withIsArchived(false) - .withIsAnonymous(true) - .withDataUri("rsvxphtjnhptj") - .withReferencedUris(Arrays.asList("xdfsfvkjc", "m")); - model = BinaryData.fromObject(model).toObject(MLTableData.class); - Assertions.assertEquals("z", model.description()); - Assertions.assertEquals("mydtdtftmizuzjd", model.tags().get("rgyzcslazp")); - Assertions.assertEquals("fshznu", model.properties().get("ttuhaaax")); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals(true, model.isAnonymous()); - Assertions.assertEquals("rsvxphtjnhptj", model.dataUri()); - Assertions.assertEquals("xdfsfvkjc", model.referencedUris().get(0)); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 00c211bd2c3b5..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableJobInputTests.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.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\",\"uri\":\"ezefkhkqtwqlepjj\",\"mode\":\"ReadOnlyMount\",\"description\":\"sf\"}") - .toObject(MLTableJobInput.class); - Assertions.assertEquals("sf", model.description()); - Assertions.assertEquals("ezefkhkqtwqlepjj", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MLTableJobInput model = new MLTableJobInput().withDescription("sf") - .withUri("ezefkhkqtwqlepjj") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT); - model = BinaryData.fromObject(model).toObject(MLTableJobInput.class); - Assertions.assertEquals("sf", model.description()); - Assertions.assertEquals("ezefkhkqtwqlepjj", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.mode()); - } -} 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 b2ee04cf7c10b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableJobOutputTests.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.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\",\"uri\":\"jwqdmr\",\"mode\":\"Upload\",\"description\":\"lppqcaigazwfwlr\"}") - .toObject(MLTableJobOutput.class); - Assertions.assertEquals("lppqcaigazwfwlr", model.description()); - Assertions.assertEquals("jwqdmr", model.uri()); - Assertions.assertEquals(OutputDeliveryMode.UPLOAD, model.mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MLTableJobOutput model = new MLTableJobOutput().withDescription("lppqcaigazwfwlr") - .withUri("jwqdmr") - .withMode(OutputDeliveryMode.UPLOAD); - model = BinaryData.fromObject(model).toObject(MLTableJobOutput.class); - Assertions.assertEquals("lppqcaigazwfwlr", model.description()); - Assertions.assertEquals("jwqdmr", model.uri()); - Assertions.assertEquals(OutputDeliveryMode.UPLOAD, model.mode()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedComputeIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedComputeIdentityTests.java deleted file mode 100644 index e138e9b9c8fce..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedComputeIdentityTests.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.ManagedComputeIdentity; -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 ManagedComputeIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedComputeIdentity model = BinaryData.fromString( - "{\"computeIdentityType\":\"ManagedIdentity\",\"identity\":{\"principalId\":\"ac27e7a4-e37a-4a73-ac6d-825782241d27\",\"tenantId\":\"5de2a901-fd71-4a09-b7b2-d28cbd13275f\",\"type\":\"None\",\"userAssignedIdentities\":{\"dtqfdrslzy\":{\"principalId\":\"727491ce-ba18-47e7-afa8-66472129f016\",\"clientId\":\"2a8ed716-1cb0-46ba-a012-8ae6592edc5f\"},\"serwyc\":{\"principalId\":\"742777d7-4b97-40ba-a340-8b5a8bee335a\",\"clientId\":\"b40dff74-a8fa-4431-bb17-ae3570eeaad0\"},\"tjwgetfigwn\":{\"principalId\":\"c693785e-2e1d-4c6c-a356-b522b6ffa031\",\"clientId\":\"232013d3-965d-45cd-97f3-a3c6405ab3a6\"},\"xzizebjr\":{\"principalId\":\"4e9f274b-4fdf-42dd-9e92-23d397371caa\",\"clientId\":\"22074597-d87e-4b5e-9bd9-b53cee169626\"}}}}") - .toObject(ManagedComputeIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedComputeIdentity model = new ManagedComputeIdentity() - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities( - mapOf("dtqfdrslzy", new UserAssignedIdentity(), "serwyc", new UserAssignedIdentity(), "tjwgetfigwn", - new UserAssignedIdentity(), "xzizebjr", new UserAssignedIdentity()))); - model = BinaryData.fromObject(model).toObject(ManagedComputeIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); - } - - // 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/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 d7dfe57cb2e85..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedIdentityTests.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.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\":\"c1cac5a4-f742-4da9-85fd-d6c1a568ade8\",\"objectId\":\"571ce55d-766a-492c-b0fc-2ed317841bdc\",\"resourceId\":\"stubw\"}") - .toObject(ManagedIdentity.class); - Assertions.assertEquals(UUID.fromString("c1cac5a4-f742-4da9-85fd-d6c1a568ade8"), model.clientId()); - Assertions.assertEquals(UUID.fromString("571ce55d-766a-492c-b0fc-2ed317841bdc"), model.objectId()); - Assertions.assertEquals("stubw", model.resourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedIdentity model - = new ManagedIdentity().withClientId(UUID.fromString("c1cac5a4-f742-4da9-85fd-d6c1a568ade8")) - .withObjectId(UUID.fromString("571ce55d-766a-492c-b0fc-2ed317841bdc")) - .withResourceId("stubw"); - model = BinaryData.fromObject(model).toObject(ManagedIdentity.class); - Assertions.assertEquals(UUID.fromString("c1cac5a4-f742-4da9-85fd-d6c1a568ade8"), model.clientId()); - Assertions.assertEquals(UUID.fromString("571ce55d-766a-492c-b0fc-2ed317841bdc"), model.objectId()); - Assertions.assertEquals("stubw", model.resourceId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionOptionsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionOptionsTests.java deleted file mode 100644 index fe52d995a98c1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionOptionsTests.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.ManagedNetworkProvisionOptions; -import org.junit.jupiter.api.Assertions; - -public final class ManagedNetworkProvisionOptionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedNetworkProvisionOptions model - = BinaryData.fromString("{\"includeSpark\":true}").toObject(ManagedNetworkProvisionOptions.class); - Assertions.assertEquals(true, model.includeSpark()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedNetworkProvisionOptions model = new ManagedNetworkProvisionOptions().withIncludeSpark(true); - model = BinaryData.fromObject(model).toObject(ManagedNetworkProvisionOptions.class); - Assertions.assertEquals(true, model.includeSpark()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionStatusInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionStatusInnerTests.java deleted file mode 100644 index 2ef9d27faca9e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionStatusInnerTests.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.ManagedNetworkProvisionStatusInner; -import com.azure.resourcemanager.machinelearning.models.ManagedNetworkStatus; -import org.junit.jupiter.api.Assertions; - -public final class ManagedNetworkProvisionStatusInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedNetworkProvisionStatusInner model - = BinaryData.fromString("{\"sparkReady\":false,\"status\":\"Inactive\"}") - .toObject(ManagedNetworkProvisionStatusInner.class); - Assertions.assertEquals(false, model.sparkReady()); - Assertions.assertEquals(ManagedNetworkStatus.INACTIVE, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedNetworkProvisionStatusInner model - = new ManagedNetworkProvisionStatusInner().withSparkReady(false).withStatus(ManagedNetworkStatus.INACTIVE); - model = BinaryData.fromObject(model).toObject(ManagedNetworkProvisionStatusInner.class); - Assertions.assertEquals(false, model.sparkReady()); - Assertions.assertEquals(ManagedNetworkStatus.INACTIVE, model.status()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionsProvisionManagedNetworkMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionsProvisionManagedNetworkMockTests.java deleted file mode 100644 index 7ca93205e6a7d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkProvisionsProvisionManagedNetworkMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisionOptions; -import com.azure.resourcemanager.machinelearning.models.ManagedNetworkProvisionStatus; -import com.azure.resourcemanager.machinelearning.models.ManagedNetworkStatus; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ManagedNetworkProvisionsProvisionManagedNetworkMockTests { - @Test - public void testProvisionManagedNetwork() throws Exception { - String responseStr = "{\"sparkReady\":false,\"status\":\"Inactive\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ManagedNetworkProvisionStatus response = manager.managedNetworkProvisions() - .provisionManagedNetwork("ljzbkdwlfjwxgvtk", "ctvrpeawzzkvf", - new ManagedNetworkProvisionOptions().withIncludeSpark(true), com.azure.core.util.Context.NONE); - - Assertions.assertEquals(false, response.sparkReady()); - Assertions.assertEquals(ManagedNetworkStatus.INACTIVE, response.status()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsInnerTests.java deleted file mode 100644 index c547f4a752d59..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsInnerTests.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.ManagedNetworkProvisionStatusInner; -import com.azure.resourcemanager.machinelearning.fluent.models.ManagedNetworkSettingsInner; -import com.azure.resourcemanager.machinelearning.models.IsolationMode; -import com.azure.resourcemanager.machinelearning.models.ManagedNetworkStatus; -import com.azure.resourcemanager.machinelearning.models.OutboundRule; -import com.azure.resourcemanager.machinelearning.models.RuleCategory; -import com.azure.resourcemanager.machinelearning.models.RuleStatus; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ManagedNetworkSettingsInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedNetworkSettingsInner model = BinaryData.fromString( - "{\"isolationMode\":\"AllowOnlyApprovedOutbound\",\"networkId\":\"koty\",\"outboundRules\":{\"ndlik\":{\"type\":\"OutboundRule\",\"category\":\"UserDefined\",\"status\":\"Inactive\"}},\"status\":{\"sparkReady\":false,\"status\":\"Active\"}}") - .toObject(ManagedNetworkSettingsInner.class); - Assertions.assertEquals(IsolationMode.ALLOW_ONLY_APPROVED_OUTBOUND, model.isolationMode()); - Assertions.assertEquals(RuleCategory.USER_DEFINED, model.outboundRules().get("ndlik").category()); - Assertions.assertEquals(RuleStatus.INACTIVE, model.outboundRules().get("ndlik").status()); - Assertions.assertEquals(false, model.status().sparkReady()); - Assertions.assertEquals(ManagedNetworkStatus.ACTIVE, model.status().status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedNetworkSettingsInner model = new ManagedNetworkSettingsInner() - .withIsolationMode(IsolationMode.ALLOW_ONLY_APPROVED_OUTBOUND) - .withOutboundRules(mapOf("ndlik", - new OutboundRule().withCategory(RuleCategory.USER_DEFINED).withStatus(RuleStatus.INACTIVE))) - .withStatus( - new ManagedNetworkProvisionStatusInner().withSparkReady(false).withStatus(ManagedNetworkStatus.ACTIVE)); - model = BinaryData.fromObject(model).toObject(ManagedNetworkSettingsInner.class); - Assertions.assertEquals(IsolationMode.ALLOW_ONLY_APPROVED_OUTBOUND, model.isolationMode()); - Assertions.assertEquals(RuleCategory.USER_DEFINED, model.outboundRules().get("ndlik").category()); - Assertions.assertEquals(RuleStatus.INACTIVE, model.outboundRules().get("ndlik").status()); - Assertions.assertEquals(false, model.status().sparkReady()); - Assertions.assertEquals(ManagedNetworkStatus.ACTIVE, model.status().status()); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesCreateOrUpdateMockTests.java deleted file mode 100644 index 7315863af2930..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesCreateOrUpdateMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.OutboundRule; -import com.azure.resourcemanager.machinelearning.models.OutboundRuleBasicResource; -import com.azure.resourcemanager.machinelearning.models.RuleCategory; -import com.azure.resourcemanager.machinelearning.models.RuleStatus; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ManagedNetworkSettingsRulesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"Dependency\",\"status\":\"Inactive\"},\"id\":\"akk\",\"name\":\"bjortztkajqhsns\",\"type\":\"jplislx\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - OutboundRuleBasicResource response = manager.managedNetworkSettingsRules() - .define("crlkorv") - .withExistingWorkspace("ibtvavl", "aqtlocnwmefzvzuz") - .withProperties(new OutboundRule().withCategory(RuleCategory.USER_DEFINED).withStatus(RuleStatus.INACTIVE)) - .create(); - - Assertions.assertEquals(RuleCategory.DEPENDENCY, response.properties().category()); - Assertions.assertEquals(RuleStatus.INACTIVE, response.properties().status()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesDeleteMockTests.java deleted file mode 100644 index aff10ac700cef..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ManagedNetworkSettingsRulesDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.managedNetworkSettingsRules() - .delete("lngsfmh", "dxqupyml", "klmnjqzmqynhitr", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesGetWithResponseMockTests.java deleted file mode 100644 index d95f7468c7fdb..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.OutboundRuleBasicResource; -import com.azure.resourcemanager.machinelearning.models.RuleCategory; -import com.azure.resourcemanager.machinelearning.models.RuleStatus; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ManagedNetworkSettingsRulesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"Recommended\",\"status\":\"Active\"},\"id\":\"nlmdcnutiex\",\"name\":\"izunzbqvioyn\",\"type\":\"tfqhhvvwzprjaaai\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - OutboundRuleBasicResource response = manager.managedNetworkSettingsRules() - .getWithResponse("wqgqrbthbfpi", "nrjocogwf", "kywzrqeiad", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(RuleCategory.RECOMMENDED, response.properties().category()); - Assertions.assertEquals(RuleStatus.ACTIVE, response.properties().status()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesListMockTests.java deleted file mode 100644 index 65b2e56a44897..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedNetworkSettingsRulesListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.OutboundRuleBasicResource; -import com.azure.resourcemanager.machinelearning.models.RuleCategory; -import com.azure.resourcemanager.machinelearning.models.RuleStatus; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ManagedNetworkSettingsRulesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"Dependency\",\"status\":\"Inactive\"},\"id\":\"x\",\"name\":\"ocaywmfvuhz\",\"type\":\"olhve\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.managedNetworkSettingsRules().list("hdkubgywadr", "lpdyehj", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(RuleCategory.DEPENDENCY, response.iterator().next().properties().category()); - Assertions.assertEquals(RuleStatus.INACTIVE, response.iterator().next().properties().status()); - } -} 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 21416ca8b3958..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedServiceIdentityTests.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.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\":\"1d0fdb15-2831-4e0e-a59d-c10c1c336a7c\",\"tenantId\":\"4e5f2ce2-d525-44ab-b1d1-7b0e5316f387\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"dkwt\":{\"principalId\":\"32b7f306-79e8-413a-b464-f34445d25a75\",\"clientId\":\"027bed66-ef57-4b54-9ee5-b18937e924d7\"}}}") - .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("dkwt", new UserAssignedIdentity())); - model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.type()); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplacePlanTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplacePlanTests.java deleted file mode 100644 index 06b32cf33b45b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplacePlanTests.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.MarketplacePlan; - -public final class MarketplacePlanTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MarketplacePlan model = BinaryData - .fromString("{\"publisherId\":\"rvxhmtfhocnxzcm\",\"offerId\":\"ngxno\",\"planId\":\"xtdisnjevhd\"}") - .toObject(MarketplacePlan.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MarketplacePlan model = new MarketplacePlan(); - model = BinaryData.fromObject(model).toObject(MarketplacePlan.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionInnerTests.java deleted file mode 100644 index 6715139b48122..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionInnerTests.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.fluent.models.MarketplaceSubscriptionInner; -import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptionProperties; -import org.junit.jupiter.api.Assertions; - -public final class MarketplaceSubscriptionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MarketplaceSubscriptionInner model = BinaryData.fromString( - "{\"properties\":{\"modelId\":\"cpxdazvd\",\"marketplacePlan\":{\"publisherId\":\"mmkoszudb\",\"offerId\":\"s\",\"planId\":\"rpcaqkiofkbtf\"},\"marketplaceSubscriptionStatus\":\"Unsubscribed\",\"provisioningState\":\"Canceled\"},\"id\":\"l\",\"name\":\"pvcbhhe\",\"type\":\"yq\"}") - .toObject(MarketplaceSubscriptionInner.class); - Assertions.assertEquals("cpxdazvd", model.properties().modelId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MarketplaceSubscriptionInner model = new MarketplaceSubscriptionInner() - .withProperties(new MarketplaceSubscriptionProperties().withModelId("cpxdazvd")); - model = BinaryData.fromObject(model).toObject(MarketplaceSubscriptionInner.class); - Assertions.assertEquals("cpxdazvd", model.properties().modelId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionPropertiesTests.java deleted file mode 100644 index 7cb3e3217304e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionPropertiesTests.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.MarketplaceSubscriptionProperties; -import org.junit.jupiter.api.Assertions; - -public final class MarketplaceSubscriptionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MarketplaceSubscriptionProperties model = BinaryData.fromString( - "{\"modelId\":\"wusqx\",\"marketplacePlan\":{\"publisherId\":\"pbrruyu\",\"offerId\":\"tvlmbjwcolbmxlb\",\"planId\":\"tpc\"},\"marketplaceSubscriptionStatus\":\"Subscribed\",\"provisioningState\":\"Deleting\"}") - .toObject(MarketplaceSubscriptionProperties.class); - Assertions.assertEquals("wusqx", model.modelId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MarketplaceSubscriptionProperties model = new MarketplaceSubscriptionProperties().withModelId("wusqx"); - model = BinaryData.fromObject(model).toObject(MarketplaceSubscriptionProperties.class); - Assertions.assertEquals("wusqx", model.modelId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionResourceArmPaginatedResultTests.java deleted file mode 100644 index 5768c128755d0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionResourceArmPaginatedResultTests.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.fluent.models.MarketplaceSubscriptionInner; -import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptionProperties; -import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptionResourceArmPaginatedResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MarketplaceSubscriptionResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MarketplaceSubscriptionResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"modelId\":\"rhuzgfxonjtpu\",\"marketplacePlan\":{\"publisherId\":\"ywpvt\",\"offerId\":\"tzbpdbollgry\",\"planId\":\"iuas\"},\"marketplaceSubscriptionStatus\":\"Suspended\",\"provisioningState\":\"Succeeded\"},\"id\":\"ocnequygdjboqgrm\",\"name\":\"qjkqevadrmmwi\",\"type\":\"awvcmjzkxiid\"},{\"properties\":{\"modelId\":\"scz\",\"marketplacePlan\":{\"publisherId\":\"s\",\"offerId\":\"qiqazugamxzkr\",\"planId\":\"oiisbamnppcce\"},\"marketplaceSubscriptionStatus\":\"Suspended\",\"provisioningState\":\"Deleting\"},\"id\":\"bezaxyfukzxuiz\",\"name\":\"y\",\"type\":\"nepk\"}],\"nextLink\":\"tiarxqiubxduk\"}") - .toObject(MarketplaceSubscriptionResourceArmPaginatedResult.class); - Assertions.assertEquals("rhuzgfxonjtpu", model.value().get(0).properties().modelId()); - Assertions.assertEquals("tiarxqiubxduk", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MarketplaceSubscriptionResourceArmPaginatedResult model - = new MarketplaceSubscriptionResourceArmPaginatedResult() - .withValue(Arrays.asList( - new MarketplaceSubscriptionInner() - .withProperties(new MarketplaceSubscriptionProperties().withModelId("rhuzgfxonjtpu")), - new MarketplaceSubscriptionInner() - .withProperties(new MarketplaceSubscriptionProperties().withModelId("scz")))) - .withNextLink("tiarxqiubxduk"); - model = BinaryData.fromObject(model).toObject(MarketplaceSubscriptionResourceArmPaginatedResult.class); - Assertions.assertEquals("rhuzgfxonjtpu", model.value().get(0).properties().modelId()); - Assertions.assertEquals("tiarxqiubxduk", model.nextLink()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsCreateOrUpdateMockTests.java deleted file mode 100644 index f53826fa955f4..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsCreateOrUpdateMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscription; -import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscriptionProperties; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class MarketplaceSubscriptionsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"modelId\":\"mhenqn\",\"marketplacePlan\":{\"publisherId\":\"mk\",\"offerId\":\"xvexusjfjuphjjue\",\"planId\":\"vjtgpyoat\"},\"marketplaceSubscriptionStatus\":\"Subscribed\",\"provisioningState\":\"Succeeded\"},\"id\":\"qm\",\"name\":\"xjdkvyzilrlfgowv\",\"type\":\"xjqru\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - MarketplaceSubscription response = manager.marketplaceSubscriptions() - .define("edzyzbvsjut") - .withExistingWorkspace("ktcr", "ct") - .withProperties(new MarketplaceSubscriptionProperties().withModelId("sysefil")) - .create(); - - Assertions.assertEquals("mhenqn", response.properties().modelId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsGetWithResponseMockTests.java deleted file mode 100644 index 7d5e2d1b57721..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscription; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class MarketplaceSubscriptionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"modelId\":\"nssvrkzslyliog\",\"marketplacePlan\":{\"publisherId\":\"hrmcpbmyghqtth\",\"offerId\":\"blwkqztqrnre\",\"planId\":\"fmnrweevtun\"},\"marketplaceSubscriptionStatus\":\"Unsubscribed\",\"provisioningState\":\"Canceled\"},\"id\":\"vsjfpsyqvgaaymfk\",\"name\":\"xhiwmkljhk\",\"type\":\"xcewzgoxz\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - MarketplaceSubscription response = manager.marketplaceSubscriptions() - .getWithResponse("a", "bldhcfhw", "ithxna", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("nssvrkzslyliog", response.properties().modelId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsListMockTests.java deleted file mode 100644 index 286fcb370eb45..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MarketplaceSubscriptionsListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.MarketplaceSubscription; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class MarketplaceSubscriptionsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"modelId\":\"lmw\",\"marketplacePlan\":{\"publisherId\":\"bkwrvtflotji\",\"offerId\":\"iswi\",\"planId\":\"vnw\"},\"marketplaceSubscriptionStatus\":\"Subscribed\",\"provisioningState\":\"Canceled\"},\"id\":\"ylsl\",\"name\":\"bdtrwkpely\",\"type\":\"lfwmajl\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.marketplaceSubscriptions().list("rmp", "apyq", "esginpixhulf", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("lmw", response.iterator().next().properties().modelId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MaterializationComputeResourceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MaterializationComputeResourceTests.java deleted file mode 100644 index 3c764ebe79e88..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MaterializationComputeResourceTests.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.MaterializationComputeResource; -import org.junit.jupiter.api.Assertions; - -public final class MaterializationComputeResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MaterializationComputeResource model - = BinaryData.fromString("{\"instanceType\":\"emv\"}").toObject(MaterializationComputeResource.class); - Assertions.assertEquals("emv", model.instanceType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MaterializationComputeResource model = new MaterializationComputeResource().withInstanceType("emv"); - model = BinaryData.fromObject(model).toObject(MaterializationComputeResource.class); - Assertions.assertEquals("emv", model.instanceType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MaterializationSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MaterializationSettingsTests.java deleted file mode 100644 index 5c0769367cf9e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MaterializationSettingsTests.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.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; -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.Webhook; -import com.azure.resourcemanager.machinelearning.models.WeekDay; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class MaterializationSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MaterializationSettings model = BinaryData.fromString( - "{\"storeType\":\"Offline\",\"schedule\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Day\",\"interval\":1695764846,\"schedule\":{\"hours\":[448963425,170152558,1340957573,1561402676],\"minutes\":[1767773898,490513850,526112283],\"weekDays\":[\"Thursday\",\"Thursday\"],\"monthDays\":[1412806239,1522988272,495310352,1541316864]},\"endTime\":\"yghs\",\"startTime\":\"cyl\",\"timeZone\":\"gmnsghpxy\"},\"notification\":{\"emails\":[\"rwjjkhvyomacluzv\",\"nqmhrp\",\"pd\"],\"emailOn\":[\"JobCancelled\",\"JobFailed\",\"JobCompleted\"],\"webhooks\":{\"ypobkdqzr\":{\"webhookType\":\"Webhook\",\"eventType\":\"ssffxuifmc\"}}},\"resource\":{\"instanceType\":\"ylollgtrczzydmxz\"},\"sparkConfiguration\":{\"uaurkihcir\":\"p\",\"xnbkkj\":\"defxrdc\",\"nqbpi\":\"nurnnq\",\"gypxrxvbfihwuhvc\":\"xqltgrd\"}}") - .toObject(MaterializationSettings.class); - Assertions.assertEquals(MaterializationStoreType.OFFLINE, model.storeType()); - Assertions.assertEquals("yghs", model.schedule().endTime()); - Assertions.assertEquals("cyl", model.schedule().startTime()); - Assertions.assertEquals("gmnsghpxy", model.schedule().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.DAY, model.schedule().frequency()); - Assertions.assertEquals(1695764846, model.schedule().interval()); - Assertions.assertEquals(448963425, model.schedule().schedule().hours().get(0)); - Assertions.assertEquals(1767773898, model.schedule().schedule().minutes().get(0)); - Assertions.assertEquals(WeekDay.THURSDAY, model.schedule().schedule().weekDays().get(0)); - Assertions.assertEquals(1412806239, model.schedule().schedule().monthDays().get(0)); - Assertions.assertEquals("rwjjkhvyomacluzv", model.notification().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, model.notification().emailOn().get(0)); - Assertions.assertEquals("ssffxuifmc", model.notification().webhooks().get("ypobkdqzr").eventType()); - Assertions.assertEquals("ylollgtrczzydmxz", model.resource().instanceType()); - Assertions.assertEquals("p", model.sparkConfiguration().get("uaurkihcir")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MaterializationSettings model - = new MaterializationSettings().withStoreType(MaterializationStoreType.OFFLINE) - .withSchedule( - new RecurrenceTrigger().withEndTime("yghs") - .withStartTime("cyl") - .withTimeZone("gmnsghpxy") - .withFrequency(RecurrenceFrequency.DAY) - .withInterval(1695764846) - .withSchedule(new RecurrenceSchedule() - .withHours(Arrays.asList(448963425, 170152558, 1340957573, 1561402676)) - .withMinutes(Arrays.asList(1767773898, 490513850, 526112283)) - .withWeekDays(Arrays.asList(WeekDay.THURSDAY, WeekDay.THURSDAY)) - .withMonthDays(Arrays.asList(1412806239, 1522988272, 495310352, 1541316864)))) - .withNotification( - new NotificationSetting().withEmails(Arrays.asList("rwjjkhvyomacluzv", "nqmhrp", "pd")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_CANCELLED, - EmailNotificationEnableType.JOB_FAILED, EmailNotificationEnableType.JOB_COMPLETED)) - .withWebhooks(mapOf("ypobkdqzr", new Webhook().withEventType("ssffxuifmc")))) - .withResource(new MaterializationComputeResource().withInstanceType("ylollgtrczzydmxz")) - .withSparkConfiguration( - mapOf("uaurkihcir", "p", "xnbkkj", "defxrdc", "nqbpi", "nurnnq", "gypxrxvbfihwuhvc", "xqltgrd")); - model = BinaryData.fromObject(model).toObject(MaterializationSettings.class); - Assertions.assertEquals(MaterializationStoreType.OFFLINE, model.storeType()); - Assertions.assertEquals("yghs", model.schedule().endTime()); - Assertions.assertEquals("cyl", model.schedule().startTime()); - Assertions.assertEquals("gmnsghpxy", model.schedule().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.DAY, model.schedule().frequency()); - Assertions.assertEquals(1695764846, model.schedule().interval()); - Assertions.assertEquals(448963425, model.schedule().schedule().hours().get(0)); - Assertions.assertEquals(1767773898, model.schedule().schedule().minutes().get(0)); - Assertions.assertEquals(WeekDay.THURSDAY, model.schedule().schedule().weekDays().get(0)); - Assertions.assertEquals(1412806239, model.schedule().schedule().monthDays().get(0)); - Assertions.assertEquals("rwjjkhvyomacluzv", model.notification().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, model.notification().emailOn().get(0)); - Assertions.assertEquals("ssffxuifmc", model.notification().webhooks().get("ypobkdqzr").eventType()); - Assertions.assertEquals("ylollgtrczzydmxz", model.resource().instanceType()); - Assertions.assertEquals("p", model.sparkConfiguration().get("uaurkihcir")); - } - - // 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/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 487617bb36173..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MedianStoppingPolicyTests.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.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\",\"evaluationInterval\":146013478,\"delayEvaluation\":808656938}") - .toObject(MedianStoppingPolicy.class); - Assertions.assertEquals(146013478, model.evaluationInterval()); - Assertions.assertEquals(808656938, model.delayEvaluation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MedianStoppingPolicy model - = new MedianStoppingPolicy().withEvaluationInterval(146013478).withDelayEvaluation(808656938); - model = BinaryData.fromObject(model).toObject(MedianStoppingPolicy.class); - Assertions.assertEquals(146013478, model.evaluationInterval()); - Assertions.assertEquals(808656938, model.delayEvaluation()); - } -} 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 29b6f92916924..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerInnerTests.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.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\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"yrxpdlcgqls\",\"nextVersion\":\"mjqfrddgamquhio\",\"description\":\"sjuivfcdisyir\",\"tags\":{\"xrxzbujrtr\":\"hcz\",\"khgn\":\"qvwre\",\"piqywnc\":\"nzonzl\",\"zehtdhgb\":\"jtszcof\"},\"properties\":{\"zmlovuanash\":\"reljeamur\",\"erbdk\":\"xlpm\"}},\"id\":\"vidizozsdb\",\"name\":\"cxjmonfdgnwncyp\",\"type\":\"uwwltvuqjctz\"}") - .toObject(ModelContainerInner.class); - Assertions.assertEquals("sjuivfcdisyir", model.properties().description()); - Assertions.assertEquals("hcz", model.properties().tags().get("xrxzbujrtr")); - Assertions.assertEquals("reljeamur", model.properties().properties().get("zmlovuanash")); - Assertions.assertEquals(false, model.properties().isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ModelContainerInner model - = new ModelContainerInner().withProperties(new ModelContainerProperties().withDescription("sjuivfcdisyir") - .withTags(mapOf("xrxzbujrtr", "hcz", "khgn", "qvwre", "piqywnc", "nzonzl", "zehtdhgb", "jtszcof")) - .withProperties(mapOf("zmlovuanash", "reljeamur", "erbdk", "xlpm")) - .withIsArchived(false)); - model = BinaryData.fromObject(model).toObject(ModelContainerInner.class); - Assertions.assertEquals("sjuivfcdisyir", model.properties().description()); - Assertions.assertEquals("hcz", model.properties().tags().get("xrxzbujrtr")); - Assertions.assertEquals("reljeamur", model.properties().properties().get("zmlovuanash")); - Assertions.assertEquals(false, model.properties().isArchived()); - } - - // 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/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 99a677855f69e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerPropertiesTests.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.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( - "{\"provisioningState\":\"Failed\",\"isArchived\":false,\"latestVersion\":\"zzhmkd\",\"nextVersion\":\"vflyhbxcu\",\"description\":\"hxgsrboldfor\",\"tags\":{\"qpbtuodxes\":\"jlvizbfhfovva\",\"rrwoycqucwyhahn\":\"abbelawumuaslzk\",\"ywuhpsvfuur\":\"mdr\"},\"properties\":{\"xwlalniexzsrzpg\":\"we\",\"wpgdak\":\"pqtybb\"}}") - .toObject(ModelContainerProperties.class); - Assertions.assertEquals("hxgsrboldfor", model.description()); - Assertions.assertEquals("jlvizbfhfovva", model.tags().get("qpbtuodxes")); - Assertions.assertEquals("we", model.properties().get("xwlalniexzsrzpg")); - Assertions.assertEquals(false, model.isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ModelContainerProperties model = new ModelContainerProperties().withDescription("hxgsrboldfor") - .withTags(mapOf("qpbtuodxes", "jlvizbfhfovva", "rrwoycqucwyhahn", "abbelawumuaslzk", "ywuhpsvfuur", "mdr")) - .withProperties(mapOf("xwlalniexzsrzpg", "we", "wpgdak", "pqtybb")) - .withIsArchived(false); - model = BinaryData.fromObject(model).toObject(ModelContainerProperties.class); - Assertions.assertEquals("hxgsrboldfor", model.description()); - Assertions.assertEquals("jlvizbfhfovva", model.tags().get("qpbtuodxes")); - Assertions.assertEquals("we", model.properties().get("xwlalniexzsrzpg")); - Assertions.assertEquals(false, model.isArchived()); - } - - // 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/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 729884d383457..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerResourceArmPaginatedResultTests.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.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( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"isArchived\":true,\"latestVersion\":\"lcdisd\",\"nextVersion\":\"fj\",\"description\":\"svgjrwhryvy\",\"tags\":{\"knfnwmbtmvpdv\":\"dclxgc\"},\"properties\":{\"ihchrphkmcrjdqn\":\"ttzaefed\"}},\"id\":\"fzpbgtgkyl\",\"name\":\"dgh\",\"type\":\"jeuut\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"zhokvbwnhh\",\"nextVersion\":\"lgehg\",\"description\":\"ipifhpfeoajvg\",\"tags\":{\"sr\":\"xjcsheafidltu\",\"h\":\"smkss\",\"egprhptil\":\"iftxfkf\",\"qtgdqohmcwsl\":\"ucb\"},\"properties\":{\"llibphbqzmizak\":\"zetpwbra\",\"jpdn\":\"kan\"}},\"id\":\"ha\",\"name\":\"oylhjlmuoyxprimr\",\"type\":\"opteecj\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"tvasy\",\"nextVersion\":\"xdza\",\"description\":\"weoohguufuzboyj\",\"tags\":{\"jscjpahl\":\"wtzolbaemwmdxmeb\",\"yijddtvqcttad\":\"veabfqxnmwmqtib\"},\"properties\":{\"ieekpndzaa\":\"eukmr\",\"igpibud\":\"mudqmeq\"}},\"id\":\"yxeb\",\"name\":\"ybpmzznrtffyaq\",\"type\":\"tmhheioqa\"}],\"nextLink\":\"v\"}") - .toObject(ModelContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("svgjrwhryvy", model.value().get(0).properties().description()); - Assertions.assertEquals("dclxgc", model.value().get(0).properties().tags().get("knfnwmbtmvpdv")); - Assertions.assertEquals("ttzaefed", model.value().get(0).properties().properties().get("ihchrphkmcrjdqn")); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("v", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ModelContainerResourceArmPaginatedResult model - = new ModelContainerResourceArmPaginatedResult().withValue(Arrays.asList( - new ModelContainerInner().withProperties(new ModelContainerProperties().withDescription("svgjrwhryvy") - .withTags(mapOf("knfnwmbtmvpdv", "dclxgc")) - .withProperties(mapOf("ihchrphkmcrjdqn", "ttzaefed")) - .withIsArchived(true)), - new ModelContainerInner().withProperties(new ModelContainerProperties().withDescription("ipifhpfeoajvg") - .withTags(mapOf("sr", "xjcsheafidltu", "h", "smkss", "egprhptil", "iftxfkf", "qtgdqohmcwsl", "ucb")) - .withProperties(mapOf("llibphbqzmizak", "zetpwbra", "jpdn", "kan")) - .withIsArchived(false)), - new ModelContainerInner() - .withProperties(new ModelContainerProperties().withDescription("weoohguufuzboyj") - .withTags(mapOf("jscjpahl", "wtzolbaemwmdxmeb", "yijddtvqcttad", "veabfqxnmwmqtib")) - .withProperties(mapOf("ieekpndzaa", "eukmr", "igpibud", "mudqmeq")) - .withIsArchived(false)))) - .withNextLink("v"); - model = BinaryData.fromObject(model).toObject(ModelContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("svgjrwhryvy", model.value().get(0).properties().description()); - Assertions.assertEquals("dclxgc", model.value().get(0).properties().tags().get("knfnwmbtmvpdv")); - Assertions.assertEquals("ttzaefed", model.value().get(0).properties().properties().get("ihchrphkmcrjdqn")); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("v", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 2a5ca165ff07c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersCreateOrUpdateWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ModelContainer; -import com.azure.resourcemanager.machinelearning.models.ModelContainerProperties; -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 reactor.core.publisher.Mono; - -public final class ModelContainersCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"rwnpwgchlabtt\",\"nextVersion\":\"ittheaxq\",\"description\":\"flnl\",\"tags\":{\"gqtcxyrslegh\":\"csslellfukqurrtc\"},\"properties\":{\"zr\":\"mjjsvym\",\"spjqafsxvqq\":\"yyvlx\",\"vvih\":\"azoblxxksputiz\"}},\"id\":\"sdolodfodokhaog\",\"name\":\"wdhlnarjtuoarj\",\"type\":\"riccuyqtj\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("xm") - .withExistingWorkspace("jnpatazfyxegkly", "d") - .withProperties(new ModelContainerProperties().withDescription("forgcufi") - .withTags(mapOf("zknybfsoayatq", "roiz", "oggdp", "dzuxpldzkvbebdjs")) - .withProperties(mapOf("ooyxc", "oxlccj", "jhqq", "zzogz")) - .withIsArchived(false)) - .create(); - - Assertions.assertEquals("flnl", response.properties().description()); - Assertions.assertEquals("csslellfukqurrtc", response.properties().tags().get("gqtcxyrslegh")); - Assertions.assertEquals("mjjsvym", response.properties().properties().get("zr")); - Assertions.assertEquals(false, response.properties().isArchived()); - } - - // 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/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 674e9ac210350..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersDeleteWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ModelContainersDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("gnwwji", "gpwdczzkz", "bpj", 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 95a9b05b3f6f0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ModelContainer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ModelContainersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Failed\",\"isArchived\":true,\"latestVersion\":\"zqhph\",\"nextVersion\":\"jmi\",\"description\":\"vnrj\",\"tags\":{\"lldglzdkxftjre\":\"pbgtzrgyrldo\"},\"properties\":{\"ztghdwrvffjpw\":\"kvbdvlazkxaujjr\",\"cplxid\":\"zlfyftgae\",\"puw\":\"uxzzhldaxvi\"}},\"id\":\"f\",\"name\":\"nwvrbbpgibyzrpq\",\"type\":\"hrdldvxcjj\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("hhiofcnyzqznld", "ngqwmllegucem", "gs", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("vnrj", response.properties().description()); - Assertions.assertEquals("pbgtzrgyrldo", response.properties().tags().get("lldglzdkxftjre")); - Assertions.assertEquals("kvbdvlazkxaujjr", response.properties().properties().get("ztghdwrvffjpw")); - 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 761268dd3f51b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.ModelContainer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ModelContainersListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\",\"isArchived\":false,\"latestVersion\":\"mebmxzwcf\",\"nextVersion\":\"x\",\"description\":\"rppwksixho\",\"tags\":{\"dqttiqwixsdx\":\"ydxjkdsqeay\",\"tvbqhyszflzjzdci\":\"flwfvahbwhrguq\",\"shbkdptcm\":\"xlggrtpayfklb\"},\"properties\":{\"fiykloeqx\":\"nvkhjtrashnf\"}},\"id\":\"pqboubehzipyia\",\"name\":\"suuvo\",\"type\":\"qseoinxkothrn\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("k", "bqyfecnsqeewf", "wgmkcaya", 659953867, ListViewType.ALL, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("rppwksixho", response.iterator().next().properties().description()); - Assertions.assertEquals("ydxjkdsqeay", response.iterator().next().properties().tags().get("dqttiqwixsdx")); - Assertions.assertEquals("nvkhjtrashnf", response.iterator().next().properties().properties().get("fiykloeqx")); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelSettingsTests.java deleted file mode 100644 index 05d7123de90a4..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelSettingsTests.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.ModelSettings; -import org.junit.jupiter.api.Assertions; - -public final class ModelSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ModelSettings model = BinaryData.fromString("{\"modelId\":\"okatu\"}").toObject(ModelSettings.class); - Assertions.assertEquals("okatu", model.modelId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ModelSettings model = new ModelSettings().withModelId("okatu"); - model = BinaryData.fromObject(model).toObject(ModelSettings.class); - Assertions.assertEquals("okatu", model.modelId()); - } -} 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 6eca28a3d3dce..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionInnerTests.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.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\":{\"zcyjtot\":{\"data\":{\"ftpmdtzfjltfv\":\"lgorb\"}}},\"modelType\":\"opv\",\"modelUri\":\"dbzqgqqihed\",\"jobName\":\"qwthmky\",\"provisioningState\":\"Deleting\",\"stage\":\"sihsgqcwdhohsd\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"ufcohdxbz\",\"tags\":{\"qxeysko\":\"muapcvhdbevw\",\"z\":\"qzinkfkbg\",\"vkzqk\":\"owxeqocljmy\"},\"properties\":{\"zrxcczurt\":\"okbzef\",\"pqxbkwvzgnzvdf\":\"e\"}},\"id\":\"d\",\"name\":\"xzmqpnodawop\",\"type\":\"hewjptmcgsbost\"}") - .toObject(ModelVersionInner.class); - Assertions.assertEquals("ufcohdxbz", model.properties().description()); - Assertions.assertEquals("muapcvhdbevw", model.properties().tags().get("qxeysko")); - Assertions.assertEquals("okbzef", model.properties().properties().get("zrxcczurt")); - Assertions.assertEquals(false, model.properties().isArchived()); - Assertions.assertEquals(false, model.properties().isAnonymous()); - Assertions.assertEquals("lgorb", model.properties().flavors().get("zcyjtot").data().get("ftpmdtzfjltfv")); - Assertions.assertEquals("opv", model.properties().modelType()); - Assertions.assertEquals("dbzqgqqihed", model.properties().modelUri()); - Assertions.assertEquals("qwthmky", model.properties().jobName()); - Assertions.assertEquals("sihsgqcwdhohsd", model.properties().stage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ModelVersionInner model - = new ModelVersionInner().withProperties(new ModelVersionProperties().withDescription("ufcohdxbz") - .withTags(mapOf("qxeysko", "muapcvhdbevw", "z", "qzinkfkbg", "vkzqk", "owxeqocljmy")) - .withProperties(mapOf("zrxcczurt", "okbzef", "pqxbkwvzgnzvdf", "e")) - .withIsArchived(false) - .withIsAnonymous(false) - .withFlavors(mapOf("zcyjtot", new FlavorData().withData(mapOf("ftpmdtzfjltfv", "lgorb")))) - .withModelType("opv") - .withModelUri("dbzqgqqihed") - .withJobName("qwthmky") - .withStage("sihsgqcwdhohsd")); - model = BinaryData.fromObject(model).toObject(ModelVersionInner.class); - Assertions.assertEquals("ufcohdxbz", model.properties().description()); - Assertions.assertEquals("muapcvhdbevw", model.properties().tags().get("qxeysko")); - Assertions.assertEquals("okbzef", model.properties().properties().get("zrxcczurt")); - Assertions.assertEquals(false, model.properties().isArchived()); - Assertions.assertEquals(false, model.properties().isAnonymous()); - Assertions.assertEquals("lgorb", model.properties().flavors().get("zcyjtot").data().get("ftpmdtzfjltfv")); - Assertions.assertEquals("opv", model.properties().modelType()); - Assertions.assertEquals("dbzqgqqihed", model.properties().modelUri()); - Assertions.assertEquals("qwthmky", model.properties().jobName()); - Assertions.assertEquals("sihsgqcwdhohsd", model.properties().stage()); - } - - // 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/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 1fd0f7511319b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionPropertiesTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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\":{\"neqvcwwyyurmo\":{\"data\":{\"utmzlbiojlvfhrbb\":\"la\"}}},\"modelType\":\"ppr\",\"modelUri\":\"snmokayzej\",\"jobName\":\"lbkpb\",\"provisioningState\":\"Failed\",\"stage\":\"iljhahz\",\"isArchived\":true,\"isAnonymous\":false,\"description\":\"bnwieholew\",\"tags\":{\"fqsfa\":\"uubw\",\"wexjkmfxapjwogq\":\"aqtferr\",\"awbzasqb\":\"nobpudcdabtqwpw\"},\"properties\":{\"yexaoguy\":\"jg\",\"ids\":\"i\"}}") - .toObject(ModelVersionProperties.class); - Assertions.assertEquals("bnwieholew", model.description()); - Assertions.assertEquals("uubw", model.tags().get("fqsfa")); - Assertions.assertEquals("jg", model.properties().get("yexaoguy")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals("la", model.flavors().get("neqvcwwyyurmo").data().get("utmzlbiojlvfhrbb")); - Assertions.assertEquals("ppr", model.modelType()); - Assertions.assertEquals("snmokayzej", model.modelUri()); - Assertions.assertEquals("lbkpb", model.jobName()); - Assertions.assertEquals("iljhahz", model.stage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ModelVersionProperties model = new ModelVersionProperties().withDescription("bnwieholew") - .withTags(mapOf("fqsfa", "uubw", "wexjkmfxapjwogq", "aqtferr", "awbzasqb", "nobpudcdabtqwpw")) - .withProperties(mapOf("yexaoguy", "jg", "ids", "i")) - .withIsArchived(true) - .withIsAnonymous(false) - .withFlavors(mapOf("neqvcwwyyurmo", new FlavorData().withData(mapOf("utmzlbiojlvfhrbb", "la")))) - .withModelType("ppr") - .withModelUri("snmokayzej") - .withJobName("lbkpb") - .withStage("iljhahz"); - model = BinaryData.fromObject(model).toObject(ModelVersionProperties.class); - Assertions.assertEquals("bnwieholew", model.description()); - Assertions.assertEquals("uubw", model.tags().get("fqsfa")); - Assertions.assertEquals("jg", model.properties().get("yexaoguy")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals("la", model.flavors().get("neqvcwwyyurmo").data().get("utmzlbiojlvfhrbb")); - Assertions.assertEquals("ppr", model.modelType()); - Assertions.assertEquals("snmokayzej", model.modelUri()); - Assertions.assertEquals("lbkpb", model.jobName()); - Assertions.assertEquals("iljhahz", model.stage()); - } - - // 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/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 a1c46416a0f18..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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 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( - "{\"value\":[{\"properties\":{\"flavors\":{\"jjrcgegydc\":{\"data\":{\"ibn\":\"xqnrkcxk\",\"swqrntvlwijp\":\"mysu\",\"uncuw\":\"ttexoqqpwcyyufmh\",\"unqndyfpchrqb\":\"qspkcdqzhlctd\"}}},\"modelType\":\"oxjumvqqo\",\"modelUri\":\"hrraiouaubrj\",\"jobName\":\"oq\",\"provisioningState\":\"Deleting\",\"stage\":\"jrngif\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"ccbiuimzdlyjdfq\",\"tags\":{\"lzo\":\"yoqufdvruz\",\"fnmdxotn\":\"hpc\"},\"properties\":{\"i\":\"gugey\"}},\"id\":\"rkyui\",\"name\":\"absnmfpp\",\"type\":\"ojeevy\"},{\"properties\":{\"flavors\":{\"eglqgleohibetn\":{\"data\":{\"mfg\":\"zfczbg\"}}},\"modelType\":\"ankrrfxee\",\"modelUri\":\"tijv\",\"jobName\":\"vbmqzbqq\",\"provisioningState\":\"Creating\",\"stage\":\"rnwxacevehjkuyxo\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"lt\",\"tags\":{\"nm\":\"yl\"},\"properties\":{\"oqeyhlqhykprl\":\"xirpghriy\",\"mexiitdfuxt\":\"yznuciqd\",\"nlj\":\"asiibmiybnnust\"}},\"id\":\"mgixhcmavmqfou\",\"name\":\"or\",\"type\":\"cgyypro\"}],\"nextLink\":\"ypundmbxhugc\"}") - .toObject(ModelVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("ccbiuimzdlyjdfq", model.value().get(0).properties().description()); - Assertions.assertEquals("yoqufdvruz", model.value().get(0).properties().tags().get("lzo")); - Assertions.assertEquals("gugey", model.value().get(0).properties().properties().get("i")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(false, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals("xqnrkcxk", - model.value().get(0).properties().flavors().get("jjrcgegydc").data().get("ibn")); - Assertions.assertEquals("oxjumvqqo", model.value().get(0).properties().modelType()); - Assertions.assertEquals("hrraiouaubrj", model.value().get(0).properties().modelUri()); - Assertions.assertEquals("oq", model.value().get(0).properties().jobName()); - Assertions.assertEquals("jrngif", model.value().get(0).properties().stage()); - Assertions.assertEquals("ypundmbxhugc", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ModelVersionResourceArmPaginatedResult model - = new ModelVersionResourceArmPaginatedResult().withValue(Arrays.asList( - new ModelVersionInner().withProperties(new ModelVersionProperties().withDescription("ccbiuimzdlyjdfq") - .withTags(mapOf("lzo", "yoqufdvruz", "fnmdxotn", "hpc")) - .withProperties(mapOf("i", "gugey")) - .withIsArchived(false) - .withIsAnonymous(false) - .withFlavors(mapOf("jjrcgegydc", - new FlavorData().withData(mapOf("ibn", "xqnrkcxk", "swqrntvlwijp", "mysu", "uncuw", - "ttexoqqpwcyyufmh", "unqndyfpchrqb", "qspkcdqzhlctd")))) - .withModelType("oxjumvqqo") - .withModelUri("hrraiouaubrj") - .withJobName("oq") - .withStage("jrngif")), - new ModelVersionInner().withProperties(new ModelVersionProperties().withDescription("lt") - .withTags(mapOf("nm", "yl")) - .withProperties( - mapOf("oqeyhlqhykprl", "xirpghriy", "mexiitdfuxt", "yznuciqd", "nlj", "asiibmiybnnust")) - .withIsArchived(false) - .withIsAnonymous(false) - .withFlavors(mapOf("eglqgleohibetn", new FlavorData().withData(mapOf("mfg", "zfczbg")))) - .withModelType("ankrrfxee") - .withModelUri("tijv") - .withJobName("vbmqzbqq") - .withStage("rnwxacevehjkuyxo")))) - .withNextLink("ypundmbxhugc"); - model = BinaryData.fromObject(model).toObject(ModelVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("ccbiuimzdlyjdfq", model.value().get(0).properties().description()); - Assertions.assertEquals("yoqufdvruz", model.value().get(0).properties().tags().get("lzo")); - Assertions.assertEquals("gugey", model.value().get(0).properties().properties().get("i")); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(false, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals("xqnrkcxk", - model.value().get(0).properties().flavors().get("jjrcgegydc").data().get("ibn")); - Assertions.assertEquals("oxjumvqqo", model.value().get(0).properties().modelType()); - Assertions.assertEquals("hrraiouaubrj", model.value().get(0).properties().modelUri()); - Assertions.assertEquals("oq", model.value().get(0).properties().jobName()); - Assertions.assertEquals("jrngif", model.value().get(0).properties().stage()); - Assertions.assertEquals("ypundmbxhugc", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 590c09cc34932..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsCreateOrUpdateWithResponseMockTests.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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.FlavorData; -import com.azure.resourcemanager.machinelearning.models.ModelVersion; -import com.azure.resourcemanager.machinelearning.models.ModelVersionProperties; -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 reactor.core.publisher.Mono; - -public final class ModelVersionsCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"flavors\":{\"eouxpdnl\":{\"data\":{\"eipfotaaqyxk\":\"qztrpj\",\"q\":\"oabcoxqaavjkre\",\"ivianklqclftp\":\"sviysbvo\"}},\"xfspxghwf\":{\"data\":{\"ohnroa\":\"bc\",\"ur\":\"zekg\"}}},\"modelType\":\"uofegrzfsf\",\"modelUri\":\"ookwnz\",\"jobName\":\"jb\",\"provisioningState\":\"Deleting\",\"stage\":\"dlo\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"kkqvmmmw\",\"tags\":{\"mnsmnjitxug\":\"cauegym\",\"ioecmbyoxpv\":\"lbibwodayipgsh\"},\"properties\":{\"okzdshhhdixn\":\"chfuxuqpdde\",\"ywspajakjhv\":\"apzibmstvzzkzv\",\"srvsbkn\":\"ktbnmhxtmzzpau\"}},\"id\":\"uytsaj\",\"name\":\"gvusnwich\",\"type\":\"kwctlsohrtgpv\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("wzoup") - .withExistingModel("lllkfjgjl", "fssgieb", "vuscmcegy") - .withProperties(new ModelVersionProperties().withDescription("v") - .withTags(mapOf("cvnhpebuiywkysgq", "jzofyldxkzhvfo", "dnmguifqj", "cbeauvld", "arfumitjaiis", - "oxzxbljpzauug")) - .withProperties(mapOf("y", "fdyb", "rwrylcttvxk", "bgmjrvrsqrjco", "jbl", "gffpvvqwvvnxoqaa", - "tsztxoswvfrym", "qwwtevfeugc")) - .withIsArchived(false) - .withIsAnonymous(false) - .withFlavors(mapOf("sgn", - new FlavorData() - .withData(mapOf("o", "ffvxnis", "zzcdrgtu", "wfdtjpsjwlpcxl", "rolge", "oouocafaxvhjrpb")), - "bnduqgjibrxxiao", - new FlavorData().withData(mapOf("uwd", "tx", "cbwmvp", "rqahlbyjahbzbtlm", "rlazcgwn", "mjyzice")), - "okoxqboz", new FlavorData().withData(mapOf("pugnvhtgwadu", "uhumgw")))) - .withModelType("xzwinrguk") - .withModelUri("bov") - .withJobName("ltqlqufkrnrbnjkc") - .withStage("qlyputawdmd")) - .create(); - - Assertions.assertEquals("kkqvmmmw", response.properties().description()); - Assertions.assertEquals("cauegym", response.properties().tags().get("mnsmnjitxug")); - Assertions.assertEquals("chfuxuqpdde", response.properties().properties().get("okzdshhhdixn")); - Assertions.assertEquals(true, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals("qztrpj", response.properties().flavors().get("eouxpdnl").data().get("eipfotaaqyxk")); - Assertions.assertEquals("uofegrzfsf", response.properties().modelType()); - Assertions.assertEquals("ookwnz", response.properties().modelUri()); - Assertions.assertEquals("jb", response.properties().jobName()); - Assertions.assertEquals("dlo", response.properties().stage()); - } - - // 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/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 33cd76ac74304..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsDeleteWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ModelVersionsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("bargbmemopypc", "omowucjznnowp", "xuuv", "wsrmegph", 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 e23b28e761e25..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ModelVersion; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ModelVersionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"flavors\":{\"wcaicd\":{\"data\":{\"aptexzylqhew\":\"suyqvmxnavxzp\",\"wggmitdwolfmfaz\":\"cchexczrmyn\"}},\"nyhivhyujqxyfb\":{\"data\":{\"wohddli\":\"tzf\",\"evuuk\":\"kkosqpliegemtnb\",\"tlrbzqtu\":\"diksncrz\",\"ftohdlpcixpx\":\"gajfa\"}},\"mcivhwwhyej\":{\"data\":{\"ohgcnr\":\"ylayabrdnovuduww\"}},\"dispasxwiicfsbj\":{\"data\":{\"fsqbcfqaqoveqowq\":\"dfcfyzwkmr\"}}},\"modelType\":\"adndowkxq\",\"modelUri\":\"sax\",\"jobName\":\"ieehpvqfifrr\",\"provisioningState\":\"Deleting\",\"stage\":\"gjgyovcpgqiism\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"oykrbk\",\"tags\":{\"mtrhwwdfncquty\":\"cmjkron\",\"mepbmogtfpksk\":\"zhzlvkmirnvdbza\",\"rlyynkgnychu\":\"syoh\",\"oeodgnu\":\"hngwtbhjgli\"},\"properties\":{\"mfixtyavv\":\"fgtw\",\"o\":\"xjqdj\"}},\"id\":\"gegwxjgkrppmvno\",\"name\":\"t\",\"type\":\"qciqawhkdk\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("j", "fkjd", "lqtqjabwtk", "jytvq", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("oykrbk", response.properties().description()); - Assertions.assertEquals("cmjkron", response.properties().tags().get("mtrhwwdfncquty")); - Assertions.assertEquals("fgtw", response.properties().properties().get("mfixtyavv")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(false, response.properties().isAnonymous()); - Assertions.assertEquals("suyqvmxnavxzp", - response.properties().flavors().get("wcaicd").data().get("aptexzylqhew")); - Assertions.assertEquals("adndowkxq", response.properties().modelType()); - Assertions.assertEquals("sax", response.properties().modelUri()); - Assertions.assertEquals("ieehpvqfifrr", response.properties().jobName()); - Assertions.assertEquals("gjgyovcpgqiism", response.properties().stage()); - } -} 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 4644b12b8dd78..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.ModelVersion; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ModelVersionsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"flavors\":{\"wqyousqmern\":{\"data\":{\"rhyx\":\"xzqzjv\"}}},\"modelType\":\"plgmem\",\"modelUri\":\"ouwmjxhmkchjdxr\",\"jobName\":\"hukxuq\",\"provisioningState\":\"Succeeded\",\"stage\":\"eqpgadesnesgnxd\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"vsictoqcezmzn\",\"tags\":{\"qbz\":\"qdu\",\"x\":\"yzajdpbnbp\",\"xi\":\"opryutxasnigh\"},\"properties\":{\"ggzqheitty\":\"i\",\"gw\":\"ipfudzntbzg\"}},\"id\":\"wypbqnxpohcrk\",\"name\":\"bajyuegsbuqdp\",\"type\":\"hqeczzutxtidsxre\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("rzdjgmgfayvbs", "aenvpzd", "zpizgaujv", "uwfy", "xorrceom", 1638949557, "arb", "rkdnoef", 2111895596, - "pjiudnustbmox", "hg", "dnhbhu", ListViewType.ACTIVE_ONLY, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("vsictoqcezmzn", response.iterator().next().properties().description()); - Assertions.assertEquals("qdu", response.iterator().next().properties().tags().get("qbz")); - Assertions.assertEquals("i", response.iterator().next().properties().properties().get("ggzqheitty")); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); - Assertions.assertEquals(true, response.iterator().next().properties().isAnonymous()); - Assertions.assertEquals("xzqzjv", - response.iterator().next().properties().flavors().get("wqyousqmern").data().get("rhyx")); - Assertions.assertEquals("plgmem", response.iterator().next().properties().modelType()); - Assertions.assertEquals("ouwmjxhmkchjdxr", response.iterator().next().properties().modelUri()); - Assertions.assertEquals("hukxuq", response.iterator().next().properties().jobName()); - Assertions.assertEquals("eqpgadesnesgnxd", response.iterator().next().properties().stage()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsPublishMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsPublishMockTests.java deleted file mode 100644 index 6fed962ed95e2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsPublishMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DestinationAsset; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ModelVersionsPublishMockTests { - @Test - public void testPublish() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.modelVersions() - .publish("aqspbdscotidik", "mtmjkfmrjngrjsq", "irha", "hhpcvsdy", - new DestinationAsset().withRegistryName("bydrgxvnmt") - .withDestinationName("uxrdmudwruog") - .withDestinationVersion("hfqcyyc"), - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorComputeConfigurationBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorComputeConfigurationBaseTests.java deleted file mode 100644 index a9458a4639495..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorComputeConfigurationBaseTests.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.MonitorComputeConfigurationBase; - -public final class MonitorComputeConfigurationBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitorComputeConfigurationBase model - = BinaryData.fromString("{\"computeType\":\"MonitorComputeConfigurationBase\"}") - .toObject(MonitorComputeConfigurationBase.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitorComputeConfigurationBase model = new MonitorComputeConfigurationBase(); - model = BinaryData.fromObject(model).toObject(MonitorComputeConfigurationBase.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorComputeIdentityBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorComputeIdentityBaseTests.java deleted file mode 100644 index 79226c313ce7a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorComputeIdentityBaseTests.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.MonitorComputeIdentityBase; - -public final class MonitorComputeIdentityBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitorComputeIdentityBase model - = BinaryData.fromString("{\"computeIdentityType\":\"MonitorComputeIdentityBase\"}") - .toObject(MonitorComputeIdentityBase.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitorComputeIdentityBase model = new MonitorComputeIdentityBase(); - model = BinaryData.fromObject(model).toObject(MonitorComputeIdentityBase.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorDefinitionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorDefinitionTests.java deleted file mode 100644 index aca1e756d0250..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorDefinitionTests.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.ModelTaskType; -import com.azure.resourcemanager.machinelearning.models.MonitorComputeConfigurationBase; -import com.azure.resourcemanager.machinelearning.models.MonitorDefinition; -import com.azure.resourcemanager.machinelearning.models.MonitorEmailNotificationSettings; -import com.azure.resourcemanager.machinelearning.models.MonitoringNotificationType; -import com.azure.resourcemanager.machinelearning.models.MonitoringSignalBase; -import com.azure.resourcemanager.machinelearning.models.MonitoringTarget; -import com.azure.resourcemanager.machinelearning.models.MonitorNotificationSettings; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class MonitorDefinitionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitorDefinition model = BinaryData.fromString( - "{\"monitoringTarget\":{\"modelId\":\"cgdhyhgoq\",\"deploymentId\":\"oyqyxyjrcbqpb\",\"taskType\":\"Classification\"},\"signals\":{\"oeehpmjenvjeatea\":{\"signalType\":\"MonitoringSignalBase\",\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"fwjlof\":\"tdahneaoovtyjzti\",\"uklajvcfoc\":\"ekfsrm\",\"kwxnhwhhnoyrza\":\"hapejov\"}},\"kft\":{\"signalType\":\"MonitoringSignalBase\",\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"olrndwdb\":\"djxldnaryyinzk\",\"xlu\":\"xvzaledoy\"}}},\"computeConfiguration\":{\"computeType\":\"MonitorComputeConfigurationBase\"},\"alertNotificationSettings\":{\"emailNotificationSettings\":{\"emails\":[\"qxmyzkl\",\"oanpohrvm\",\"rqra\",\"a\"]}}}") - .toObject(MonitorDefinition.class); - Assertions.assertEquals("cgdhyhgoq", model.monitoringTarget().modelId()); - Assertions.assertEquals("oyqyxyjrcbqpb", model.monitoringTarget().deploymentId()); - Assertions.assertEquals(ModelTaskType.CLASSIFICATION, model.monitoringTarget().taskType()); - Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, - model.signals().get("oeehpmjenvjeatea").notificationTypes().get(0)); - Assertions.assertEquals("tdahneaoovtyjzti", model.signals().get("oeehpmjenvjeatea").properties().get("fwjlof")); - Assertions.assertEquals("qxmyzkl", - model.alertNotificationSettings().emailNotificationSettings().emails().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitorDefinition model = new MonitorDefinition() - .withMonitoringTarget(new MonitoringTarget().withModelId("cgdhyhgoq") - .withDeploymentId("oyqyxyjrcbqpb") - .withTaskType(ModelTaskType.CLASSIFICATION)) - .withSignals(mapOf("oeehpmjenvjeatea", - new MonitoringSignalBase() - .withNotificationTypes(Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION, - MonitoringNotificationType.AML_NOTIFICATION)) - .withProperties( - mapOf("fwjlof", "tdahneaoovtyjzti", "uklajvcfoc", "ekfsrm", "kwxnhwhhnoyrza", "hapejov")), - "kft", - new MonitoringSignalBase() - .withNotificationTypes(Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION, - MonitoringNotificationType.AML_NOTIFICATION)) - .withProperties(mapOf("olrndwdb", "djxldnaryyinzk", "xlu", "xvzaledoy")))) - .withComputeConfiguration(new MonitorComputeConfigurationBase()) - .withAlertNotificationSettings(new MonitorNotificationSettings().withEmailNotificationSettings( - new MonitorEmailNotificationSettings().withEmails(Arrays.asList("qxmyzkl", "oanpohrvm", "rqra", "a")))); - model = BinaryData.fromObject(model).toObject(MonitorDefinition.class); - Assertions.assertEquals("cgdhyhgoq", model.monitoringTarget().modelId()); - Assertions.assertEquals("oyqyxyjrcbqpb", model.monitoringTarget().deploymentId()); - Assertions.assertEquals(ModelTaskType.CLASSIFICATION, model.monitoringTarget().taskType()); - Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, - model.signals().get("oeehpmjenvjeatea").notificationTypes().get(0)); - Assertions.assertEquals("tdahneaoovtyjzti", model.signals().get("oeehpmjenvjeatea").properties().get("fwjlof")); - Assertions.assertEquals("qxmyzkl", - model.alertNotificationSettings().emailNotificationSettings().emails().get(0)); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorEmailNotificationSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorEmailNotificationSettingsTests.java deleted file mode 100644 index 2247c04059203..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorEmailNotificationSettingsTests.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.MonitorEmailNotificationSettings; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MonitorEmailNotificationSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitorEmailNotificationSettings model - = BinaryData.fromString("{\"emails\":[\"eu\"]}").toObject(MonitorEmailNotificationSettings.class); - Assertions.assertEquals("eu", model.emails().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitorEmailNotificationSettings model = new MonitorEmailNotificationSettings().withEmails(Arrays.asList("eu")); - model = BinaryData.fromObject(model).toObject(MonitorEmailNotificationSettings.class); - Assertions.assertEquals("eu", model.emails().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorNotificationSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorNotificationSettingsTests.java deleted file mode 100644 index d93d473a7f0fe..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorNotificationSettingsTests.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.MonitorEmailNotificationSettings; -import com.azure.resourcemanager.machinelearning.models.MonitorNotificationSettings; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MonitorNotificationSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitorNotificationSettings model = BinaryData - .fromString("{\"emailNotificationSettings\":{\"emails\":[\"mrjctryldsxeb\",\"hsxrznmgsdaluyc\",\"hefr\"]}}") - .toObject(MonitorNotificationSettings.class); - Assertions.assertEquals("mrjctryldsxeb", model.emailNotificationSettings().emails().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitorNotificationSettings model - = new MonitorNotificationSettings().withEmailNotificationSettings(new MonitorEmailNotificationSettings() - .withEmails(Arrays.asList("mrjctryldsxeb", "hsxrznmgsdaluyc", "hefr"))); - model = BinaryData.fromObject(model).toObject(MonitorNotificationSettings.class); - Assertions.assertEquals("mrjctryldsxeb", model.emailNotificationSettings().emails().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorServerlessSparkComputeTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorServerlessSparkComputeTests.java deleted file mode 100644 index f8e05273be15a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitorServerlessSparkComputeTests.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.MonitorComputeIdentityBase; -import com.azure.resourcemanager.machinelearning.models.MonitorServerlessSparkCompute; -import org.junit.jupiter.api.Assertions; - -public final class MonitorServerlessSparkComputeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitorServerlessSparkCompute model = BinaryData.fromString( - "{\"computeType\":\"ServerlessSpark\",\"computeIdentity\":{\"computeIdentityType\":\"MonitorComputeIdentityBase\"},\"instanceType\":\"ffcnuestbsliejdn\",\"runtimeVersion\":\"cotelikjiyteh\"}") - .toObject(MonitorServerlessSparkCompute.class); - Assertions.assertEquals("ffcnuestbsliejdn", model.instanceType()); - Assertions.assertEquals("cotelikjiyteh", model.runtimeVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitorServerlessSparkCompute model - = new MonitorServerlessSparkCompute().withComputeIdentity(new MonitorComputeIdentityBase()) - .withInstanceType("ffcnuestbsliejdn") - .withRuntimeVersion("cotelikjiyteh"); - model = BinaryData.fromObject(model).toObject(MonitorServerlessSparkCompute.class); - Assertions.assertEquals("ffcnuestbsliejdn", model.instanceType()); - Assertions.assertEquals("cotelikjiyteh", model.runtimeVersion()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringFeatureFilterBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringFeatureFilterBaseTests.java deleted file mode 100644 index 5438736a88af6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringFeatureFilterBaseTests.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.MonitoringFeatureFilterBase; - -public final class MonitoringFeatureFilterBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitoringFeatureFilterBase model = BinaryData.fromString("{\"filterType\":\"MonitoringFeatureFilterBase\"}") - .toObject(MonitoringFeatureFilterBase.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitoringFeatureFilterBase model = new MonitoringFeatureFilterBase(); - model = BinaryData.fromObject(model).toObject(MonitoringFeatureFilterBase.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringInputDataBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringInputDataBaseTests.java deleted file mode 100644 index 5eb0a6a10828b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringInputDataBaseTests.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.JobInputType; -import com.azure.resourcemanager.machinelearning.models.MonitoringInputDataBase; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class MonitoringInputDataBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitoringInputDataBase model = BinaryData.fromString( - "{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"twujjzgx\",\"jobInputType\":\"mlflow_model\",\"uri\":\"qwlxrhg\",\"columns\":{\"bkkteo\":\"vtqqy\",\"vmvm\":\"ejogmkor\",\"osnqliwkmzojfe\":\"ofnqhlbs\"}}") - .toObject(MonitoringInputDataBase.class); - Assertions.assertEquals("twujjzgx", model.dataContext()); - Assertions.assertEquals(JobInputType.MLFLOW_MODEL, model.jobInputType()); - Assertions.assertEquals("qwlxrhg", model.uri()); - Assertions.assertEquals("vtqqy", model.columns().get("bkkteo")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitoringInputDataBase model = new MonitoringInputDataBase().withDataContext("twujjzgx") - .withJobInputType(JobInputType.MLFLOW_MODEL) - .withUri("qwlxrhg") - .withColumns(mapOf("bkkteo", "vtqqy", "vmvm", "ejogmkor", "osnqliwkmzojfe", "ofnqhlbs")); - model = BinaryData.fromObject(model).toObject(MonitoringInputDataBase.class); - Assertions.assertEquals("twujjzgx", model.dataContext()); - Assertions.assertEquals(JobInputType.MLFLOW_MODEL, model.jobInputType()); - Assertions.assertEquals("qwlxrhg", model.uri()); - Assertions.assertEquals("vtqqy", model.columns().get("bkkteo")); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringSignalBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringSignalBaseTests.java deleted file mode 100644 index 5307137c38c41..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringSignalBaseTests.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.MonitoringNotificationType; -import com.azure.resourcemanager.machinelearning.models.MonitoringSignalBase; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class MonitoringSignalBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitoringSignalBase model = BinaryData.fromString( - "{\"signalType\":\"MonitoringSignalBase\",\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\",\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"nwldfmhljq\":\"igbsfsgsa\"}}") - .toObject(MonitoringSignalBase.class); - Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, model.notificationTypes().get(0)); - Assertions.assertEquals("igbsfsgsa", model.properties().get("nwldfmhljq")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitoringSignalBase model = new MonitoringSignalBase() - .withNotificationTypes( - Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION, - MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION)) - .withProperties(mapOf("nwldfmhljq", "igbsfsgsa")); - model = BinaryData.fromObject(model).toObject(MonitoringSignalBase.class); - Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, model.notificationTypes().get(0)); - Assertions.assertEquals("igbsfsgsa", model.properties().get("nwldfmhljq")); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringTargetTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringTargetTests.java deleted file mode 100644 index c5e8a7dc8cdcf..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringTargetTests.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.ModelTaskType; -import com.azure.resourcemanager.machinelearning.models.MonitoringTarget; -import org.junit.jupiter.api.Assertions; - -public final class MonitoringTargetTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitoringTarget model = BinaryData - .fromString("{\"modelId\":\"vznllaslkskhjqj\",\"deploymentId\":\"baihxjtgzg\",\"taskType\":\"Regression\"}") - .toObject(MonitoringTarget.class); - Assertions.assertEquals("vznllaslkskhjqj", model.modelId()); - Assertions.assertEquals("baihxjtgzg", model.deploymentId()); - Assertions.assertEquals(ModelTaskType.REGRESSION, model.taskType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitoringTarget model = new MonitoringTarget().withModelId("vznllaslkskhjqj") - .withDeploymentId("baihxjtgzg") - .withTaskType(ModelTaskType.REGRESSION); - model = BinaryData.fromObject(model).toObject(MonitoringTarget.class); - Assertions.assertEquals("vznllaslkskhjqj", model.modelId()); - Assertions.assertEquals("baihxjtgzg", model.deploymentId()); - Assertions.assertEquals(ModelTaskType.REGRESSION, model.taskType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringThresholdTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringThresholdTests.java deleted file mode 100644 index 5467444a73c88..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MonitoringThresholdTests.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.MonitoringThreshold; -import org.junit.jupiter.api.Assertions; - -public final class MonitoringThresholdTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MonitoringThreshold model - = BinaryData.fromString("{\"value\":18.738037219976512}").toObject(MonitoringThreshold.class); - Assertions.assertEquals(18.738037219976512D, model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MonitoringThreshold model = new MonitoringThreshold().withValue(18.738037219976512D); - model = BinaryData.fromObject(model).toObject(MonitoringThreshold.class); - Assertions.assertEquals(18.738037219976512D, model.value()); - } -} 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 0965e8f042fee..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MpiTests.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.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\":2025598947}") - .toObject(Mpi.class); - Assertions.assertEquals(2025598947, model.processCountPerInstance()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Mpi model = new Mpi().withProcessCountPerInstance(2025598947); - model = BinaryData.fromObject(model).toObject(Mpi.class); - Assertions.assertEquals(2025598947, 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 f75ca36d9c3fa..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 bd1df1afe3996..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\":\"svxupqt\"}") - .toObject(NlpVerticalFeaturizationSettings.class); - Assertions.assertEquals("svxupqt", model.datasetLanguage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NlpVerticalFeaturizationSettings model = new NlpVerticalFeaturizationSettings().withDatasetLanguage("svxupqt"); - model = BinaryData.fromObject(model).toObject(NlpVerticalFeaturizationSettings.class); - Assertions.assertEquals("svxupqt", 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 61989458289b5..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalLimitSettingsTests.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.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("{\"timeout\":\"PT132H5S\",\"maxTrials\":1475844965,\"maxConcurrentTrials\":2049501339}") - .toObject(NlpVerticalLimitSettings.class); - Assertions.assertEquals(Duration.parse("PT132H5S"), model.timeout()); - Assertions.assertEquals(1475844965, model.maxTrials()); - Assertions.assertEquals(2049501339, model.maxConcurrentTrials()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NlpVerticalLimitSettings model = new NlpVerticalLimitSettings().withTimeout(Duration.parse("PT132H5S")) - .withMaxTrials(1475844965) - .withMaxConcurrentTrials(2049501339); - model = BinaryData.fromObject(model).toObject(NlpVerticalLimitSettings.class); - Assertions.assertEquals(Duration.parse("PT132H5S"), model.timeout()); - Assertions.assertEquals(1475844965, model.maxTrials()); - Assertions.assertEquals(2049501339, model.maxConcurrentTrials()); - } -} 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 221fc2b0df56e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalTests.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.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( - "{\"limitSettings\":{\"timeout\":\"PT133H10M21S\",\"maxTrials\":730548786,\"maxConcurrentTrials\":450987294},\"featurizationSettings\":{\"datasetLanguage\":\"qlngncrdorctysec\"},\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"khxd\",\"mode\":\"ReadOnlyMount\",\"description\":\"tzcvimmwckoz\"}}") - .toObject(NlpVertical.class); - Assertions.assertEquals(Duration.parse("PT133H10M21S"), model.limitSettings().timeout()); - Assertions.assertEquals(730548786, model.limitSettings().maxTrials()); - Assertions.assertEquals(450987294, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals("qlngncrdorctysec", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals("tzcvimmwckoz", model.validationData().description()); - Assertions.assertEquals("khxd", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NlpVertical model = new NlpVertical() - .withLimitSettings(new NlpVerticalLimitSettings().withTimeout(Duration.parse("PT133H10M21S")) - .withMaxTrials(730548786) - .withMaxConcurrentTrials(450987294)) - .withFeaturizationSettings(new NlpVerticalFeaturizationSettings().withDatasetLanguage("qlngncrdorctysec")) - .withValidationData(new MLTableJobInput().withDescription("tzcvimmwckoz") - .withUri("khxd") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT)); - model = BinaryData.fromObject(model).toObject(NlpVertical.class); - Assertions.assertEquals(Duration.parse("PT133H10M21S"), model.limitSettings().timeout()); - Assertions.assertEquals(730548786, model.limitSettings().maxTrials()); - Assertions.assertEquals(450987294, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals("qlngncrdorctysec", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals("tzcvimmwckoz", model.validationData().description()); - Assertions.assertEquals("khxd", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - } -} 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 72f14005c0df6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NodeStateCountsTests.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.NodeStateCounts; - -public final class NodeStateCountsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NodeStateCounts model = BinaryData.fromString( - "{\"idleNodeCount\":17437062,\"runningNodeCount\":194546120,\"preparingNodeCount\":863569272,\"unusableNodeCount\":765041265,\"leavingNodeCount\":232651506,\"preemptedNodeCount\":1489395185}") - .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/NodesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NodesTests.java deleted file mode 100644 index 9fdf16c020f63..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NodesTests.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.Nodes; - -public final class NodesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Nodes model = BinaryData.fromString("{\"nodesValueType\":\"Nodes\"}").toObject(Nodes.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Nodes model = new Nodes(); - model = BinaryData.fromObject(model).toObject(Nodes.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 0e35ff9a396a3..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NoneAuthTypeWorkspaceConnectionPropertiesTests.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.ConnectionCategory; -import com.azure.resourcemanager.machinelearning.models.NoneAuthTypeWorkspaceConnectionProperties; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -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\":\"AzureSynapseAnalytics\",\"createdByWorkspaceArmId\":\"wf\",\"expiryTime\":\"2021-09-18T05:09:03Z\",\"group\":\"GenericProtocol\",\"isSharedToAll\":true,\"target\":\"lt\",\"metadata\":{\"vazjpwexcd\":\"gexojfccylhtrht\",\"o\":\"zp\",\"pjeuxsp\":\"zzxezmnrkj\",\"bhwbdqufvcgnrgla\":\"lokfpmijpdvzv\"},\"sharedUserList\":[\"yambhb\",\"febzxf\"],\"value\":\"qutibhl\",\"valueFormat\":\"JSON\"}") - .toObject(NoneAuthTypeWorkspaceConnectionProperties.class); - Assertions.assertEquals(ConnectionCategory.AZURE_SYNAPSE_ANALYTICS, model.category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-18T05:09:03Z"), model.expiryTime()); - Assertions.assertEquals(true, model.isSharedToAll()); - Assertions.assertEquals("lt", model.target()); - Assertions.assertEquals("gexojfccylhtrht", model.metadata().get("vazjpwexcd")); - Assertions.assertEquals("yambhb", model.sharedUserList().get(0)); - Assertions.assertEquals("qutibhl", model.value()); - Assertions.assertEquals(ValueFormat.JSON, model.valueFormat()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NoneAuthTypeWorkspaceConnectionProperties model - = new NoneAuthTypeWorkspaceConnectionProperties().withCategory(ConnectionCategory.AZURE_SYNAPSE_ANALYTICS) - .withExpiryTime(OffsetDateTime.parse("2021-09-18T05:09:03Z")) - .withIsSharedToAll(true) - .withTarget("lt") - .withMetadata(mapOf("vazjpwexcd", "gexojfccylhtrht", "o", "zp", "pjeuxsp", "zzxezmnrkj", - "bhwbdqufvcgnrgla", "lokfpmijpdvzv")) - .withSharedUserList(Arrays.asList("yambhb", "febzxf")) - .withValue("qutibhl") - .withValueFormat(ValueFormat.JSON); - model = BinaryData.fromObject(model).toObject(NoneAuthTypeWorkspaceConnectionProperties.class); - Assertions.assertEquals(ConnectionCategory.AZURE_SYNAPSE_ANALYTICS, model.category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-18T05:09:03Z"), model.expiryTime()); - Assertions.assertEquals(true, model.isSharedToAll()); - Assertions.assertEquals("lt", model.target()); - Assertions.assertEquals("gexojfccylhtrht", model.metadata().get("vazjpwexcd")); - Assertions.assertEquals("yambhb", model.sharedUserList().get(0)); - Assertions.assertEquals("qutibhl", model.value()); - Assertions.assertEquals(ValueFormat.JSON, model.valueFormat()); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/NotificationSettingTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NotificationSettingTests.java deleted file mode 100644 index 7a80dacd79f97..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NotificationSettingTests.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.EmailNotificationEnableType; -import com.azure.resourcemanager.machinelearning.models.NotificationSetting; -import com.azure.resourcemanager.machinelearning.models.Webhook; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class NotificationSettingTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NotificationSetting model = BinaryData.fromString( - "{\"emails\":[\"nmbscbbx\",\"gdhxi\",\"d\",\"opedbwdpyqyybxub\"],\"emailOn\":[\"JobCancelled\",\"JobCompleted\"],\"webhooks\":{\"qacigeleo\":{\"webhookType\":\"Webhook\",\"eventType\":\"wremjel\"},\"r\":{\"webhookType\":\"Webhook\",\"eventType\":\"bvqvwzkjopwbeo\"},\"qfyiaseqchkr\":{\"webhookType\":\"Webhook\",\"eventType\":\"wzdqybxceakxcpts\"}}}") - .toObject(NotificationSetting.class); - Assertions.assertEquals("nmbscbbx", model.emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, model.emailOn().get(0)); - Assertions.assertEquals("wremjel", model.webhooks().get("qacigeleo").eventType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NotificationSetting model - = new NotificationSetting().withEmails(Arrays.asList("nmbscbbx", "gdhxi", "d", "opedbwdpyqyybxub")) - .withEmailOn( - Arrays.asList(EmailNotificationEnableType.JOB_CANCELLED, EmailNotificationEnableType.JOB_COMPLETED)) - .withWebhooks(mapOf("qacigeleo", new Webhook().withEventType("wremjel"), "r", - new Webhook().withEventType("bvqvwzkjopwbeo"), "qfyiaseqchkr", - new Webhook().withEventType("wzdqybxceakxcpts"))); - model = BinaryData.fromObject(model).toObject(NotificationSetting.class); - Assertions.assertEquals("nmbscbbx", model.emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, model.emailOn().get(0)); - Assertions.assertEquals("wremjel", model.webhooks().get("qacigeleo").eventType()); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/NumericalDataDriftMetricThresholdTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NumericalDataDriftMetricThresholdTests.java deleted file mode 100644 index eef1a3ef4266b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NumericalDataDriftMetricThresholdTests.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.MonitoringThreshold; -import com.azure.resourcemanager.machinelearning.models.NumericalDataDriftMetric; -import com.azure.resourcemanager.machinelearning.models.NumericalDataDriftMetricThreshold; -import org.junit.jupiter.api.Assertions; - -public final class NumericalDataDriftMetricThresholdTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NumericalDataDriftMetricThreshold model = BinaryData.fromString( - "{\"dataType\":\"Numerical\",\"metric\":\"PopulationStabilityIndex\",\"threshold\":{\"value\":56.24244908661416}}") - .toObject(NumericalDataDriftMetricThreshold.class); - Assertions.assertEquals(56.24244908661416D, model.threshold().value()); - Assertions.assertEquals(NumericalDataDriftMetric.POPULATION_STABILITY_INDEX, model.metric()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NumericalDataDriftMetricThreshold model = new NumericalDataDriftMetricThreshold() - .withThreshold(new MonitoringThreshold().withValue(56.24244908661416D)) - .withMetric(NumericalDataDriftMetric.POPULATION_STABILITY_INDEX); - model = BinaryData.fromObject(model).toObject(NumericalDataDriftMetricThreshold.class); - Assertions.assertEquals(56.24244908661416D, model.threshold().value()); - Assertions.assertEquals(NumericalDataDriftMetric.POPULATION_STABILITY_INDEX, model.metric()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NumericalDataQualityMetricThresholdTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NumericalDataQualityMetricThresholdTests.java deleted file mode 100644 index 0ed8af30995d2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NumericalDataQualityMetricThresholdTests.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.MonitoringThreshold; -import com.azure.resourcemanager.machinelearning.models.NumericalDataQualityMetric; -import com.azure.resourcemanager.machinelearning.models.NumericalDataQualityMetricThreshold; -import org.junit.jupiter.api.Assertions; - -public final class NumericalDataQualityMetricThresholdTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NumericalDataQualityMetricThreshold model = BinaryData.fromString( - "{\"dataType\":\"Numerical\",\"metric\":\"OutOfBoundsRate\",\"threshold\":{\"value\":97.91248731841587}}") - .toObject(NumericalDataQualityMetricThreshold.class); - Assertions.assertEquals(97.91248731841587D, model.threshold().value()); - Assertions.assertEquals(NumericalDataQualityMetric.OUT_OF_BOUNDS_RATE, model.metric()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NumericalDataQualityMetricThreshold model = new NumericalDataQualityMetricThreshold() - .withThreshold(new MonitoringThreshold().withValue(97.91248731841587D)) - .withMetric(NumericalDataQualityMetric.OUT_OF_BOUNDS_RATE); - model = BinaryData.fromObject(model).toObject(NumericalDataQualityMetricThreshold.class); - Assertions.assertEquals(97.91248731841587D, model.threshold().value()); - Assertions.assertEquals(NumericalDataQualityMetric.OUT_OF_BOUNDS_RATE, model.metric()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NumericalPredictionDriftMetricThresholdTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NumericalPredictionDriftMetricThresholdTests.java deleted file mode 100644 index d83d88282e6f2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NumericalPredictionDriftMetricThresholdTests.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.MonitoringThreshold; -import com.azure.resourcemanager.machinelearning.models.NumericalPredictionDriftMetric; -import com.azure.resourcemanager.machinelearning.models.NumericalPredictionDriftMetricThreshold; -import org.junit.jupiter.api.Assertions; - -public final class NumericalPredictionDriftMetricThresholdTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NumericalPredictionDriftMetricThreshold model = BinaryData.fromString( - "{\"dataType\":\"Numerical\",\"metric\":\"TwoSampleKolmogorovSmirnovTest\",\"threshold\":{\"value\":63.51610151085381}}") - .toObject(NumericalPredictionDriftMetricThreshold.class); - Assertions.assertEquals(63.51610151085381D, model.threshold().value()); - Assertions.assertEquals(NumericalPredictionDriftMetric.TWO_SAMPLE_KOLMOGOROV_SMIRNOV_TEST, model.metric()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NumericalPredictionDriftMetricThreshold model = new NumericalPredictionDriftMetricThreshold() - .withThreshold(new MonitoringThreshold().withValue(63.51610151085381D)) - .withMetric(NumericalPredictionDriftMetric.TWO_SAMPLE_KOLMOGOROV_SMIRNOV_TEST); - model = BinaryData.fromObject(model).toObject(NumericalPredictionDriftMetricThreshold.class); - Assertions.assertEquals(63.51610151085381D, model.threshold().value()); - Assertions.assertEquals(NumericalPredictionDriftMetric.TWO_SAMPLE_KOLMOGOROV_SMIRNOV_TEST, model.metric()); - } -} 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 2f93343745f5d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ObjectiveTests.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.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("{\"primaryMetric\":\"hjxncqzahg\",\"goal\":\"Minimize\"}") - .toObject(Objective.class); - Assertions.assertEquals("hjxncqzahg", model.primaryMetric()); - Assertions.assertEquals(Goal.MINIMIZE, model.goal()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Objective model = new Objective().withPrimaryMetric("hjxncqzahg").withGoal(Goal.MINIMIZE); - model = BinaryData.fromObject(model).toObject(Objective.class); - Assertions.assertEquals("hjxncqzahg", model.primaryMetric()); - Assertions.assertEquals(Goal.MINIMIZE, model.goal()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OneLakeArtifactTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OneLakeArtifactTests.java deleted file mode 100644 index 9091e9d71dec0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OneLakeArtifactTests.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.OneLakeArtifact; -import org.junit.jupiter.api.Assertions; - -public final class OneLakeArtifactTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OneLakeArtifact model - = BinaryData.fromString("{\"artifactType\":\"OneLakeArtifact\",\"artifactName\":\"tpcjpt\"}") - .toObject(OneLakeArtifact.class); - Assertions.assertEquals("tpcjpt", model.artifactName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OneLakeArtifact model = new OneLakeArtifact().withArtifactName("tpcjpt"); - model = BinaryData.fromObject(model).toObject(OneLakeArtifact.class); - Assertions.assertEquals("tpcjpt", model.artifactName()); - } -} 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 51e69882431a3..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OnlineDeploymentsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("wlkovopqp", "cdpyoqmwpmrlgj", "qs", "fptvam", 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 c913e16b592ad..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetLogsWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.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.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OnlineDeploymentsGetLogsWithResponseMockTests { - @Test - public void testGetLogsWithResponse() throws Exception { - String responseStr = "{\"content\":\"ufipyg\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("fhfgoyxxszpai", "curfsofshfmgiix", "rveekhsmulvmy", "oefkpuuuxiuwhc", - new DeploymentLogsRequest().withContainerType(ContainerType.INFERENCE_SERVER).withTail(1397087365), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ufipyg", 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 5ccab60438877..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSkusMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.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.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OnlineDeploymentsListSkusMockTests { - @Test - public void testListSkus() throws Exception { - String responseStr - = "{\"value\":[{\"resourceType\":\"fmortrsnpbsungn\",\"sku\":{\"name\":\"km\",\"tier\":\"Basic\"},\"capacity\":{\"minimum\":279895478,\"maximum\":1991847525,\"default\":1529540251,\"scaleType\":\"Manual\"}}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("moycpotmaos", "ngtbhvhsqvubww", "giyujnrvwjx", "walhljtn", 1777716757, "bpiuvqh", - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("km", response.iterator().next().sku().name()); - Assertions.assertEquals(SkuTier.BASIC, response.iterator().next().sku().tier()); - Assertions.assertEquals(279895478, response.iterator().next().capacity().minimum()); - Assertions.assertEquals(1991847525, response.iterator().next().capacity().maximum()); - Assertions.assertEquals(1529540251, response.iterator().next().capacity().defaultProperty()); - Assertions.assertEquals(SkuScaleType.MANUAL, response.iterator().next().capacity().scaleType()); - } -} 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 583aa41192085..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OnlineEndpointsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("t", "o", "qudjdwcw", 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 ea0889d23a13b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineRequestSettingsTests.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.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( - "{\"maxQueueWait\":\"PT192H43M50S\",\"requestTimeout\":\"PT2H5M54S\",\"maxConcurrentRequestsPerInstance\":1291498461}") - .toObject(OnlineRequestSettings.class); - Assertions.assertEquals(Duration.parse("PT192H43M50S"), model.maxQueueWait()); - Assertions.assertEquals(Duration.parse("PT2H5M54S"), model.requestTimeout()); - Assertions.assertEquals(1291498461, model.maxConcurrentRequestsPerInstance()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OnlineRequestSettings model = new OnlineRequestSettings().withMaxQueueWait(Duration.parse("PT192H43M50S")) - .withRequestTimeout(Duration.parse("PT2H5M54S")) - .withMaxConcurrentRequestsPerInstance(1291498461); - model = BinaryData.fromObject(model).toObject(OnlineRequestSettings.class); - Assertions.assertEquals(Duration.parse("PT192H43M50S"), model.maxQueueWait()); - Assertions.assertEquals(Duration.parse("PT2H5M54S"), model.requestTimeout()); - Assertions.assertEquals(1291498461, model.maxConcurrentRequestsPerInstance()); - } -} 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 d9549c2a2710a..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/OperationDisplayTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationDisplayTests.java deleted file mode 100644 index c630ed3fe1559..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationDisplayTests.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.OperationDisplay; - -public final class OperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDisplay model = BinaryData.fromString( - "{\"provider\":\"yrtih\",\"resource\":\"tijbpzvgnwzsymgl\",\"operation\":\"fcyzkohdbihanufh\",\"description\":\"bj\"}") - .toObject(OperationDisplay.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = new OperationDisplay(); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationInnerTests.java deleted file mode 100644 index 6c716ad680092..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationInnerTests.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.fluent.models.OperationInner; -import com.azure.resourcemanager.machinelearning.models.OperationDisplay; - -public final class OperationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationInner model = BinaryData.fromString( - "{\"name\":\"usarhmofc\",\"isDataAction\":false,\"display\":{\"provider\":\"urkdtmlx\",\"resource\":\"kuksjtxukcdm\",\"operation\":\"rcryuanzwuxzdxta\",\"description\":\"lhmwhfpmrqobm\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}") - .toObject(OperationInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = new OperationInner().withDisplay(new OperationDisplay()); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationListResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationListResultTests.java deleted file mode 100644 index 3c37565d1f2b1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationListResultTests.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.OperationListResult; - -public final class OperationListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationListResult model = BinaryData.fromString( - "{\"value\":[{\"name\":\"quvgjxpybczme\",\"isDataAction\":true,\"display\":{\"provider\":\"pbsphrupidgs\",\"resource\":\"bejhphoycmsxa\",\"operation\":\"hdxbmtqio\",\"description\":\"zehtbmu\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"izhwlrxy\",\"isDataAction\":false,\"display\":{\"provider\":\"ijgkdm\",\"resource\":\"azlobcufpdznrbt\",\"operation\":\"qjnqglhqgnufoooj\",\"description\":\"ifsqesaagdfmg\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"rifkwm\",\"isDataAction\":true,\"display\":{\"provider\":\"izntocipao\",\"resource\":\"jpsq\",\"operation\":\"mpoyfd\",\"description\":\"ogknygjofjdd\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}],\"nextLink\":\"upewnwreitjzy\"}") - .toObject(OperationListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationListResult model = new OperationListResult(); - model = BinaryData.fromObject(model).toObject(OperationListResult.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 f382e7c263286..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationsListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.Operation; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"wipze\",\"isDataAction\":true,\"display\":{\"provider\":\"nytkmlfupjzc\",\"resource\":\"vzjoyxjgahxue\",\"operation\":\"daktnytkbcerf\",\"description\":\"cpvfqjckmp\"},\"origin\":\"user\",\"actionType\":\"Internal\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleBasicResourceInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleBasicResourceInnerTests.java deleted file mode 100644 index cf65fe213cb59..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleBasicResourceInnerTests.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.OutboundRuleBasicResourceInner; -import com.azure.resourcemanager.machinelearning.models.OutboundRule; -import com.azure.resourcemanager.machinelearning.models.RuleCategory; -import com.azure.resourcemanager.machinelearning.models.RuleStatus; -import org.junit.jupiter.api.Assertions; - -public final class OutboundRuleBasicResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OutboundRuleBasicResourceInner model = BinaryData.fromString( - "{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"Required\",\"status\":\"Inactive\"},\"id\":\"hp\",\"name\":\"xkgymareqnajxqu\",\"type\":\"jhkycub\"}") - .toObject(OutboundRuleBasicResourceInner.class); - Assertions.assertEquals(RuleCategory.REQUIRED, model.properties().category()); - Assertions.assertEquals(RuleStatus.INACTIVE, model.properties().status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OutboundRuleBasicResourceInner model = new OutboundRuleBasicResourceInner() - .withProperties(new OutboundRule().withCategory(RuleCategory.REQUIRED).withStatus(RuleStatus.INACTIVE)); - model = BinaryData.fromObject(model).toObject(OutboundRuleBasicResourceInner.class); - Assertions.assertEquals(RuleCategory.REQUIRED, model.properties().category()); - Assertions.assertEquals(RuleStatus.INACTIVE, model.properties().status()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleListResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleListResultTests.java deleted file mode 100644 index 1ceacdcdfdadf..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleListResultTests.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.OutboundRuleBasicResourceInner; -import com.azure.resourcemanager.machinelearning.models.OutboundRule; -import com.azure.resourcemanager.machinelearning.models.OutboundRuleListResult; -import com.azure.resourcemanager.machinelearning.models.RuleCategory; -import com.azure.resourcemanager.machinelearning.models.RuleStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OutboundRuleListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OutboundRuleListResult model = BinaryData.fromString( - "{\"nextLink\":\"tkl\",\"value\":[{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"UserDefined\",\"status\":\"Inactive\"},\"id\":\"aanozjosphyoulpj\",\"name\":\"v\",\"type\":\"ag\"},{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"Recommended\",\"status\":\"Inactive\"},\"id\":\"wosytxitcskf\",\"name\":\"k\",\"type\":\"qumiek\"},{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"UserDefined\",\"status\":\"Inactive\"},\"id\":\"hlyfjhdgqgg\",\"name\":\"bdunygaeqid\",\"type\":\"qfatpxllrxcyjm\"},{\"properties\":{\"type\":\"OutboundRule\",\"category\":\"Dependency\",\"status\":\"Active\"},\"id\":\"arm\",\"name\":\"wdmjsjqbjhhyx\",\"type\":\"rw\"}]}") - .toObject(OutboundRuleListResult.class); - Assertions.assertEquals("tkl", model.nextLink()); - Assertions.assertEquals(RuleCategory.USER_DEFINED, model.value().get(0).properties().category()); - Assertions.assertEquals(RuleStatus.INACTIVE, model.value().get(0).properties().status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OutboundRuleListResult model = new OutboundRuleListResult().withNextLink("tkl") - .withValue(Arrays.asList( - new OutboundRuleBasicResourceInner().withProperties( - new OutboundRule().withCategory(RuleCategory.USER_DEFINED).withStatus(RuleStatus.INACTIVE)), - new OutboundRuleBasicResourceInner().withProperties( - new OutboundRule().withCategory(RuleCategory.RECOMMENDED).withStatus(RuleStatus.INACTIVE)), - new OutboundRuleBasicResourceInner().withProperties( - new OutboundRule().withCategory(RuleCategory.USER_DEFINED).withStatus(RuleStatus.INACTIVE)), - new OutboundRuleBasicResourceInner().withProperties( - new OutboundRule().withCategory(RuleCategory.DEPENDENCY).withStatus(RuleStatus.ACTIVE)))); - model = BinaryData.fromObject(model).toObject(OutboundRuleListResult.class); - Assertions.assertEquals("tkl", model.nextLink()); - Assertions.assertEquals(RuleCategory.USER_DEFINED, model.value().get(0).properties().category()); - Assertions.assertEquals(RuleStatus.INACTIVE, model.value().get(0).properties().status()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleTests.java deleted file mode 100644 index 0e36352ccee98..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutboundRuleTests.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.OutboundRule; -import com.azure.resourcemanager.machinelearning.models.RuleCategory; -import com.azure.resourcemanager.machinelearning.models.RuleStatus; -import org.junit.jupiter.api.Assertions; - -public final class OutboundRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OutboundRule model - = BinaryData.fromString("{\"type\":\"OutboundRule\",\"category\":\"Dependency\",\"status\":\"Active\"}") - .toObject(OutboundRule.class); - Assertions.assertEquals(RuleCategory.DEPENDENCY, model.category()); - Assertions.assertEquals(RuleStatus.ACTIVE, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OutboundRule model = new OutboundRule().withCategory(RuleCategory.DEPENDENCY).withStatus(RuleStatus.ACTIVE); - model = BinaryData.fromObject(model).toObject(OutboundRule.class); - Assertions.assertEquals(RuleCategory.DEPENDENCY, model.category()); - Assertions.assertEquals(RuleStatus.ACTIVE, model.status()); - } -} 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 4c94528a9fc8b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutputPathAssetReferenceTests.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.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\",\"path\":\"mxq\",\"jobId\":\"vznjqswshesgcsqo\"}") - .toObject(OutputPathAssetReference.class); - Assertions.assertEquals("mxq", model.path()); - Assertions.assertEquals("vznjqswshesgcsqo", model.jobId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OutputPathAssetReference model = new OutputPathAssetReference().withPath("mxq").withJobId("vznjqswshesgcsqo"); - model = BinaryData.fromObject(model).toObject(OutputPathAssetReference.class); - Assertions.assertEquals("mxq", model.path()); - Assertions.assertEquals("vznjqswshesgcsqo", model.jobId()); - } -} 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 171738ac4382c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialBatchDeploymentPartialMinimalTrackedResourceWithPropertiesTests.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.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\":\"yxrxmunj\"},\"tags\":{\"ivbgkcv\":\"glnkvxlxpagl\"}}") - .toObject(PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties.class); - Assertions.assertEquals("yxrxmunj", model.properties().description()); - Assertions.assertEquals("glnkvxlxpagl", model.tags().get("ivbgkcv")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties model - = new PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties() - .withProperties(new PartialBatchDeployment().withDescription("yxrxmunj")) - .withTags(mapOf("ivbgkcv", "glnkvxlxpagl")); - model = BinaryData.fromObject(model) - .toObject(PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties.class); - Assertions.assertEquals("yxrxmunj", model.properties().description()); - Assertions.assertEquals("glnkvxlxpagl", model.tags().get("ivbgkcv")); - } - - // 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/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 2eab63ece4a4c..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\":\"pzvuqdflvo\"}").toObject(PartialBatchDeployment.class); - Assertions.assertEquals("pzvuqdflvo", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartialBatchDeployment model = new PartialBatchDeployment().withDescription("pzvuqdflvo"); - model = BinaryData.fromObject(model).toObject(PartialBatchDeployment.class); - Assertions.assertEquals("pzvuqdflvo", 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 f3a2b95d5821b..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\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"sqqw\":\"dataclafzvaylpt\",\"waxfewzjkj\":\"datatcmwqkchc\",\"ksh\":\"dataxfdeqvhpsyl\",\"rgywwp\":\"databffmbmxz\"}}") - .toObject(PartialManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartialManagedServiceIdentity model - = new PartialManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("sqqw", "dataclafzvaylpt", "waxfewzjkj", "datatcmwqkchc", "ksh", - "dataxfdeqvhpsyl", "rgywwp", "databffmbmxz")); - model = BinaryData.fromObject(model).toObject(PartialManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); - } - - // 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/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 32bf81cef0ace..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceTests.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.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\":{\"pttaqutd\":\"snptfujgicgaao\"}}") - .toObject(PartialMinimalTrackedResource.class); - Assertions.assertEquals("snptfujgicgaao", model.tags().get("pttaqutd")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartialMinimalTrackedResource model - = new PartialMinimalTrackedResource().withTags(mapOf("pttaqutd", "snptfujgicgaao")); - model = BinaryData.fromObject(model).toObject(PartialMinimalTrackedResource.class); - Assertions.assertEquals("snptfujgicgaao", model.tags().get("pttaqutd")); - } - - // 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/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 5db2733737895..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithIdentityTests.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.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\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"ni\":\"dataspofapvuhry\",\"st\":\"datafrzgbzjed\",\"nsnvpd\":\"datavnlvxbcuiiznktwf\",\"z\":\"databmikost\"}},\"tags\":{\"ophzfylsgcrp\":\"wbuqn\",\"fwyfwlwxjwet\":\"bcunezzceze\"}}") - .toObject(PartialMinimalTrackedResourceWithIdentity.class); - Assertions.assertEquals("wbuqn", model.tags().get("ophzfylsgcrp")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartialMinimalTrackedResourceWithIdentity model - = new PartialMinimalTrackedResourceWithIdentity() - .withTags(mapOf("ophzfylsgcrp", "wbuqn", "fwyfwlwxjwet", "bcunezzceze")) - .withIdentity(new PartialManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("ni", "dataspofapvuhry", "st", "datafrzgbzjed", "nsnvpd", - "datavnlvxbcuiiznktwf", "z", "databmikost"))); - model = BinaryData.fromObject(model).toObject(PartialMinimalTrackedResourceWithIdentity.class); - Assertions.assertEquals("wbuqn", model.tags().get("ophzfylsgcrp")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithSkuAndIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithSkuAndIdentityTests.java deleted file mode 100644 index b0eb4816ada08..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithSkuAndIdentityTests.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.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -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.SkuTier; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PartialMinimalTrackedResourceWithSkuAndIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartialMinimalTrackedResourceWithSkuAndIdentity model = BinaryData.fromString( - "{\"sku\":{\"name\":\"ljuxl\",\"tier\":\"Free\",\"size\":\"tvtfjms\",\"family\":\"chmaiubavlzwpvgm\",\"capacity\":30040168},\"identity\":{\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"rokzrthqetwpq\":\"datagokedgjqafkm\"}},\"tags\":{\"ixiezeag\":\"aoznq\",\"hfpjstlzmbls\":\"ceituuge\"}}") - .toObject(PartialMinimalTrackedResourceWithSkuAndIdentity.class); - Assertions.assertEquals("aoznq", model.tags().get("ixiezeag")); - Assertions.assertEquals("ljuxl", model.sku().name()); - Assertions.assertEquals(SkuTier.FREE, model.sku().tier()); - Assertions.assertEquals("tvtfjms", model.sku().size()); - Assertions.assertEquals("chmaiubavlzwpvgm", model.sku().family()); - Assertions.assertEquals(30040168, model.sku().capacity()); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartialMinimalTrackedResourceWithSkuAndIdentity model = new PartialMinimalTrackedResourceWithSkuAndIdentity() - .withTags(mapOf("ixiezeag", "aoznq", "hfpjstlzmbls", "ceituuge")) - .withSku(new PartialSku().withName("ljuxl") - .withTier(SkuTier.FREE) - .withSize("tvtfjms") - .withFamily("chmaiubavlzwpvgm") - .withCapacity(30040168)) - .withIdentity( - new PartialManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("rokzrthqetwpq", "datagokedgjqafkm"))); - model = BinaryData.fromObject(model).toObject(PartialMinimalTrackedResourceWithSkuAndIdentity.class); - Assertions.assertEquals("aoznq", model.tags().get("ixiezeag")); - Assertions.assertEquals("ljuxl", model.sku().name()); - Assertions.assertEquals(SkuTier.FREE, model.sku().tier()); - Assertions.assertEquals("tvtfjms", model.sku().size()); - Assertions.assertEquals("chmaiubavlzwpvgm", model.sku().family()); - Assertions.assertEquals(30040168, model.sku().capacity()); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - } - - // 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/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 a6bca875b0fbe..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithSkuTests.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.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\":{\"name\":\"rkuz\",\"tier\":\"Free\",\"size\":\"ndtsnxawqytll\",\"family\":\"yzm\",\"capacity\":1452137809},\"tags\":{\"kck\":\"xnx\"}}") - .toObject(PartialMinimalTrackedResourceWithSku.class); - Assertions.assertEquals("xnx", model.tags().get("kck")); - Assertions.assertEquals("rkuz", model.sku().name()); - Assertions.assertEquals(SkuTier.FREE, model.sku().tier()); - Assertions.assertEquals("ndtsnxawqytll", model.sku().size()); - Assertions.assertEquals("yzm", model.sku().family()); - Assertions.assertEquals(1452137809, model.sku().capacity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartialMinimalTrackedResourceWithSku model - = new PartialMinimalTrackedResourceWithSku().withTags(mapOf("kck", "xnx")) - .withSku(new PartialSku().withName("rkuz") - .withTier(SkuTier.FREE) - .withSize("ndtsnxawqytll") - .withFamily("yzm") - .withCapacity(1452137809)); - model = BinaryData.fromObject(model).toObject(PartialMinimalTrackedResourceWithSku.class); - Assertions.assertEquals("xnx", model.tags().get("kck")); - Assertions.assertEquals("rkuz", model.sku().name()); - Assertions.assertEquals(SkuTier.FREE, model.sku().tier()); - Assertions.assertEquals("ndtsnxawqytll", model.sku().size()); - Assertions.assertEquals("yzm", model.sku().family()); - Assertions.assertEquals(1452137809, model.sku().capacity()); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/PartialRegistryPartialTrackedResourceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialRegistryPartialTrackedResourceTests.java deleted file mode 100644 index 8ad4095da8d88..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialRegistryPartialTrackedResourceTests.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.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PartialRegistryPartialTrackedResource; -import com.azure.resourcemanager.machinelearning.models.PartialSku; -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 org.junit.jupiter.api.Assertions; - -public final class PartialRegistryPartialTrackedResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartialRegistryPartialTrackedResource model = BinaryData.fromString( - "{\"identity\":{\"principalId\":\"370e11aa-1cde-446e-8d05-867ab14f8848\",\"tenantId\":\"6ce29048-e549-4164-b52f-77a4a18b36b5\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"r\":{\"principalId\":\"c0ed1deb-cbad-445a-b9ba-e55fb37d4cda\",\"clientId\":\"6027cd1a-6031-447a-8589-17ea0ae59b90\"},\"neyttl\":{\"principalId\":\"065f8464-6928-4247-b151-0cfc74b63250\",\"clientId\":\"c36db973-09ef-4904-af3f-cc91f0a96536\"},\"ivcbkutpumltwj\":{\"principalId\":\"d91934d8-363d-495a-88b2-425c44255200\",\"clientId\":\"0aa30399-8e40-4496-ac14-d68156b72902\"}}},\"sku\":{\"name\":\"xynbpvzlqywa\",\"tier\":\"Standard\",\"size\":\"jckhmocgj\",\"family\":\"gouarhwvixqq\",\"capacity\":902896501},\"tags\":{\"rvtz\":\"ybsjrc\",\"y\":\"nrbctbhpjhxpcvrd\"}}") - .toObject(PartialRegistryPartialTrackedResource.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("xynbpvzlqywa", model.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); - Assertions.assertEquals("jckhmocgj", model.sku().size()); - Assertions.assertEquals("gouarhwvixqq", model.sku().family()); - Assertions.assertEquals(902896501, model.sku().capacity()); - Assertions.assertEquals("ybsjrc", model.tags().get("rvtz")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartialRegistryPartialTrackedResource model = new PartialRegistryPartialTrackedResource() - .withIdentity(new RegistryPartialManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("r", new UserAssignedIdentity(), "neyttl", new UserAssignedIdentity(), - "ivcbkutpumltwj", new UserAssignedIdentity()))) - .withSku(new PartialSku().withName("xynbpvzlqywa") - .withTier(SkuTier.STANDARD) - .withSize("jckhmocgj") - .withFamily("gouarhwvixqq") - .withCapacity(902896501)) - .withTags(mapOf("rvtz", "ybsjrc", "y", "nrbctbhpjhxpcvrd")); - model = BinaryData.fromObject(model).toObject(PartialRegistryPartialTrackedResource.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("xynbpvzlqywa", model.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); - Assertions.assertEquals("jckhmocgj", model.sku().size()); - Assertions.assertEquals("gouarhwvixqq", model.sku().family()); - Assertions.assertEquals(902896501, model.sku().capacity()); - Assertions.assertEquals("ybsjrc", model.tags().get("rvtz")); - } - - // 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/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 e1bfe9a92bc62..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialSkuTests.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.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( - "{\"name\":\"ymx\",\"tier\":\"Standard\",\"size\":\"jkdtfoh\",\"family\":\"ogzvk\",\"capacity\":372734200}") - .toObject(PartialSku.class); - Assertions.assertEquals("ymx", model.name()); - Assertions.assertEquals(SkuTier.STANDARD, model.tier()); - Assertions.assertEquals("jkdtfoh", model.size()); - Assertions.assertEquals("ogzvk", model.family()); - Assertions.assertEquals(372734200, model.capacity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartialSku model = new PartialSku().withName("ymx") - .withTier(SkuTier.STANDARD) - .withSize("jkdtfoh") - .withFamily("ogzvk") - .withCapacity(372734200); - model = BinaryData.fromObject(model).toObject(PartialSku.class); - Assertions.assertEquals("ymx", model.name()); - Assertions.assertEquals(SkuTier.STANDARD, model.tier()); - Assertions.assertEquals("jkdtfoh", model.size()); - Assertions.assertEquals("ogzvk", model.family()); - Assertions.assertEquals(372734200, model.capacity()); - } -} 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 a4e7fec01c483..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PasswordTests.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.Password; - -public final class PasswordTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Password model = BinaryData.fromString("{\"name\":\"yocf\",\"value\":\"ksymd\"}").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/PendingUploadRequestDtoTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PendingUploadRequestDtoTests.java deleted file mode 100644 index 734ac01c54457..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PendingUploadRequestDtoTests.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.PendingUploadRequestDto; -import com.azure.resourcemanager.machinelearning.models.PendingUploadType; -import org.junit.jupiter.api.Assertions; - -public final class PendingUploadRequestDtoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PendingUploadRequestDto model - = BinaryData.fromString("{\"pendingUploadId\":\"zrfze\",\"pendingUploadType\":\"TemporaryBlobReference\"}") - .toObject(PendingUploadRequestDto.class); - Assertions.assertEquals("zrfze", model.pendingUploadId()); - Assertions.assertEquals(PendingUploadType.TEMPORARY_BLOB_REFERENCE, model.pendingUploadType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PendingUploadRequestDto model = new PendingUploadRequestDto().withPendingUploadId("zrfze") - .withPendingUploadType(PendingUploadType.TEMPORARY_BLOB_REFERENCE); - model = BinaryData.fromObject(model).toObject(PendingUploadRequestDto.class); - Assertions.assertEquals("zrfze", model.pendingUploadId()); - Assertions.assertEquals(PendingUploadType.TEMPORARY_BLOB_REFERENCE, model.pendingUploadType()); - } -} 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 911a176e9a520..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PersonalComputeInstanceSettingsTests.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.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\":\"rgkrfi\",\"tenantId\":\"rpywlptyuqh\"}}") - .toObject(PersonalComputeInstanceSettings.class); - Assertions.assertEquals("rgkrfi", model.assignedUser().objectId()); - Assertions.assertEquals("rpywlptyuqh", model.assignedUser().tenantId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PersonalComputeInstanceSettings model = new PersonalComputeInstanceSettings() - .withAssignedUser(new AssignedUser().withObjectId("rgkrfi").withTenantId("rpywlptyuqh")); - model = BinaryData.fromObject(model).toObject(PersonalComputeInstanceSettings.class); - Assertions.assertEquals("rgkrfi", model.assignedUser().objectId()); - Assertions.assertEquals("rpywlptyuqh", 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 0235ddd033d73..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PipelineJobTests.java +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EmailNotificationEnableType; -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.Nodes; -import com.azure.resourcemanager.machinelearning.models.NotificationSetting; -import com.azure.resourcemanager.machinelearning.models.PipelineJob; -import com.azure.resourcemanager.machinelearning.models.Webhook; -import java.util.Arrays; -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\",\"settings\":\"datacxlngoufpi\",\"jobs\":{\"vsl\":\"datamfxzspf\"},\"inputs\":{\"dumjtycildrzn\":{\"jobInputType\":\"JobInput\",\"description\":\"plxg\"},\"xduyjnqzbrqcakm\":{\"jobInputType\":\"JobInput\",\"description\":\"xozqthkwxfugfziz\"}},\"outputs\":{\"whmucjiuhcxyveh\":{\"jobOutputType\":\"JobOutput\",\"description\":\"iyjucamnsbqoi\"},\"ycudus\":{\"jobOutputType\":\"JobOutput\",\"description\":\"lelyqdvpqfbx\"},\"lefnoheywvfo\":{\"jobOutputType\":\"JobOutput\",\"description\":\"tx\"},\"enjpwdmsfw\":{\"jobOutputType\":\"JobOutput\",\"description\":\"yllre\"}},\"sourceJobId\":\"rsvevcneqswxhqh\",\"displayName\":\"htbzvulqevvj\",\"status\":\"Paused\",\"experimentName\":\"yhtxgdmvghcm\",\"services\":{\"rxowvhufcmuajwb\":{\"jobServiceType\":\"wkfefbcyjr\",\"port\":658805241,\"endpoint\":\"eebu\",\"status\":\"yimooaezkto\",\"errorMessage\":\"go\",\"properties\":{\"fztvnabfbbtown\":\"qwbywaazbaeee\",\"zxkrdpuyytbpkrpk\":\"ljdkxhmewyaolc\",\"enefnoafpcnrx\":\"qetp\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"c\":{\"jobServiceType\":\"p\",\"port\":942163314,\"endpoint\":\"frfa\",\"status\":\"nnsvrfajynihti\",\"errorMessage\":\"fgzqzhl\",\"properties\":{\"yohrcmeqljxdum\":\"blfehbgc\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}},\"tg\":{\"jobServiceType\":\"nebldxag\",\"port\":2015322122,\"endpoint\":\"wcn\",\"status\":\"wxjsjquv\",\"errorMessage\":\"ufzdtsrpju\",\"properties\":{\"huqczouanbfulv\":\"acrzhnsbylgmg\",\"bzbwbgwzhbhfljey\":\"xglxoqwbztil\",\"lhrwyakzuafapwx\":\"dpiov\",\"extqd\":\"vdeatjiobnirg\"},\"nodes\":{\"nodesValueType\":\"Nodes\"}}},\"computeId\":\"imznupbmtbs\",\"isArchived\":true,\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"componentId\":\"sqvhe\",\"notificationSetting\":{\"emails\":[\"ghc\",\"zmmmjyvdhdgdi\",\"m\"],\"emailOn\":[\"JobCancelled\"],\"webhooks\":{\"caqfkakh\":{\"webhookType\":\"Webhook\",\"eventType\":\"tqjisjmol\"}}},\"description\":\"rvty\",\"tags\":{\"pfzxkczbdypbbim\":\"ytvjejqawfus\",\"ortclnhbjcyuzly\":\"jbozv\"},\"properties\":{\"lkv\":\"cibv\",\"nviulbylmgjzr\":\"kcafnwqhawv\"}}") - .toObject(PipelineJob.class); - Assertions.assertEquals("rvty", model.description()); - Assertions.assertEquals("ytvjejqawfus", model.tags().get("pfzxkczbdypbbim")); - Assertions.assertEquals("cibv", model.properties().get("lkv")); - Assertions.assertEquals("htbzvulqevvj", model.displayName()); - Assertions.assertEquals("yhtxgdmvghcm", model.experimentName()); - Assertions.assertEquals("wkfefbcyjr", model.services().get("rxowvhufcmuajwb").jobServiceType()); - Assertions.assertEquals(658805241, model.services().get("rxowvhufcmuajwb").port()); - Assertions.assertEquals("eebu", model.services().get("rxowvhufcmuajwb").endpoint()); - Assertions.assertEquals("qwbywaazbaeee", - model.services().get("rxowvhufcmuajwb").properties().get("fztvnabfbbtown")); - Assertions.assertEquals("imznupbmtbs", model.computeId()); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals("sqvhe", model.componentId()); - Assertions.assertEquals("ghc", model.notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, - model.notificationSetting().emailOn().get(0)); - Assertions.assertEquals("tqjisjmol", model.notificationSetting().webhooks().get("caqfkakh").eventType()); - Assertions.assertEquals("plxg", model.inputs().get("dumjtycildrzn").description()); - Assertions.assertEquals("iyjucamnsbqoi", model.outputs().get("whmucjiuhcxyveh").description()); - Assertions.assertEquals("rsvevcneqswxhqh", model.sourceJobId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PipelineJob model = new PipelineJob().withDescription("rvty") - .withTags(mapOf("pfzxkczbdypbbim", "ytvjejqawfus", "ortclnhbjcyuzly", "jbozv")) - .withProperties(mapOf("lkv", "cibv", "nviulbylmgjzr", "kcafnwqhawv")) - .withDisplayName("htbzvulqevvj") - .withExperimentName("yhtxgdmvghcm") - .withServices(mapOf("rxowvhufcmuajwb", - new JobService().withJobServiceType("wkfefbcyjr") - .withPort(658805241) - .withEndpoint("eebu") - .withProperties(mapOf("fztvnabfbbtown", "qwbywaazbaeee", "zxkrdpuyytbpkrpk", "ljdkxhmewyaolc", - "enefnoafpcnrx", "qetp")) - .withNodes(new Nodes()), - "c", - new JobService().withJobServiceType("p") - .withPort(942163314) - .withEndpoint("frfa") - .withProperties(mapOf("yohrcmeqljxdum", "blfehbgc")) - .withNodes(new Nodes()), - "tg", - new JobService().withJobServiceType("nebldxag") - .withPort(2015322122) - .withEndpoint("wcn") - .withProperties(mapOf("huqczouanbfulv", "acrzhnsbylgmg", "bzbwbgwzhbhfljey", "xglxoqwbztil", - "lhrwyakzuafapwx", "dpiov", "extqd", "vdeatjiobnirg")) - .withNodes(new Nodes()))) - .withComputeId("imznupbmtbs") - .withIsArchived(true) - .withIdentity(new IdentityConfiguration()) - .withComponentId("sqvhe") - .withNotificationSetting(new NotificationSetting().withEmails(Arrays.asList("ghc", "zmmmjyvdhdgdi", "m")) - .withEmailOn(Arrays.asList(EmailNotificationEnableType.JOB_CANCELLED)) - .withWebhooks(mapOf("caqfkakh", new Webhook().withEventType("tqjisjmol")))) - .withSettings("datacxlngoufpi") - .withJobs(mapOf("vsl", "datamfxzspf")) - .withInputs(mapOf("dumjtycildrzn", new JobInput().withDescription("plxg"), "xduyjnqzbrqcakm", - new JobInput().withDescription("xozqthkwxfugfziz"))) - .withOutputs(mapOf("whmucjiuhcxyveh", new JobOutput().withDescription("iyjucamnsbqoi"), "ycudus", - new JobOutput().withDescription("lelyqdvpqfbx"), "lefnoheywvfo", new JobOutput().withDescription("tx"), - "enjpwdmsfw", new JobOutput().withDescription("yllre"))) - .withSourceJobId("rsvevcneqswxhqh"); - model = BinaryData.fromObject(model).toObject(PipelineJob.class); - Assertions.assertEquals("rvty", model.description()); - Assertions.assertEquals("ytvjejqawfus", model.tags().get("pfzxkczbdypbbim")); - Assertions.assertEquals("cibv", model.properties().get("lkv")); - Assertions.assertEquals("htbzvulqevvj", model.displayName()); - Assertions.assertEquals("yhtxgdmvghcm", model.experimentName()); - Assertions.assertEquals("wkfefbcyjr", model.services().get("rxowvhufcmuajwb").jobServiceType()); - Assertions.assertEquals(658805241, model.services().get("rxowvhufcmuajwb").port()); - Assertions.assertEquals("eebu", model.services().get("rxowvhufcmuajwb").endpoint()); - Assertions.assertEquals("qwbywaazbaeee", - model.services().get("rxowvhufcmuajwb").properties().get("fztvnabfbbtown")); - Assertions.assertEquals("imznupbmtbs", model.computeId()); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals("sqvhe", model.componentId()); - Assertions.assertEquals("ghc", model.notificationSetting().emails().get(0)); - Assertions.assertEquals(EmailNotificationEnableType.JOB_CANCELLED, - model.notificationSetting().emailOn().get(0)); - Assertions.assertEquals("tqjisjmol", model.notificationSetting().webhooks().get("caqfkakh").eventType()); - Assertions.assertEquals("plxg", model.inputs().get("dumjtycildrzn").description()); - Assertions.assertEquals("iyjucamnsbqoi", model.outputs().get("whmucjiuhcxyveh").description()); - Assertions.assertEquals("rsvevcneqswxhqh", model.sourceJobId()); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/PredictionDriftMetricThresholdBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PredictionDriftMetricThresholdBaseTests.java deleted file mode 100644 index 9b5d474f3a74d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PredictionDriftMetricThresholdBaseTests.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.MonitoringThreshold; -import com.azure.resourcemanager.machinelearning.models.PredictionDriftMetricThresholdBase; -import org.junit.jupiter.api.Assertions; - -public final class PredictionDriftMetricThresholdBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PredictionDriftMetricThresholdBase model = BinaryData - .fromString( - "{\"dataType\":\"PredictionDriftMetricThresholdBase\",\"threshold\":{\"value\":21.01964242630283}}") - .toObject(PredictionDriftMetricThresholdBase.class); - Assertions.assertEquals(21.01964242630283D, model.threshold().value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PredictionDriftMetricThresholdBase model = new PredictionDriftMetricThresholdBase() - .withThreshold(new MonitoringThreshold().withValue(21.01964242630283D)); - model = BinaryData.fromObject(model).toObject(PredictionDriftMetricThresholdBase.class); - Assertions.assertEquals(21.01964242630283D, model.threshold().value()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PredictionDriftMonitoringSignalTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PredictionDriftMonitoringSignalTests.java deleted file mode 100644 index f7253776a236d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PredictionDriftMonitoringSignalTests.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.models.JobInputType; -import com.azure.resourcemanager.machinelearning.models.MonitoringFeatureDataType; -import com.azure.resourcemanager.machinelearning.models.MonitoringInputDataBase; -import com.azure.resourcemanager.machinelearning.models.MonitoringNotificationType; -import com.azure.resourcemanager.machinelearning.models.MonitoringThreshold; -import com.azure.resourcemanager.machinelearning.models.PredictionDriftMetricThresholdBase; -import com.azure.resourcemanager.machinelearning.models.PredictionDriftMonitoringSignal; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PredictionDriftMonitoringSignalTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PredictionDriftMonitoringSignal model = BinaryData.fromString( - "{\"signalType\":\"PredictionDrift\",\"metricThresholds\":[{\"dataType\":\"PredictionDriftMetricThresholdBase\",\"threshold\":{\"value\":82.50470090588112}},{\"dataType\":\"PredictionDriftMetricThresholdBase\",\"threshold\":{\"value\":17.174727928466226}}],\"productionData\":{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"xpuckn\",\"jobInputType\":\"mlflow_model\",\"uri\":\"s\",\"columns\":{\"micttrvl\":\"smg\",\"cjrzvlcivqx\":\"vjmxokxxamq\"}},\"referenceData\":{\"inputDataType\":\"MonitoringInputDataBase\",\"dataContext\":\"mklphxwww\",\"jobInputType\":\"custom_model\",\"uri\":\"jkbgnfbr\",\"columns\":{\"evlahxczywyw\":\"fsunh\",\"axqjf\":\"ahwcorewcnn\",\"gewdqbxexfyzn\":\"ajrfgimom\"}},\"featureDataTypeOverride\":{\"uqks\":\"Categorical\",\"sfx\":\"Numerical\"},\"notificationTypes\":[\"AmlNotification\",\"AmlNotification\",\"AmlNotification\",\"AmlNotification\"],\"properties\":{\"rtlikff\":\"pmoh\",\"qrf\":\"dzt\",\"zdteqjmyqxuhg\":\"gynzfw\",\"wrrlccklyf\":\"axnyprijyoxxjxbs\"}}") - .toObject(PredictionDriftMonitoringSignal.class); - Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, model.notificationTypes().get(0)); - Assertions.assertEquals("pmoh", model.properties().get("rtlikff")); - Assertions.assertEquals(82.50470090588112D, model.metricThresholds().get(0).threshold().value()); - Assertions.assertEquals("xpuckn", model.productionData().dataContext()); - Assertions.assertEquals(JobInputType.MLFLOW_MODEL, model.productionData().jobInputType()); - Assertions.assertEquals("s", model.productionData().uri()); - Assertions.assertEquals("smg", model.productionData().columns().get("micttrvl")); - Assertions.assertEquals("mklphxwww", model.referenceData().dataContext()); - Assertions.assertEquals(JobInputType.CUSTOM_MODEL, model.referenceData().jobInputType()); - Assertions.assertEquals("jkbgnfbr", model.referenceData().uri()); - Assertions.assertEquals("fsunh", model.referenceData().columns().get("evlahxczywyw")); - Assertions.assertEquals(MonitoringFeatureDataType.CATEGORICAL, model.featureDataTypeOverride().get("uqks")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PredictionDriftMonitoringSignal model = new PredictionDriftMonitoringSignal() - .withNotificationTypes( - Arrays.asList(MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION, - MonitoringNotificationType.AML_NOTIFICATION, MonitoringNotificationType.AML_NOTIFICATION)) - .withProperties( - mapOf("rtlikff", "pmoh", "qrf", "dzt", "zdteqjmyqxuhg", "gynzfw", "wrrlccklyf", "axnyprijyoxxjxbs")) - .withMetricThresholds(Arrays.asList( - new PredictionDriftMetricThresholdBase() - .withThreshold(new MonitoringThreshold().withValue(82.50470090588112D)), - new PredictionDriftMetricThresholdBase() - .withThreshold(new MonitoringThreshold().withValue(17.174727928466226D)))) - .withProductionData(new MonitoringInputDataBase().withDataContext("xpuckn") - .withJobInputType(JobInputType.MLFLOW_MODEL) - .withUri("s") - .withColumns(mapOf("micttrvl", "smg", "cjrzvlcivqx", "vjmxokxxamq"))) - .withReferenceData(new MonitoringInputDataBase().withDataContext("mklphxwww") - .withJobInputType(JobInputType.CUSTOM_MODEL) - .withUri("jkbgnfbr") - .withColumns(mapOf("evlahxczywyw", "fsunh", "axqjf", "ahwcorewcnn", "gewdqbxexfyzn", "ajrfgimom"))) - .withFeatureDataTypeOverride( - mapOf("uqks", MonitoringFeatureDataType.CATEGORICAL, "sfx", MonitoringFeatureDataType.NUMERICAL)); - model = BinaryData.fromObject(model).toObject(PredictionDriftMonitoringSignal.class); - Assertions.assertEquals(MonitoringNotificationType.AML_NOTIFICATION, model.notificationTypes().get(0)); - Assertions.assertEquals("pmoh", model.properties().get("rtlikff")); - Assertions.assertEquals(82.50470090588112D, model.metricThresholds().get(0).threshold().value()); - Assertions.assertEquals("xpuckn", model.productionData().dataContext()); - Assertions.assertEquals(JobInputType.MLFLOW_MODEL, model.productionData().jobInputType()); - Assertions.assertEquals("s", model.productionData().uri()); - Assertions.assertEquals("smg", model.productionData().columns().get("micttrvl")); - Assertions.assertEquals("mklphxwww", model.referenceData().dataContext()); - Assertions.assertEquals(JobInputType.CUSTOM_MODEL, model.referenceData().jobInputType()); - Assertions.assertEquals("jkbgnfbr", model.referenceData().uri()); - Assertions.assertEquals("fsunh", model.referenceData().columns().get("evlahxczywyw")); - Assertions.assertEquals(MonitoringFeatureDataType.CATEGORICAL, model.featureDataTypeOverride().get("uqks")); - } - - // 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/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 ee1becf99c9c4..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionInnerTests.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.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\":\"jsprozvcpute\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"mfdatscmdvpj\",\"actionsRequired\":\"lsuuvmkjozkrwfnd\"},\"provisioningState\":\"Creating\"},\"identity\":{\"principalId\":\"7019862e-4533-4693-8853-f0cd6b6c6e89\",\"tenantId\":\"2a954b50-28af-4b69-b3b9-ff3698c39bfa\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"pvwryoqpsoacc\":{\"principalId\":\"c4839c09-9288-4406-9085-53ead4ae12ad\",\"clientId\":\"8bbf256b-2782-4abf-aeb5-f48b167f634e\"}}},\"location\":\"zakljlahbc\",\"tags\":{\"jakhmsbzjh\":\"fdfdosygexpa\",\"hqtrgqjbpf\":\"rzevdphlxaol\",\"tfell\":\"fsinzgvfcjrwzoxx\",\"lxofpdvhpfxxypin\":\"wfzitonpeqfpjk\"},\"sku\":{\"name\":\"mayhuybbkpodepoo\",\"tier\":\"Standard\",\"size\":\"vamih\",\"family\":\"gnarxzxtheo\",\"capacity\":372211152},\"id\":\"vyevcciqi\",\"name\":\"nhungbw\",\"type\":\"zrnf\"}") - .toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("zakljlahbc", model.location()); - Assertions.assertEquals("fdfdosygexpa", model.tags().get("jakhmsbzjh")); - Assertions.assertEquals("mayhuybbkpodepoo", model.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); - Assertions.assertEquals("vamih", model.sku().size()); - Assertions.assertEquals("gnarxzxtheo", model.sku().family()); - Assertions.assertEquals(372211152, model.sku().capacity()); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, - model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("mfdatscmdvpj", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("lsuuvmkjozkrwfnd", model.privateLinkServiceConnectionState().actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionInner model = new PrivateEndpointConnectionInner() - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("pvwryoqpsoacc", new UserAssignedIdentity()))) - .withLocation("zakljlahbc") - .withTags(mapOf("jakhmsbzjh", "fdfdosygexpa", "hqtrgqjbpf", "rzevdphlxaol", "tfell", "fsinzgvfcjrwzoxx", - "lxofpdvhpfxxypin", "wfzitonpeqfpjk")) - .withSku(new Sku().withName("mayhuybbkpodepoo") - .withTier(SkuTier.STANDARD) - .withSize("vamih") - .withFamily("gnarxzxtheo") - .withCapacity(372211152)) - .withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.PENDING) - .withDescription("mfdatscmdvpj") - .withActionsRequired("lsuuvmkjozkrwfnd")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("zakljlahbc", model.location()); - Assertions.assertEquals("fdfdosygexpa", model.tags().get("jakhmsbzjh")); - Assertions.assertEquals("mayhuybbkpodepoo", model.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); - Assertions.assertEquals("vamih", model.sku().size()); - Assertions.assertEquals("gnarxzxtheo", model.sku().family()); - Assertions.assertEquals(372211152, model.sku().capacity()); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, - model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("mfdatscmdvpj", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("lsuuvmkjozkrwfnd", model.privateLinkServiceConnectionState().actionsRequired()); - } - - // 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/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 30ee0d4021654..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionListResultTests.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.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.PrivateEndpointConnectionListResult; -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.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\":{\"privateEndpoint\":{\"id\":\"ixisxyawjoy\"},\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"lyjpk\",\"actionsRequired\":\"dzyexznelixh\"},\"provisioningState\":\"Deleting\"},\"identity\":{\"principalId\":\"428d0cb0-8c12-44d5-b252-76000bc1d935\",\"tenantId\":\"f4f8d2be-887c-4354-92ba-25a99a96f6e0\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"knalaulppg\":{\"principalId\":\"1df48505-2f4c-46e9-a6c1-083d560032d5\",\"clientId\":\"e6efcb15-b4b5-4cd9-a646-c87614610d11\"},\"pnapnyiropuh\":{\"principalId\":\"e8ff1dfc-ab01-42fa-b808-9ecf16483ab8\",\"clientId\":\"f9a7da4b-ec5c-45cf-902a-a6bf525b29c1\"},\"vpgylgqgitxmed\":{\"principalId\":\"69de999a-08c9-4be5-8d89-098f1cb44432\",\"clientId\":\"eca6c331-dc16-48ec-a4b5-69fed487c753\"},\"slynqwwnc\":{\"principalId\":\"4578118c-32fd-493e-b0fe-373d0f63c7be\",\"clientId\":\"2c28c670-8b11-4634-9d9e-3032b463722b\"}}},\"location\":\"zhxgktrmgucn\",\"tags\":{\"oellwp\":\"t\"},\"sku\":{\"name\":\"d\",\"tier\":\"Standard\",\"size\":\"qbuaceopzfqr\",\"family\":\"uaopppcqeq\",\"capacity\":1990032205},\"id\":\"dahzxctobg\",\"name\":\"kdmoi\",\"type\":\"postmgrcfbunrm\"}]}") - .toObject(PrivateEndpointConnectionListResult.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("zhxgktrmgucn", model.value().get(0).location()); - Assertions.assertEquals("t", model.value().get(0).tags().get("oellwp")); - Assertions.assertEquals("d", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.value().get(0).sku().tier()); - Assertions.assertEquals("qbuaceopzfqr", model.value().get(0).sku().size()); - Assertions.assertEquals("uaopppcqeq", model.value().get(0).sku().family()); - Assertions.assertEquals(1990032205, model.value().get(0).sku().capacity()); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.DISCONNECTED, - model.value().get(0).privateLinkServiceConnectionState().status()); - Assertions.assertEquals("lyjpk", model.value().get(0).privateLinkServiceConnectionState().description()); - Assertions.assertEquals("dzyexznelixh", - model.value().get(0).privateLinkServiceConnectionState().actionsRequired()); - } - - @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) - .withUserAssignedIdentities(mapOf("knalaulppg", new UserAssignedIdentity(), "pnapnyiropuh", - new UserAssignedIdentity(), "vpgylgqgitxmed", new UserAssignedIdentity(), "slynqwwnc", - new UserAssignedIdentity()))) - .withLocation("zhxgktrmgucn") - .withTags(mapOf("oellwp", "t")) - .withSku(new Sku().withName("d") - .withTier(SkuTier.STANDARD) - .withSize("qbuaceopzfqr") - .withFamily("uaopppcqeq") - .withCapacity(1990032205)) - .withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.DISCONNECTED) - .withDescription("lyjpk") - .withActionsRequired("dzyexznelixh")))); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionListResult.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("zhxgktrmgucn", model.value().get(0).location()); - Assertions.assertEquals("t", model.value().get(0).tags().get("oellwp")); - Assertions.assertEquals("d", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.value().get(0).sku().tier()); - Assertions.assertEquals("qbuaceopzfqr", model.value().get(0).sku().size()); - Assertions.assertEquals("uaopppcqeq", model.value().get(0).sku().family()); - Assertions.assertEquals(1990032205, model.value().get(0).sku().capacity()); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.DISCONNECTED, - model.value().get(0).privateLinkServiceConnectionState().status()); - Assertions.assertEquals("lyjpk", model.value().get(0).privateLinkServiceConnectionState().description()); - Assertions.assertEquals("dzyexznelixh", - model.value().get(0).privateLinkServiceConnectionState().actionsRequired()); - } - - // 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/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 a3941d8ea35a9..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionPropertiesTests.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.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\":\"gispemvtzfkufubl\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"qeof\",\"actionsRequired\":\"e\"},\"provisioningState\":\"Deleting\"}") - .toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, - model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("qeof", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("e", 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.REJECTED) - .withDescription("qeof") - .withActionsRequired("e")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, - model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("qeof", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("e", 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 0ae4983a23845..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsCreateOrUpdateWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.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 com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -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 reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"privateEndpoint\":{\"id\":\"hdbitq\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"jsgomrih\",\"actionsRequired\":\"grmsdbv\"},\"provisioningState\":\"Deleting\"},\"identity\":{\"principalId\":\"df52856d-4e2e-4dc3-82db-75118299d198\",\"tenantId\":\"8769944d-3a45-4ec5-b03c-8604ec7e8a5d\",\"type\":\"None\",\"userAssignedIdentities\":{\"dpbceh\":{\"principalId\":\"47e93559-498d-47de-90c5-a018e74d5b91\",\"clientId\":\"48daa439-430b-49e9-85a5-35d609d55ac6\"},\"psesboynpyt\":{\"principalId\":\"e827b970-cd6b-4ebe-9d9b-092146e41889\",\"clientId\":\"126fa503-83f6-4234-977c-5282ac54919c\"},\"rvkxtfctaneti\":{\"principalId\":\"76b4cd46-b1ec-4b33-ad1d-2aaadb7ea4a1\",\"clientId\":\"97bcfbf0-b95c-4639-b831-72698ac5a272\"},\"dhnpjnezjighdu\":{\"principalId\":\"58557c6a-9dec-46ee-b446-622e9330040b\",\"clientId\":\"6d964002-7aeb-48a7-81c9-29cddb3c0cd6\"}}},\"location\":\"tpmrzwvwetqf\",\"tags\":{\"bsotoc\":\"vfhuqhngqqx\",\"atwxpxb\":\"mrttujyd\"},\"sku\":{\"name\":\"dhxbboceksramqc\",\"tier\":\"Premium\",\"size\":\"fnlvvkswurxdq\",\"family\":\"hauimn\",\"capacity\":1536425318},\"id\":\"q\",\"name\":\"wq\",\"type\":\"nbnwi\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("fy") - .withExistingWorkspace("q", "rtgqrqkk") - .withRegion("eadnyciw") - .withTags(mapOf("vzohabbriz", "lykqadfge", "qsxofxqnkiuok", "adjrsbgailjqovqm", "bhiebruptls", "ltsxooi")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities( - mapOf("fiozttcbi", new UserAssignedIdentity(), "gkudsozodwjc", new UserAssignedIdentity(), - "yxryqyc", new UserAssignedIdentity(), "rlcfgdwzauzf", new UserAssignedIdentity()))) - .withSku(new Sku().withName("qzgaqsosrnjlvgrg") - .withTier(SkuTier.PREMIUM) - .withSize("oxrqhjninpeswv") - .withFamily("qkgebz") - .withCapacity(156493894)) - .withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.TIMEOUT) - .withDescription("pnyjtu") - .withActionsRequired("zyvextchslro")) - .create(); - - Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.identity().type()); - Assertions.assertEquals("tpmrzwvwetqf", response.location()); - Assertions.assertEquals("vfhuqhngqqx", response.tags().get("bsotoc")); - Assertions.assertEquals("dhxbboceksramqc", response.sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, response.sku().tier()); - Assertions.assertEquals("fnlvvkswurxdq", response.sku().size()); - Assertions.assertEquals("hauimn", response.sku().family()); - Assertions.assertEquals(1536425318, response.sku().capacity()); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, - response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("jsgomrih", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("grmsdbv", response.privateLinkServiceConnectionState().actionsRequired()); - } - - // 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/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 9fda9a41d8548..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsDeleteWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("vudyhgtrttcuayi", "ylnkmmxzifbqg", "exo", 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 bfd0ba0e23ae9..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.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.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"privateEndpoint\":{\"id\":\"kefkzlxvcozcgoeo\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"cbnunzuysajvvq\",\"actionsRequired\":\"o\"},\"provisioningState\":\"Succeeded\"},\"identity\":{\"principalId\":\"4e30d8d2-f312-4638-8a62-5306572077f5\",\"tenantId\":\"aa47c843-683d-4cdb-8414-00130b4e60e2\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"btkqjqjcajg\":{\"principalId\":\"20b6abcb-9548-421c-aa89-089c5c3ae6fb\",\"clientId\":\"9e1713c0-2a5e-4804-9d3c-fa3b784455f2\"}}},\"location\":\"y\",\"tags\":{\"mrvkxeojtdyulglh\":\"hk\",\"xspxgogypbztgae\":\"lwruklfq\"},\"sku\":{\"name\":\"nskvctvuz\",\"tier\":\"Basic\",\"size\":\"ttmhlvr\",\"family\":\"yxrnwukfajnpdwz\",\"capacity\":803272560},\"id\":\"wdepemziayfi\",\"name\":\"ii\",\"type\":\"xcor\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("ymgbfmd", "uyyaescjxna", "pyxqbkxdtbfkih", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("y", response.location()); - Assertions.assertEquals("hk", response.tags().get("mrvkxeojtdyulglh")); - Assertions.assertEquals("nskvctvuz", response.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, response.sku().tier()); - Assertions.assertEquals("ttmhlvr", response.sku().size()); - Assertions.assertEquals("yxrnwukfajnpdwz", response.sku().family()); - Assertions.assertEquals(803272560, response.sku().capacity()); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, - response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("cbnunzuysajvvq", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("o", 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 cd7211f8bf9d8..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.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.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"urhvifqeqfs\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"kitlwgebylpz\",\"actionsRequired\":\"ldaqwjun\"},\"provisioningState\":\"Deleting\"},\"identity\":{\"principalId\":\"cf01a30f-2d6c-4526-96b5-061089f6b3dc\",\"tenantId\":\"95b0e625-c1a4-4838-9d14-c9e534f2e9aa\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"sypo\":{\"principalId\":\"ee98b5c3-7c30-4f31-9fe8-d9602d95e382\",\"clientId\":\"31c874be-b0b2-4362-8925-a45edefa3e41\"},\"kbvzpkodngvnq\":{\"principalId\":\"3c120bd5-f08e-4f0d-8ced-e415dbf563bc\",\"clientId\":\"bede4942-5ea9-4013-b1ab-a2129c2fb385\"},\"sbtwgnldxuc\":{\"principalId\":\"72923ffe-ef00-48a8-b09f-ebf43bbc0884\",\"clientId\":\"9e710428-b5a3-4a38-9551-5040aa24a865\"}}},\"location\":\"hvb\",\"tags\":{\"iuvcqoqkqwucqs\":\"znrirp\",\"xcwtvm\":\"g\",\"myvwp\":\"jccpkkjl\",\"nnlb\":\"jmaih\"},\"sku\":{\"name\":\"jppcbq\",\"tier\":\"Basic\",\"size\":\"fppvolzayj\",\"family\":\"unj\",\"capacity\":1717201097},\"id\":\"klatwiuujxsujkrw\",\"name\":\"xeegxbnjnc\",\"type\":\"epdp\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("doqkanqtr", "icwhqyrgqmndk", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, - response.iterator().next().identity().type()); - Assertions.assertEquals("hvb", response.iterator().next().location()); - Assertions.assertEquals("znrirp", response.iterator().next().tags().get("iuvcqoqkqwucqs")); - Assertions.assertEquals("jppcbq", response.iterator().next().sku().name()); - Assertions.assertEquals(SkuTier.BASIC, response.iterator().next().sku().tier()); - Assertions.assertEquals("fppvolzayj", response.iterator().next().sku().size()); - Assertions.assertEquals("unj", response.iterator().next().sku().family()); - Assertions.assertEquals(1717201097, response.iterator().next().sku().capacity()); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, - response.iterator().next().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("kitlwgebylpz", - response.iterator().next().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("ldaqwjun", - response.iterator().next().privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointDestinationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointDestinationTests.java deleted file mode 100644 index c703e58ee68de..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointDestinationTests.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.PrivateEndpointDestination; -import com.azure.resourcemanager.machinelearning.models.RuleStatus; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointDestinationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointDestination model = BinaryData.fromString( - "{\"serviceResourceId\":\"qzsaaoq\",\"sparkEnabled\":false,\"sparkStatus\":\"Inactive\",\"subresourceTarget\":\"txjqfiafc\"}") - .toObject(PrivateEndpointDestination.class); - Assertions.assertEquals("qzsaaoq", model.serviceResourceId()); - Assertions.assertEquals(false, model.sparkEnabled()); - Assertions.assertEquals(RuleStatus.INACTIVE, model.sparkStatus()); - Assertions.assertEquals("txjqfiafc", model.subresourceTarget()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointDestination model = new PrivateEndpointDestination().withServiceResourceId("qzsaaoq") - .withSparkEnabled(false) - .withSparkStatus(RuleStatus.INACTIVE) - .withSubresourceTarget("txjqfiafc"); - model = BinaryData.fromObject(model).toObject(PrivateEndpointDestination.class); - Assertions.assertEquals("qzsaaoq", model.serviceResourceId()); - Assertions.assertEquals(false, model.sparkEnabled()); - Assertions.assertEquals(RuleStatus.INACTIVE, model.sparkStatus()); - Assertions.assertEquals("txjqfiafc", model.subresourceTarget()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointOutboundRuleTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointOutboundRuleTests.java deleted file mode 100644 index de9723293ff47..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointOutboundRuleTests.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.PrivateEndpointDestination; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointOutboundRule; -import com.azure.resourcemanager.machinelearning.models.RuleCategory; -import com.azure.resourcemanager.machinelearning.models.RuleStatus; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointOutboundRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointOutboundRule model = BinaryData.fromString( - "{\"type\":\"PrivateEndpoint\",\"destination\":{\"serviceResourceId\":\"zvoikvntwczf\",\"sparkEnabled\":true,\"sparkStatus\":\"Active\",\"subresourceTarget\":\"cxpblalhhezpfk\"},\"category\":\"Required\",\"status\":\"Active\"}") - .toObject(PrivateEndpointOutboundRule.class); - Assertions.assertEquals(RuleCategory.REQUIRED, model.category()); - Assertions.assertEquals(RuleStatus.ACTIVE, model.status()); - Assertions.assertEquals("zvoikvntwczf", model.destination().serviceResourceId()); - Assertions.assertEquals(true, model.destination().sparkEnabled()); - Assertions.assertEquals(RuleStatus.ACTIVE, model.destination().sparkStatus()); - Assertions.assertEquals("cxpblalhhezpfk", model.destination().subresourceTarget()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointOutboundRule model = new PrivateEndpointOutboundRule().withCategory(RuleCategory.REQUIRED) - .withStatus(RuleStatus.ACTIVE) - .withDestination(new PrivateEndpointDestination().withServiceResourceId("zvoikvntwczf") - .withSparkEnabled(true) - .withSparkStatus(RuleStatus.ACTIVE) - .withSubresourceTarget("cxpblalhhezpfk")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointOutboundRule.class); - Assertions.assertEquals(RuleCategory.REQUIRED, model.category()); - Assertions.assertEquals(RuleStatus.ACTIVE, model.status()); - Assertions.assertEquals("zvoikvntwczf", model.destination().serviceResourceId()); - Assertions.assertEquals(true, model.destination().sparkEnabled()); - Assertions.assertEquals(RuleStatus.ACTIVE, model.destination().sparkStatus()); - Assertions.assertEquals("cxpblalhhezpfk", model.destination().subresourceTarget()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointResourceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointResourceTests.java deleted file mode 100644 index ce553461500d9..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointResourceTests.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.PrivateEndpointResource; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointResource model = BinaryData.fromString("{\"subnetArmId\":\"ekvz\",\"id\":\"xyxhighctxbxmo\"}") - .toObject(PrivateEndpointResource.class); - Assertions.assertEquals("ekvz", model.subnetArmId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointResource model = new PrivateEndpointResource().withSubnetArmId("ekvz"); - model = BinaryData.fromObject(model).toObject(PrivateEndpointResource.class); - Assertions.assertEquals("ekvz", model.subnetArmId()); - } -} 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 50da88517abcd..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointTests.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.PrivateEndpoint; - -public final class PrivateEndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpoint model = BinaryData.fromString("{\"id\":\"jbasvmsmjqulngs\"}").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 94f876895e588..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourceListResultInnerTests.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.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 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 PrivateLinkResourceListResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceListResultInner model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"groupId\":\"kxbpvj\",\"requiredMembers\":[\"hx\",\"j\"],\"requiredZoneNames\":[\"u\",\"ivkrtsw\",\"xqzvszjfa\",\"vjfdx\"]},\"identity\":{\"principalId\":\"cde7106e-f687-457b-953d-160358a98cb8\",\"tenantId\":\"b2a0392a-e179-4547-bb44-cbac7877dc8e\",\"type\":\"None\",\"userAssignedIdentities\":{\"aqtdoqmcbx\":{\"principalId\":\"9389f316-753e-4d08-a143-e831c8706855\",\"clientId\":\"71473aad-896e-43bb-905c-9f8590405541\"}}},\"location\":\"vxysl\",\"tags\":{\"tkblmpewww\":\"sfxobl\",\"hxcr\":\"bkrvrnsvshqj\",\"sub\":\"bfovasrruvwbhsq\"},\"sku\":{\"name\":\"jbi\",\"tier\":\"Standard\",\"size\":\"ybsrfbjfdtwss\",\"family\":\"ftpvjzbexil\",\"capacity\":1948356330},\"id\":\"qqnvwpmq\",\"name\":\"aruoujmkcjhwqyt\",\"type\":\"r\"},{\"properties\":{\"groupId\":\"wj\",\"requiredMembers\":[\"drjervnaenqpehin\",\"oygmift\",\"nzdndslgna\",\"qig\"],\"requiredZoneNames\":[\"uhavhql\",\"thuma\",\"olbgycduiertgccy\"]},\"identity\":{\"principalId\":\"8910f182-37ab-4413-a0c8-0ba60bcbc8e4\",\"tenantId\":\"7b8f494f-ab18-4c0a-b288-eec3e51f7ffd\",\"type\":\"None\",\"userAssignedIdentities\":{\"qlfmmdnbb\":{\"principalId\":\"c00154c9-b7bd-4a3e-8175-9d4a4d3a953e\",\"clientId\":\"52ebf4da-e9ed-4098-9312-15cbc1e98be0\"}}},\"location\":\"zpswiydmc\",\"tags\":{\"dbzm\":\"zdxss\",\"cblylpstdbhhxsr\":\"vdfznudaodvxzb\",\"erscdntne\":\"dzu\"},\"sku\":{\"name\":\"iwjmygtdssls\",\"tier\":\"Standard\",\"size\":\"eriofzpyqs\",\"family\":\"wab\",\"capacity\":334511461},\"id\":\"hhszh\",\"name\":\"d\",\"type\":\"lvwiwubmwmbesl\"}]}") - .toObject(PrivateLinkResourceListResultInner.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).identity().type()); - Assertions.assertEquals("vxysl", model.value().get(0).location()); - Assertions.assertEquals("sfxobl", model.value().get(0).tags().get("tkblmpewww")); - Assertions.assertEquals("jbi", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.value().get(0).sku().tier()); - Assertions.assertEquals("ybsrfbjfdtwss", model.value().get(0).sku().size()); - Assertions.assertEquals("ftpvjzbexil", model.value().get(0).sku().family()); - Assertions.assertEquals(1948356330, model.value().get(0).sku().capacity()); - Assertions.assertEquals("u", model.value().get(0).requiredZoneNames().get(0)); - } - - @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("aqtdoqmcbx", new UserAssignedIdentity()))) - .withLocation("vxysl") - .withTags(mapOf("tkblmpewww", "sfxobl", "hxcr", "bkrvrnsvshqj", "sub", "bfovasrruvwbhsq")) - .withSku(new Sku().withName("jbi") - .withTier(SkuTier.STANDARD) - .withSize("ybsrfbjfdtwss") - .withFamily("ftpvjzbexil") - .withCapacity(1948356330)) - .withRequiredZoneNames(Arrays.asList("u", "ivkrtsw", "xqzvszjfa", "vjfdx")), - new PrivateLinkResource() - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("qlfmmdnbb", new UserAssignedIdentity()))) - .withLocation("zpswiydmc") - .withTags(mapOf("dbzm", "zdxss", "cblylpstdbhhxsr", "vdfznudaodvxzb", "erscdntne", "dzu")) - .withSku(new Sku().withName("iwjmygtdssls") - .withTier(SkuTier.STANDARD) - .withSize("eriofzpyqs") - .withFamily("wab") - .withCapacity(334511461)) - .withRequiredZoneNames(Arrays.asList("uhavhql", "thuma", "olbgycduiertgccy")))); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceListResultInner.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).identity().type()); - Assertions.assertEquals("vxysl", model.value().get(0).location()); - Assertions.assertEquals("sfxobl", model.value().get(0).tags().get("tkblmpewww")); - Assertions.assertEquals("jbi", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.value().get(0).sku().tier()); - Assertions.assertEquals("ybsrfbjfdtwss", model.value().get(0).sku().size()); - Assertions.assertEquals("ftpvjzbexil", model.value().get(0).sku().family()); - Assertions.assertEquals(1948356330, model.value().get(0).sku().capacity()); - Assertions.assertEquals("u", model.value().get(0).requiredZoneNames().get(0)); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 36fe9848a3d58..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcePropertiesTests.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.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\":\"thhqzonosggbh\",\"requiredMembers\":[\"fwdsj\",\"ka\",\"jutiiswacff\",\"dkzzewkfvhqcrail\"],\"requiredZoneNames\":[\"ppfufl\"]}") - .toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("ppfufl", model.requiredZoneNames().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceProperties model - = new PrivateLinkResourceProperties().withRequiredZoneNames(Arrays.asList("ppfufl")); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("ppfufl", 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 79c2e7a3d5cd8..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourceTests.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.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\":\"wwtppj\",\"requiredMembers\":[\"xogaokonzmnsikv\",\"kqze\",\"qkdltfz\"],\"requiredZoneNames\":[\"hvhgureod\"]},\"identity\":{\"principalId\":\"9eb4de2f-2936-4ce9-bfcb-51753865ab56\",\"tenantId\":\"5cb1d814-ce28-4b4e-a521-655c27e49a54\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"ibqdxbxwakbogqx\":{\"principalId\":\"2d8983b7-a94d-48ba-8033-fb5e3622a7bc\",\"clientId\":\"64112d18-bb2c-428e-9638-6bfe894358b5\"},\"kzgxhurip\":{\"principalId\":\"e1c99087-fdd9-49ae-a341-3cb33dee1c63\",\"clientId\":\"02595fad-a21b-4b70-8bd2-dfb910f6c28e\"},\"odxun\":{\"principalId\":\"21ece6e7-4d85-4a6a-ba42-66f87b4a01be\",\"clientId\":\"98117997-e51b-4a84-bbf6-d1ddacc7aae9\"}}},\"location\":\"ebxmubyynt\",\"tags\":{\"ltmuwlauwzizx\":\"bqtkoievseotgqr\",\"d\":\"mpgcjefuzmuvpbt\"},\"sku\":{\"name\":\"orppxebmnzbtb\",\"tier\":\"Basic\",\"size\":\"lkfg\",\"family\":\"dneu\",\"capacity\":2052379315},\"id\":\"hsd\",\"name\":\"htozfikdow\",\"type\":\"quuvxzxcl\"}") - .toObject(PrivateLinkResource.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("ebxmubyynt", model.location()); - Assertions.assertEquals("bqtkoievseotgqr", model.tags().get("ltmuwlauwzizx")); - Assertions.assertEquals("orppxebmnzbtb", model.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); - Assertions.assertEquals("lkfg", model.sku().size()); - Assertions.assertEquals("dneu", model.sku().family()); - Assertions.assertEquals(2052379315, model.sku().capacity()); - Assertions.assertEquals("hvhgureod", 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("ibqdxbxwakbogqx", new UserAssignedIdentity(), "kzgxhurip", - new UserAssignedIdentity(), "odxun", new UserAssignedIdentity()))) - .withLocation("ebxmubyynt") - .withTags(mapOf("ltmuwlauwzizx", "bqtkoievseotgqr", "d", "mpgcjefuzmuvpbt")) - .withSku(new Sku().withName("orppxebmnzbtb") - .withTier(SkuTier.BASIC) - .withSize("lkfg") - .withFamily("dneu") - .withCapacity(2052379315)) - .withRequiredZoneNames(Arrays.asList("hvhgureod")); - model = BinaryData.fromObject(model).toObject(PrivateLinkResource.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("ebxmubyynt", model.location()); - Assertions.assertEquals("bqtkoievseotgqr", model.tags().get("ltmuwlauwzizx")); - Assertions.assertEquals("orppxebmnzbtb", model.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); - Assertions.assertEquals("lkfg", model.sku().size()); - Assertions.assertEquals("dneu", model.sku().family()); - Assertions.assertEquals(2052379315, model.sku().capacity()); - Assertions.assertEquals("hvhgureod", model.requiredZoneNames().get(0)); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 e07beb8d71872..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcesListWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkResourceListResult; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class PrivateLinkResourcesListWithResponseMockTests { - @Test - public void testListWithResponse() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"groupId\":\"r\",\"requiredMembers\":[\"tuwcimtcaumv\",\"udzpsjqrmlujmt\"],\"requiredZoneNames\":[\"ofwuzeb\",\"qvmpjb\",\"zyenfspet\",\"eudwkhdlckdoxocj\"]},\"identity\":{\"principalId\":\"c2c4d25f-b219-4531-a6e4-818157aa4f04\",\"tenantId\":\"c501f775-2837-49de-9b64-4e272ec688dc\",\"type\":\"None\",\"userAssignedIdentities\":{\"reortwwyj\":{}}},\"location\":\"vrlhfxmrhjn\",\"tags\":{\"ksz\":\"cjywkdy\",\"l\":\"vuafanefictpt\",\"z\":\"ossj\",\"aczhfjdccjn\":\"xpzwdqzuhfgt\"},\"sku\":{\"name\":\"vbtcuhjcgjtjknt\",\"tier\":\"Free\",\"size\":\"zthcdbszsbz\",\"family\":\"xeyvidcowlrm\",\"capacity\":1231342742},\"id\":\"qxave\",\"name\":\"oezvwk\",\"type\":\"yzgavplnd\"},{\"properties\":{\"groupId\":\"iekkiskyyyaekn\",\"requiredMembers\":[\"yshdawjlmlcufb\"],\"requiredZoneNames\":[\"utfofhoajjyl\",\"yqyjnufzvl\",\"quyhbceev\",\"girrpwnqtvuxeuj\"]},\"identity\":{\"principalId\":\"30b6d8a5-0e82-4c35-a462-17f3051a784a\",\"tenantId\":\"0d41d391-86be-4578-8ab2-a8d30a81fb4f\",\"type\":\"None\",\"userAssignedIdentities\":{\"axxfdlypkcpw\":{}}},\"location\":\"qnnmjundt\",\"tags\":{\"ycgqakcsihxvt\":\"ltjhb\",\"yxnsbubwh\":\"cwwfopxp\",\"mkdhwqcqweba\":\"qqgugwluxahtq\"},\"sku\":{\"name\":\"fpkeph\",\"tier\":\"Basic\",\"size\":\"c\",\"family\":\"vkke\",\"capacity\":2073355838},\"id\":\"ypaxpjp\",\"name\":\"illgnu\",\"type\":\"ezfpffbuqxkn\"},{\"properties\":{\"groupId\":\"g\",\"requiredMembers\":[\"zyojfch\",\"cp\",\"rexzoksgq\",\"boojuxi\"],\"requiredZoneNames\":[\"blkcrfldfljw\",\"kbptsfl\"]},\"identity\":{\"principalId\":\"746eeafd-ab8f-483b-ad9d-7f168c0be033\",\"tenantId\":\"68f87143-478c-4e61-be0b-badd152065e0\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"gftshfgmuxuqiags\":{},\"oikuqirhsk\":{},\"paowkgvnlfueyxfz\":{},\"brlrjugcfebpi\":{}}},\"location\":\"enbvrllldfknb\",\"tags\":{\"i\":\"ilsxr\"},\"sku\":{\"name\":\"zlwrduxntpfxxgj\",\"tier\":\"Basic\",\"size\":\"fwfctqvey\",\"family\":\"kqynlzxeme\",\"capacity\":1938054109},\"id\":\"ckiehdmvfoyr\",\"name\":\"xxffgmcuanszeerv\",\"type\":\"cgcsapvbcqpf\"},{\"properties\":{\"groupId\":\"kijhmine\",\"requiredMembers\":[\"ivp\",\"rkvorlfqmljewyn\",\"fvvcwvurkmjufa\"],\"requiredZoneNames\":[\"npbsotmynklnm\",\"znmtvrk\",\"fcwxizk\",\"txneykeip\"]},\"identity\":{\"principalId\":\"d4142576-befe-4200-bae4-e1a584382841\",\"tenantId\":\"a22ed680-6d49-4b25-86a6-151508e3bb4f\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"iuvnfaz\":{},\"tvsayyaeiiv\":{},\"qk\":{}}},\"location\":\"jwrvewojoqfxqetx\",\"tags\":{\"uzljvgjijzqj\":\"iusp\",\"hcmecags\":\"ljsazmjsisfq\"},\"sku\":{\"name\":\"eiirpnjygllfkchh\",\"tier\":\"Free\",\"size\":\"zzcajl\",\"family\":\"qcycabaa\",\"capacity\":1883254200},\"id\":\"dhpmkxdujkxpuqzd\",\"name\":\"oqywsuarpzhryh\",\"type\":\"zx\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("lqcw", "zhndqkzstzpzec", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.value().get(0).identity().type()); - Assertions.assertEquals("vrlhfxmrhjn", response.value().get(0).location()); - Assertions.assertEquals("cjywkdy", response.value().get(0).tags().get("ksz")); - Assertions.assertEquals("vbtcuhjcgjtjknt", response.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.FREE, response.value().get(0).sku().tier()); - Assertions.assertEquals("zthcdbszsbz", response.value().get(0).sku().size()); - Assertions.assertEquals("xeyvidcowlrm", response.value().get(0).sku().family()); - Assertions.assertEquals(1231342742, response.value().get(0).sku().capacity()); - Assertions.assertEquals("ofwuzeb", response.value().get(0).requiredZoneNames().get(0)); - } -} 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 42f3e70689976..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkServiceConnectionStateTests.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.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\":\"ybkzgcwr\",\"actionsRequired\":\"lxxwrljdouskc\"}") - .toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.DISCONNECTED, model.status()); - Assertions.assertEquals("ybkzgcwr", model.description()); - Assertions.assertEquals("lxxwrljdouskc", model.actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkServiceConnectionState model - = new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.DISCONNECTED) - .withDescription("ybkzgcwr") - .withActionsRequired("lxxwrljdouskc"); - model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.DISCONNECTED, model.status()); - Assertions.assertEquals("ybkzgcwr", model.description()); - Assertions.assertEquals("lxxwrljdouskc", 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 350b3951542d9..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ProbeSettingsTests.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.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\":1074790994,\"successThreshold\":190325570,\"timeout\":\"PT185H38M37S\",\"period\":\"PT155H32M4S\",\"initialDelay\":\"PT161H44M50S\"}") - .toObject(ProbeSettings.class); - Assertions.assertEquals(1074790994, model.failureThreshold()); - Assertions.assertEquals(190325570, model.successThreshold()); - Assertions.assertEquals(Duration.parse("PT185H38M37S"), model.timeout()); - Assertions.assertEquals(Duration.parse("PT155H32M4S"), model.period()); - Assertions.assertEquals(Duration.parse("PT161H44M50S"), model.initialDelay()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProbeSettings model = new ProbeSettings().withFailureThreshold(1074790994) - .withSuccessThreshold(190325570) - .withTimeout(Duration.parse("PT185H38M37S")) - .withPeriod(Duration.parse("PT155H32M4S")) - .withInitialDelay(Duration.parse("PT161H44M50S")); - model = BinaryData.fromObject(model).toObject(ProbeSettings.class); - Assertions.assertEquals(1074790994, model.failureThreshold()); - Assertions.assertEquals(190325570, model.successThreshold()); - Assertions.assertEquals(Duration.parse("PT185H38M37S"), model.timeout()); - Assertions.assertEquals(Duration.parse("PT155H32M4S"), model.period()); - Assertions.assertEquals(Duration.parse("PT161H44M50S"), model.initialDelay()); - } -} 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 fc850da3cbe4a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PyTorchTests.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.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\":409553371}") - .toObject(PyTorch.class); - Assertions.assertEquals(409553371, model.processCountPerInstance()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PyTorch model = new PyTorch().withProcessCountPerInstance(409553371); - model = BinaryData.fromObject(model).toObject(PyTorch.class); - Assertions.assertEquals(409553371, model.processCountPerInstance()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QueueSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QueueSettingsTests.java deleted file mode 100644 index b2b0a2ec8fb1c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QueueSettingsTests.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.JobTier; -import com.azure.resourcemanager.machinelearning.models.QueueSettings; -import org.junit.jupiter.api.Assertions; - -public final class QueueSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - QueueSettings model = BinaryData.fromString("{\"jobTier\":\"Spot\"}").toObject(QueueSettings.class); - Assertions.assertEquals(JobTier.SPOT, model.jobTier()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - QueueSettings model = new QueueSettings().withJobTier(JobTier.SPOT); - model = BinaryData.fromObject(model).toObject(QueueSettings.class); - Assertions.assertEquals(JobTier.SPOT, model.jobTier()); - } -} 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 32b7429c18b11..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotaBasePropertiesTests.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.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\":\"rbnlankxmyskp\",\"type\":\"enbtkcxywny\",\"limit\":3938572142149816322,\"unit\":\"Count\"}") - .toObject(QuotaBaseProperties.class); - Assertions.assertEquals("rbnlankxmyskp", model.id()); - Assertions.assertEquals("enbtkcxywny", model.type()); - Assertions.assertEquals(3938572142149816322L, model.limit()); - Assertions.assertEquals(QuotaUnit.COUNT, model.unit()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - QuotaBaseProperties model = new QuotaBaseProperties().withId("rbnlankxmyskp") - .withType("enbtkcxywny") - .withLimit(3938572142149816322L) - .withUnit(QuotaUnit.COUNT); - model = BinaryData.fromObject(model).toObject(QuotaBaseProperties.class); - Assertions.assertEquals("rbnlankxmyskp", model.id()); - Assertions.assertEquals("enbtkcxywny", model.type()); - Assertions.assertEquals(3938572142149816322L, 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 2e061f125401c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotaUpdateParametersTests.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.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\":\"zpuzycisp\",\"type\":\"zahmgkbrpyydhibn\",\"limit\":8775255286630911729,\"unit\":\"Count\"},{\"id\":\"a\",\"type\":\"gvtqagnbuynh\",\"limit\":2182211353058323076,\"unit\":\"Count\"},{\"id\":\"fsiarbutr\",\"type\":\"pnazzm\",\"limit\":4980695192319165499,\"unit\":\"Count\"}],\"location\":\"xttd\"}") - .toObject(QuotaUpdateParameters.class); - Assertions.assertEquals("zpuzycisp", model.value().get(0).id()); - Assertions.assertEquals("zahmgkbrpyydhibn", model.value().get(0).type()); - Assertions.assertEquals(8775255286630911729L, model.value().get(0).limit()); - Assertions.assertEquals(QuotaUnit.COUNT, model.value().get(0).unit()); - Assertions.assertEquals("xttd", model.location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - QuotaUpdateParameters model = new QuotaUpdateParameters().withValue(Arrays.asList( - new QuotaBaseProperties().withId("zpuzycisp") - .withType("zahmgkbrpyydhibn") - .withLimit(8775255286630911729L) - .withUnit(QuotaUnit.COUNT), - new QuotaBaseProperties().withId("a") - .withType("gvtqagnbuynh") - .withLimit(2182211353058323076L) - .withUnit(QuotaUnit.COUNT), - new QuotaBaseProperties().withId("fsiarbutr") - .withType("pnazzm") - .withLimit(4980695192319165499L) - .withUnit(QuotaUnit.COUNT))) - .withLocation("xttd"); - model = BinaryData.fromObject(model).toObject(QuotaUpdateParameters.class); - Assertions.assertEquals("zpuzycisp", model.value().get(0).id()); - Assertions.assertEquals("zahmgkbrpyydhibn", model.value().get(0).type()); - Assertions.assertEquals(8775255286630911729L, model.value().get(0).limit()); - Assertions.assertEquals(QuotaUnit.COUNT, model.value().get(0).unit()); - Assertions.assertEquals("xttd", 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 b9e3ccc598434..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotasListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ResourceQuota; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class QuotasListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"id\":\"wozfvza\",\"amlWorkspaceLocation\":\"pcvqgxcvwioqh\",\"type\":\"cgmlmpn\",\"name\":{\"value\":\"uyiarznhdqseyp\",\"localizedValue\":\"majpuyxoafrmzgcc\"},\"limit\":5156431097423162014,\"unit\":\"Count\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("spt", 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 5efbb2da23981..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotasUpdateWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.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.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class QuotasUpdateWithResponseMockTests { - @Test - public void testUpdateWithResponse() throws Exception { - String responseStr - = "{\"value\":[{\"id\":\"mabvbmnhtwofxf\",\"type\":\"lvyqnslbqrm\",\"limit\":7940166137323106740,\"unit\":\"Count\",\"status\":\"InvalidVMFamilyName\"}],\"nextLink\":\"qqrugwespscvs\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("fpabwbpzgfg", - new QuotaUpdateParameters().withValue(Arrays.asList( - new QuotaBaseProperties().withId("hgxg") - .withType("abbfpxxa") - .withLimit(1299606997550791380L) - .withUnit(QuotaUnit.COUNT), - new QuotaBaseProperties().withId("sn") - .withType("wyxjsfmaxcebnbeo") - .withLimit(1045545946093333961L) - .withUnit(QuotaUnit.COUNT), - new QuotaBaseProperties().withId("rwqxpjpvem") - .withType("kh") - .withLimit(2148479321953315144L) - .withUnit(QuotaUnit.COUNT))) - .withLocation("zmhytebjkjgee"), - 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 045276e071e06..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RandomSamplingAlgorithmTests.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.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\",\"seed\":1840024509,\"rule\":\"Random\"}") - .toObject(RandomSamplingAlgorithm.class); - Assertions.assertEquals(1840024509, model.seed()); - Assertions.assertEquals(RandomSamplingAlgorithmRule.RANDOM, model.rule()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RandomSamplingAlgorithm model - = new RandomSamplingAlgorithm().withSeed(1840024509).withRule(RandomSamplingAlgorithmRule.RANDOM); - model = BinaryData.fromObject(model).toObject(RandomSamplingAlgorithm.class); - Assertions.assertEquals(1840024509, model.seed()); - Assertions.assertEquals(RandomSamplingAlgorithmRule.RANDOM, model.rule()); - } -} 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 8293869fbbe09..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceScheduleTests.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.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\":[537279980,2138808813],\"minutes\":[1334431850,380454527],\"weekDays\":[\"Friday\",\"Saturday\",\"Friday\",\"Wednesday\"],\"monthDays\":[1634353731]}") - .toObject(RecurrenceSchedule.class); - Assertions.assertEquals(537279980, model.hours().get(0)); - Assertions.assertEquals(1334431850, model.minutes().get(0)); - Assertions.assertEquals(WeekDay.FRIDAY, model.weekDays().get(0)); - Assertions.assertEquals(1634353731, model.monthDays().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecurrenceSchedule model = new RecurrenceSchedule().withHours(Arrays.asList(537279980, 2138808813)) - .withMinutes(Arrays.asList(1334431850, 380454527)) - .withWeekDays(Arrays.asList(WeekDay.FRIDAY, WeekDay.SATURDAY, WeekDay.FRIDAY, WeekDay.WEDNESDAY)) - .withMonthDays(Arrays.asList(1634353731)); - model = BinaryData.fromObject(model).toObject(RecurrenceSchedule.class); - Assertions.assertEquals(537279980, model.hours().get(0)); - Assertions.assertEquals(1334431850, model.minutes().get(0)); - Assertions.assertEquals(WeekDay.FRIDAY, model.weekDays().get(0)); - Assertions.assertEquals(1634353731, model.monthDays().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceTests.java deleted file mode 100644 index 92e56ac57e45a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceTests.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.ComputeRecurrenceFrequency; -import com.azure.resourcemanager.machinelearning.models.ComputeRecurrenceSchedule; -import com.azure.resourcemanager.machinelearning.models.ComputeWeekDay; -import com.azure.resourcemanager.machinelearning.models.Recurrence; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RecurrenceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Recurrence model = BinaryData.fromString( - "{\"frequency\":\"Minute\",\"interval\":782951006,\"startTime\":\"ecf\",\"timeZone\":\"hagxsure\",\"schedule\":{\"hours\":[906252863,1130901316,1113850599,58048223],\"minutes\":[164034055,953722289],\"monthDays\":[1328602727,1389187624,813655099],\"weekDays\":[\"Tuesday\"]}}") - .toObject(Recurrence.class); - Assertions.assertEquals(ComputeRecurrenceFrequency.MINUTE, model.frequency()); - Assertions.assertEquals(782951006, model.interval()); - Assertions.assertEquals("ecf", model.startTime()); - Assertions.assertEquals("hagxsure", model.timeZone()); - Assertions.assertEquals(906252863, model.schedule().hours().get(0)); - Assertions.assertEquals(164034055, model.schedule().minutes().get(0)); - Assertions.assertEquals(1328602727, model.schedule().monthDays().get(0)); - Assertions.assertEquals(ComputeWeekDay.TUESDAY, model.schedule().weekDays().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Recurrence model - = new Recurrence().withFrequency(ComputeRecurrenceFrequency.MINUTE) - .withInterval(782951006) - .withStartTime("ecf") - .withTimeZone("hagxsure") - .withSchedule(new ComputeRecurrenceSchedule() - .withHours(Arrays.asList(906252863, 1130901316, 1113850599, 58048223)) - .withMinutes(Arrays.asList(164034055, 953722289)) - .withMonthDays(Arrays.asList(1328602727, 1389187624, 813655099)) - .withWeekDays(Arrays.asList(ComputeWeekDay.TUESDAY))); - model = BinaryData.fromObject(model).toObject(Recurrence.class); - Assertions.assertEquals(ComputeRecurrenceFrequency.MINUTE, model.frequency()); - Assertions.assertEquals(782951006, model.interval()); - Assertions.assertEquals("ecf", model.startTime()); - Assertions.assertEquals("hagxsure", model.timeZone()); - Assertions.assertEquals(906252863, model.schedule().hours().get(0)); - Assertions.assertEquals(164034055, model.schedule().minutes().get(0)); - Assertions.assertEquals(1328602727, model.schedule().monthDays().get(0)); - Assertions.assertEquals(ComputeWeekDay.TUESDAY, model.schedule().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 8d1101bc86eb8..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceTriggerTests.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.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\":\"Week\",\"interval\":875349489,\"schedule\":{\"hours\":[2010585731,1159894455,1470565403,964360782],\"minutes\":[213294039,384841052,1302563571,1151725969],\"weekDays\":[\"Thursday\",\"Sunday\",\"Sunday\"],\"monthDays\":[491471659]},\"endTime\":\"qagnepzwakl\",\"startTime\":\"sbq\",\"timeZone\":\"agwwrxaom\"}") - .toObject(RecurrenceTrigger.class); - Assertions.assertEquals("qagnepzwakl", model.endTime()); - Assertions.assertEquals("sbq", model.startTime()); - Assertions.assertEquals("agwwrxaom", model.timeZone()); - Assertions.assertEquals(RecurrenceFrequency.WEEK, model.frequency()); - Assertions.assertEquals(875349489, model.interval()); - Assertions.assertEquals(2010585731, model.schedule().hours().get(0)); - Assertions.assertEquals(213294039, model.schedule().minutes().get(0)); - Assertions.assertEquals(WeekDay.THURSDAY, model.schedule().weekDays().get(0)); - Assertions.assertEquals(491471659, model.schedule().monthDays().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecurrenceTrigger model = new RecurrenceTrigger().withEndTime("qagnepzwakl") - .withStartTime("sbq") - .withTimeZone("agwwrxaom") - .withFrequency(RecurrenceFrequency.WEEK) - .withInterval(875349489) - .withSchedule( - new RecurrenceSchedule().withHours(Arrays.asList(2010585731, 1159894455, 1470565403, 964360782)) - .withMinutes(Arrays.asList(213294039, 384841052, 1302563571, 1151725969)) - .withWeekDays(Arrays.asList(WeekDay.THURSDAY, WeekDay.SUNDAY, WeekDay.SUNDAY)) - .withMonthDays(Arrays.asList(491471659))); - model = BinaryData.fromObject(model).toObject(RecurrenceTrigger.class); - Assertions.assertEquals("qagnepzwakl", model.endTime()); - Assertions.assertEquals("sbq", model.startTime()); - Assertions.assertEquals("agwwrxaom", model.timeZone()); - Assertions.assertEquals(RecurrenceFrequency.WEEK, model.frequency()); - Assertions.assertEquals(875349489, model.interval()); - Assertions.assertEquals(2010585731, model.schedule().hours().get(0)); - Assertions.assertEquals(213294039, model.schedule().minutes().get(0)); - Assertions.assertEquals(WeekDay.THURSDAY, model.schedule().weekDays().get(0)); - Assertions.assertEquals(491471659, model.schedule().monthDays().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesCreateOrUpdateMockTests.java deleted file mode 100644 index e2f0171da50fb..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesCreateOrUpdateMockTests.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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.AcrDetails; -import com.azure.resourcemanager.machinelearning.models.ArmResourceId; -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.Registry; -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.UserAssignedIdentity; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistriesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"identity\":{\"principalId\":\"6ee93217-e9d7-4d7b-aa0d-ee6c95ebe873\",\"tenantId\":\"d3caa03c-7ba5-40c6-b748-a12e0d7ce54f\",\"type\":\"None\",\"userAssignedIdentities\":{\"ipbfs\":{\"principalId\":\"9346226d-6fd3-48a9-ba8f-b396b9cd6110\",\"clientId\":\"3a469d8a-9d56-4fad-99e7-584e1caf3b6b\"},\"lpevz\":{\"principalId\":\"826fbdbc-4b21-4613-9024-b94580be4643\",\"clientId\":\"a1dc4284-ef51-4281-a1ed-c7cda56ec657\"},\"dnok\":{\"principalId\":\"e249e80b-2a8c-46e3-86d0-b4df35070384\",\"clientId\":\"6bc9d10d-8e0d-4c99-9354-1a342de26690\"},\"iecjyftsne\":{\"principalId\":\"43c287fd-0a04-4088-a830-3b60163701fe\",\"clientId\":\"c94a19bb-054e-49db-8dcf-ce41b6783a7e\"}}},\"kind\":\"z\",\"properties\":{\"discoveryUrl\":\"jclaqxx\",\"intellectualPropertyPublisher\":\"q\",\"managedResourceGroup\":{\"resourceId\":\"pdsuyywnaq\"},\"mlFlowRegistryUri\":\"oxuh\",\"registryPrivateEndpointConnections\":[{\"id\":\"dfzcnylzwlhuf\",\"location\":\"cpwrtgtdegf\",\"properties\":{\"groupIds\":[\"ptbiuikp\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"fecxvkqjpov\"}},{\"id\":\"vxpsnrew\",\"location\":\"mhjmqf\",\"properties\":{\"groupIds\":[\"cxyiqppacjiqrlla\",\"ylbtkxei\",\"zgn\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"ttexaugoj\"}}],\"publicNetworkAccess\":\"jezr\",\"regionDetails\":[{\"acrDetails\":[{},{},{},{}],\"location\":\"lnt\",\"storageAccountDetails\":[{}]}]},\"sku\":{\"name\":\"qtvxghbe\",\"tier\":\"Premium\",\"size\":\"otqorrvwlce\",\"family\":\"lyugzl\",\"capacity\":977804529},\"location\":\"rj\",\"tags\":{\"gevjman\":\"syfdsgrtkevimru\",\"vtzdtwxfjlpkoc\":\"rvvjoklb\",\"uvwlfzjrjgla\":\"exfmqfuflu\"},\"id\":\"pzgzscg\",\"name\":\"lwuj\",\"type\":\"ey\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Registry response = manager.registries() - .define("esetutqjsojw") - .withRegion("khqhvktcztmqdkh") - .withExistingResourceGroup("kz") - .withTags(mapOf("xxxqfrntzbhmx", "pkgxemvlyaprjz", "smyvvfapfbm", "pxfauvgtoino", "knefcoopt", "w", - "gupiosibg", "dspdd")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf("tzcmag", new UserAssignedIdentity(), "jka", new UserAssignedIdentity()))) - .withKind("qh") - .withSku(new Sku().withName("ckgqa") - .withTier(SkuTier.PREMIUM) - .withSize("szwoeqljlwfq") - .withFamily("yww") - .withCapacity(1125483488)) - .withDiscoveryUrl("wqhz") - .withIntellectualPropertyPublisher("gmg") - .withManagedResourceGroup(new ArmResourceId().withResourceId("mtywivbuiteed")) - .withMlFlowRegistryUri("klv") - .withRegistryPrivateEndpointConnections( - Arrays.asList(new RegistryPrivateEndpointConnection().withId("ykwbhzs") - .withLocation("djitlqxpsnnnxhgd") - .withGroupIds(Arrays.asList("ylnd")) - .withPrivateEndpoint(new PrivateEndpointResource()) - .withRegistryPrivateLinkServiceConnectionState(new RegistryPrivateLinkServiceConnectionState()) - .withProvisioningState("cjkqjzfzkhdnp"))) - .withPublicNetworkAccess("rxjdfkqlkaipfyvq") - .withRegionDetails(Arrays.asList( - new RegistryRegionArmDetails().withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails())) - .withLocation("kbiekyvak") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails(), new StorageAccountDetails(), - new StorageAccountDetails(), new StorageAccountDetails())), - new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails(), new AcrDetails())) - .withLocation("napkpaied") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails(), new StorageAccountDetails(), - new StorageAccountDetails(), new StorageAccountDetails())), - new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails(), new AcrDetails())) - .withLocation("avezwclmzmlr") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails(), new StorageAccountDetails(), - new StorageAccountDetails())), - new RegistryRegionArmDetails().withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails())) - .withLocation("cdiqhvhcbukawifz") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails())))) - .create(); - - Assertions.assertEquals("rj", response.location()); - Assertions.assertEquals("syfdsgrtkevimru", response.tags().get("gevjman")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.identity().type()); - Assertions.assertEquals("z", response.kind()); - Assertions.assertEquals("qtvxghbe", response.sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, response.sku().tier()); - Assertions.assertEquals("otqorrvwlce", response.sku().size()); - Assertions.assertEquals("lyugzl", response.sku().family()); - Assertions.assertEquals(977804529, response.sku().capacity()); - Assertions.assertEquals("jclaqxx", response.discoveryUrl()); - Assertions.assertEquals("q", response.intellectualPropertyPublisher()); - Assertions.assertEquals("pdsuyywnaq", response.managedResourceGroup().resourceId()); - Assertions.assertEquals("oxuh", response.mlFlowRegistryUri()); - Assertions.assertEquals("dfzcnylzwlhuf", response.registryPrivateEndpointConnections().get(0).id()); - Assertions.assertEquals("cpwrtgtdegf", response.registryPrivateEndpointConnections().get(0).location()); - Assertions.assertEquals("ptbiuikp", response.registryPrivateEndpointConnections().get(0).groupIds().get(0)); - Assertions.assertEquals("fecxvkqjpov", - response.registryPrivateEndpointConnections().get(0).provisioningState()); - Assertions.assertEquals("jezr", response.publicNetworkAccess()); - Assertions.assertEquals("lnt", response.regionDetails().get(0).location()); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesDeleteMockTests.java deleted file mode 100644 index a76db0c43c87f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistriesDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.registries().delete("pbzq", "wt", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesGetByResourceGroupWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index e3aeed6b68923..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesGetByResourceGroupWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.Registry; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistriesGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - String responseStr - = "{\"identity\":{\"principalId\":\"a7071b3b-b806-497e-bfd7-2ac105393f1c\",\"tenantId\":\"49c155e9-9045-4aeb-be87-49493366cba6\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"joor\":{\"principalId\":\"27009e2d-54e5-4967-8c68-3b88488c9ac0\",\"clientId\":\"7c451233-5a71-472f-9b8c-9aff026396e2\"},\"hbcckbcvt\":{\"principalId\":\"8b223669-6af3-4c56-924e-29951efcb15d\",\"clientId\":\"18a3838c-7a4d-4a93-8298-109bb89d3e9c\"},\"drma\":{\"principalId\":\"e694df81-8179-4684-822b-23f42707ef88\",\"clientId\":\"36a7ab34-b5b1-43b9-b697-ecef11a8a356\"},\"hph\":{\"principalId\":\"da92e77f-b865-4d39-85a5-d6accf3b74cc\",\"clientId\":\"e39aeec4-76f0-43c9-ba50-bf30d61d1ab7\"}}},\"kind\":\"kquhmblnismviaa\",\"properties\":{\"discoveryUrl\":\"exsrglxljuyv\",\"intellectualPropertyPublisher\":\"povzespdip\",\"managedResourceGroup\":{\"resourceId\":\"npdjomd\"},\"mlFlowRegistryUri\":\"dwosjxywwvilkyht\",\"registryPrivateEndpointConnections\":[{\"id\":\"hdbbjgsjm\",\"location\":\"brpwj\",\"properties\":{\"groupIds\":[\"tkghrrxauuhdkh\",\"izyxoyxnhub\",\"wip\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"vp\"}},{\"id\":\"zyrpdxygfpqxseme\",\"location\":\"pdmm\",\"properties\":{\"groupIds\":[\"frqebrjopotefe\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"gjywwidn\"}},{\"id\":\"sdkvhuiadyho\",\"location\":\"sypgapfdwhw\",\"properties\":{\"groupIds\":[\"okuqnk\",\"skfl\",\"j\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"jeevmbhemr\"}},{\"id\":\"zetsspww\",\"location\":\"botbrepefrli\",\"properties\":{\"groupIds\":[\"yar\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"gcsco\"}}],\"publicNetworkAccess\":\"fsgilwisqxzpz\",\"regionDetails\":[{\"acrDetails\":[{}],\"location\":\"trfvogknocshmp\",\"storageAccountDetails\":[{}]},{\"acrDetails\":[{},{},{},{}],\"location\":\"birbrvzhfjqpxyd\",\"storageAccountDetails\":[{}]},{\"acrDetails\":[{},{},{},{}],\"location\":\"m\",\"storageAccountDetails\":[{}]}]},\"sku\":{\"name\":\"cdgunsjssre\",\"tier\":\"Premium\",\"size\":\"koue\",\"family\":\"gkxyrsppbghye\",\"capacity\":1161959928},\"location\":\"awlqvuwsqmwqsgy\",\"tags\":{\"tngxvrpkizjnkgd\":\"o\",\"kbkqpsvoxshxum\":\"ursumbci\"},\"id\":\"uyblo\",\"name\":\"rufvmgblbqx\",\"type\":\"samxyjqhwsoj\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Registry response = manager.registries() - .getByResourceGroupWithResponse("qjyiwuveryavb", "vvcogupsho", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("awlqvuwsqmwqsgy", response.location()); - Assertions.assertEquals("o", response.tags().get("tngxvrpkizjnkgd")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("kquhmblnismviaa", response.kind()); - Assertions.assertEquals("cdgunsjssre", response.sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, response.sku().tier()); - Assertions.assertEquals("koue", response.sku().size()); - Assertions.assertEquals("gkxyrsppbghye", response.sku().family()); - Assertions.assertEquals(1161959928, response.sku().capacity()); - Assertions.assertEquals("exsrglxljuyv", response.discoveryUrl()); - Assertions.assertEquals("povzespdip", response.intellectualPropertyPublisher()); - Assertions.assertEquals("npdjomd", response.managedResourceGroup().resourceId()); - Assertions.assertEquals("dwosjxywwvilkyht", response.mlFlowRegistryUri()); - Assertions.assertEquals("hdbbjgsjm", response.registryPrivateEndpointConnections().get(0).id()); - Assertions.assertEquals("brpwj", response.registryPrivateEndpointConnections().get(0).location()); - Assertions.assertEquals("tkghrrxauuhdkh", - response.registryPrivateEndpointConnections().get(0).groupIds().get(0)); - Assertions.assertEquals("vp", response.registryPrivateEndpointConnections().get(0).provisioningState()); - Assertions.assertEquals("fsgilwisqxzpz", response.publicNetworkAccess()); - Assertions.assertEquals("trfvogknocshmp", response.regionDetails().get(0).location()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListByResourceGroupMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListByResourceGroupMockTests.java deleted file mode 100644 index 24f3e03df8d7b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListByResourceGroupMockTests.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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.Registry; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistriesListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - String responseStr - = "{\"value\":[{\"identity\":{\"principalId\":\"23dff3e1-3086-416b-a02b-8726baca0832\",\"tenantId\":\"1a1a9b97-ffa1-46a7-8e54-eced4ab6f137\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"azeq\":{\"principalId\":\"e0bfee08-d897-4220-8106-8e4d42244f54\",\"clientId\":\"9512dcaf-7961-43f8-8dc5-306463522da5\"},\"uuujlitics\":{\"principalId\":\"44096f7c-80e1-444a-b41b-88a20b9ec4b8\",\"clientId\":\"d3a956f0-2d61-49b7-8cab-ad17412e2fa9\"}}},\"kind\":\"qxgjz\",\"properties\":{\"discoveryUrl\":\"hop\",\"intellectualPropertyPublisher\":\"xip\",\"managedResourceGroup\":{\"resourceId\":\"pvkcnggocnwnjm\"},\"mlFlowRegistryUri\":\"tlam\",\"registryPrivateEndpointConnections\":[{\"id\":\"k\",\"location\":\"jxwwqz\",\"properties\":{\"groupIds\":[\"b\",\"frhqzvwznwcqoapd\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"tetfdpu\"}},{\"id\":\"zdtjbesfum\",\"location\":\"saafkvqhbwsviv\",\"properties\":{\"groupIds\":[\"g\",\"fvublszsveguxaxi\",\"pnymbjrsdiufqxr\",\"zijosuzegmcmlzmf\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"newrvjg\"}},{\"id\":\"mx\",\"location\":\"gowdavpqyhax\",\"properties\":{\"groupIds\":[\"oz\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"w\"}}],\"publicNetworkAccess\":\"n\",\"regionDetails\":[{\"acrDetails\":[{}],\"location\":\"cggoppmxcmoug\",\"storageAccountDetails\":[{}]}]},\"sku\":{\"name\":\"fy\",\"tier\":\"Standard\",\"size\":\"a\",\"family\":\"qvawkesxvz\",\"capacity\":1637573334},\"location\":\"wpjpgqwbrzkm\",\"tags\":{\"nqlizlcyhjhrkfp\":\"mycxmhorrecoiq\",\"bvm\":\"iiommisbf\",\"dvfjvbwawyma\":\"jcmpoh\"},\"id\":\"boindiuyqdjkugcj\",\"name\":\"sqpkmbryh\",\"type\":\"shkv\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.registries().listByResourceGroup("skinmxanjguadh", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("wpjpgqwbrzkm", response.iterator().next().location()); - Assertions.assertEquals("mycxmhorrecoiq", response.iterator().next().tags().get("nqlizlcyhjhrkfp")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, - response.iterator().next().identity().type()); - Assertions.assertEquals("qxgjz", response.iterator().next().kind()); - Assertions.assertEquals("fy", response.iterator().next().sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, response.iterator().next().sku().tier()); - Assertions.assertEquals("a", response.iterator().next().sku().size()); - Assertions.assertEquals("qvawkesxvz", response.iterator().next().sku().family()); - Assertions.assertEquals(1637573334, response.iterator().next().sku().capacity()); - Assertions.assertEquals("hop", response.iterator().next().discoveryUrl()); - Assertions.assertEquals("xip", response.iterator().next().intellectualPropertyPublisher()); - Assertions.assertEquals("pvkcnggocnwnjm", response.iterator().next().managedResourceGroup().resourceId()); - Assertions.assertEquals("tlam", response.iterator().next().mlFlowRegistryUri()); - Assertions.assertEquals("k", response.iterator().next().registryPrivateEndpointConnections().get(0).id()); - Assertions.assertEquals("jxwwqz", - response.iterator().next().registryPrivateEndpointConnections().get(0).location()); - Assertions.assertEquals("b", - response.iterator().next().registryPrivateEndpointConnections().get(0).groupIds().get(0)); - Assertions.assertEquals("tetfdpu", - response.iterator().next().registryPrivateEndpointConnections().get(0).provisioningState()); - Assertions.assertEquals("n", response.iterator().next().publicNetworkAccess()); - Assertions.assertEquals("cggoppmxcmoug", response.iterator().next().regionDetails().get(0).location()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListMockTests.java deleted file mode 100644 index ad2c22cf7ab43..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.Registry; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistriesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"identity\":{\"principalId\":\"9434c079-d0ae-4331-9b62-bec292ff8172\",\"tenantId\":\"1e7e30fe-64f3-4a09-bd77-1caf731760aa\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"trbq\":{\"principalId\":\"99cfc218-6b07-4dc8-940b-3bd958de9722\",\"clientId\":\"164a1e67-fb20-4e86-8758-81b0629b5065\"},\"kliop\":{\"principalId\":\"843da938-0b4a-45f1-acb0-d3ffba09fff6\",\"clientId\":\"4590e8db-037f-49bc-821c-c48784efef99\"},\"katccetyyv\":{\"principalId\":\"f6ac3e80-e019-4680-8cac-f0bfb771a1cc\",\"clientId\":\"5bf7e090-b85b-4155-814b-45e160d3eed0\"}}},\"kind\":\"wobbwns\",\"properties\":{\"discoveryUrl\":\"yirt\",\"intellectualPropertyPublisher\":\"zkpjeegzhhfn\",\"managedResourceGroup\":{\"resourceId\":\"lepcklowuthf\"},\"mlFlowRegistryUri\":\"hnmllbljehwhxxu\",\"registryPrivateEndpointConnections\":[{\"id\":\"a\",\"location\":\"hzkvna\",\"properties\":{\"groupIds\":[\"qwsddxaov\",\"bfllfkeub\",\"iibuab\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"hvnjcbuzu\"}},{\"id\":\"qoeoukvinkgb\",\"location\":\"q\",\"properties\":{\"groupIds\":[\"hdyasklmyfh\",\"lxwedetawl\",\"atvfddqspd\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"jtszqexcqcwbxx\"}},{\"id\":\"vekqjdrumlvk\",\"location\":\"wq\",\"properties\":{\"groupIds\":[\"vmw\",\"yarswsvtzotmwxqd\",\"bdanfexlawkeqjhz\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"mjsk\"}},{\"id\":\"enjnady\",\"location\":\"vounbyv\",\"properties\":{\"groupIds\":[\"rrgxqbknoxj\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"hmmwbvr\"}}],\"publicNetworkAccess\":\"jbiigxxr\",\"regionDetails\":[{\"acrDetails\":[{}],\"location\":\"wigif\",\"storageAccountDetails\":[{}]},{\"acrDetails\":[{},{},{},{}],\"location\":\"tlpshxjhanskooal\",\"storageAccountDetails\":[{},{},{}]},{\"acrDetails\":[{},{},{}],\"location\":\"qvfyoksstalji\",\"storageAccountDetails\":[{},{}]}]},\"sku\":{\"name\":\"j\",\"tier\":\"Basic\",\"size\":\"mnaaqhscaanddlv\",\"family\":\"uv\",\"capacity\":1190877470},\"location\":\"lsb\",\"tags\":{\"teklgs\":\"djvyclasdprknup\",\"oaol\":\"pvqczpk\",\"wcs\":\"h\",\"euimtxmd\":\"ebtjg\"},\"id\":\"exar\",\"name\":\"ukoir\",\"type\":\"ivftl\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.registries().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("lsb", response.iterator().next().location()); - Assertions.assertEquals("djvyclasdprknup", response.iterator().next().tags().get("teklgs")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, - response.iterator().next().identity().type()); - Assertions.assertEquals("wobbwns", response.iterator().next().kind()); - Assertions.assertEquals("j", response.iterator().next().sku().name()); - Assertions.assertEquals(SkuTier.BASIC, response.iterator().next().sku().tier()); - Assertions.assertEquals("mnaaqhscaanddlv", response.iterator().next().sku().size()); - Assertions.assertEquals("uv", response.iterator().next().sku().family()); - Assertions.assertEquals(1190877470, response.iterator().next().sku().capacity()); - Assertions.assertEquals("yirt", response.iterator().next().discoveryUrl()); - Assertions.assertEquals("zkpjeegzhhfn", response.iterator().next().intellectualPropertyPublisher()); - Assertions.assertEquals("lepcklowuthf", response.iterator().next().managedResourceGroup().resourceId()); - Assertions.assertEquals("hnmllbljehwhxxu", response.iterator().next().mlFlowRegistryUri()); - Assertions.assertEquals("a", response.iterator().next().registryPrivateEndpointConnections().get(0).id()); - Assertions.assertEquals("hzkvna", - response.iterator().next().registryPrivateEndpointConnections().get(0).location()); - Assertions.assertEquals("qwsddxaov", - response.iterator().next().registryPrivateEndpointConnections().get(0).groupIds().get(0)); - Assertions.assertEquals("hvnjcbuzu", - response.iterator().next().registryPrivateEndpointConnections().get(0).provisioningState()); - Assertions.assertEquals("jbiigxxr", response.iterator().next().publicNetworkAccess()); - Assertions.assertEquals("wigif", response.iterator().next().regionDetails().get(0).location()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesRemoveRegionsMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesRemoveRegionsMockTests.java deleted file mode 100644 index 66981a507e0fb..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistriesRemoveRegionsMockTests.java +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights 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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -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.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointResource; -import com.azure.resourcemanager.machinelearning.models.Registry; -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.UserAssignedIdentity; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistriesRemoveRegionsMockTests { - @Test - public void testRemoveRegions() throws Exception { - String responseStr - = "{\"identity\":{\"principalId\":\"e98eb1f4-78b4-4ccc-bbf7-3df0dcf73381\",\"tenantId\":\"ab07c3b1-ab20-4753-aaf8-10b832ae959b\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"jxdrgxpuxpzslmf\":{\"principalId\":\"5263d61b-b20a-44f1-b1ec-aa5982634523\",\"clientId\":\"1296c499-c356-4dd9-ad7c-8e76c83dab8e\"}}},\"kind\":\"pzrycchqz\",\"properties\":{\"discoveryUrl\":\"gesdzgszjhe\",\"intellectualPropertyPublisher\":\"mdhchi\",\"managedResourceGroup\":{\"resourceId\":\"rhgpityeuv\"},\"mlFlowRegistryUri\":\"sbmebfgbzn\",\"registryPrivateEndpointConnections\":[{\"id\":\"kupaeywy\",\"location\":\"vyzuyqzjfvbn\",\"properties\":{\"groupIds\":[\"zlscyzvvsxmyz\",\"sgb\",\"cqheixazebmmjaig\",\"xwqiparctsheggt\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"kxx\"}},{\"id\":\"whoosrsolhhv\",\"location\":\"oejbgiqhjpe\",\"properties\":{\"groupIds\":[\"ifie\",\"xxorsdvuirqfk\",\"jllfgmdoaihl\"],\"privateEndpoint\":{},\"registryPrivateLinkServiceConnectionState\":{},\"provisioningState\":\"ci\"}}],\"publicNetworkAccess\":\"irybwgaccvwky\",\"regionDetails\":[{\"acrDetails\":[{},{}],\"location\":\"tbynxshcawexge\",\"storageAccountDetails\":[{},{}]},{\"acrDetails\":[{},{},{}],\"location\":\"zxxkojjphbobu\",\"storageAccountDetails\":[{}]}]},\"sku\":{\"name\":\"wnpcxdkmtvparyub\",\"tier\":\"Standard\",\"size\":\"lpz\",\"family\":\"votuc\",\"capacity\":489805159},\"location\":\"ocumqzf\",\"tags\":{\"qsgert\":\"emzdnvnooklgren\",\"bd\":\"icemgsnc\",\"slbnunpxswmcc\":\"kphaed\"},\"id\":\"k\",\"name\":\"viaaep\",\"type\":\"lxbofdchboacf\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Registry response - = manager.registries() - .removeRegions("bbbgvm", "wyzxqhuhmldhnz", new RegistryInner().withLocation("jqsshu") - .withTags(mapOf("rqza", "ttnurkm", "qvvtjwdlduvim", "uwome", "rmxoxtap", "tce", "bkj", "fbj")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("o", new UserAssignedIdentity(), "tqhq", - new UserAssignedIdentity(), "uaermawwlnsdaz", new UserAssignedIdentity()))) - .withKind("emcotwfuot") - .withSku(new Sku().withName("znyjqbwxp") - .withTier(SkuTier.STANDARD) - .withSize("isloquttkbzwgju") - .withFamily("bdqm") - .withCapacity(310451773)) - .withDiscoveryUrl("sxzhik") - .withIntellectualPropertyPublisher("fszxbupsxqo") - .withManagedResourceGroup(new ArmResourceId().withResourceId("xcgqkhyvtajwkr")) - .withMlFlowRegistryUri("zlmwfncwlwov") - .withRegistryPrivateEndpointConnections(Arrays.asList( - new RegistryPrivateEndpointConnection().withId("mjbyssprkbzraljw") - .withLocation("csa") - .withGroupIds(Arrays.asList("pgzmxrg")) - .withPrivateEndpoint(new PrivateEndpointResource()) - .withRegistryPrivateLinkServiceConnectionState( - new RegistryPrivateLinkServiceConnectionState()) - .withProvisioningState("jdmjunnt"), - new RegistryPrivateEndpointConnection().withId("g") - .withLocation("vnwrziminet") - .withGroupIds(Arrays.asList("fuxdtpjcsqkedlcl")) - .withPrivateEndpoint(new PrivateEndpointResource()) - .withRegistryPrivateLinkServiceConnectionState( - new RegistryPrivateLinkServiceConnectionState()) - .withProvisioningState("yfftqombdsgqxa"))) - .withPublicNetworkAccess("duo") - .withRegionDetails(Arrays.asList(new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails(), new AcrDetails())) - .withLocation("byfdfuajnhpy") - .withStorageAccountDetails( - Arrays.asList(new StorageAccountDetails(), new StorageAccountDetails(), - new StorageAccountDetails(), new StorageAccountDetails())), - new RegistryRegionArmDetails() - .withAcrDetails( - Arrays.asList(new AcrDetails(), new AcrDetails(), new AcrDetails(), new AcrDetails())) - .withLocation("iw") - .withStorageAccountDetails( - Arrays.asList(new StorageAccountDetails(), new StorageAccountDetails(), - new StorageAccountDetails(), new StorageAccountDetails())))), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ocumqzf", response.location()); - Assertions.assertEquals("emzdnvnooklgren", response.tags().get("qsgert")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("pzrycchqz", response.kind()); - Assertions.assertEquals("wnpcxdkmtvparyub", response.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, response.sku().tier()); - Assertions.assertEquals("lpz", response.sku().size()); - Assertions.assertEquals("votuc", response.sku().family()); - Assertions.assertEquals(489805159, response.sku().capacity()); - Assertions.assertEquals("gesdzgszjhe", response.discoveryUrl()); - Assertions.assertEquals("mdhchi", response.intellectualPropertyPublisher()); - Assertions.assertEquals("rhgpityeuv", response.managedResourceGroup().resourceId()); - Assertions.assertEquals("sbmebfgbzn", response.mlFlowRegistryUri()); - Assertions.assertEquals("kupaeywy", response.registryPrivateEndpointConnections().get(0).id()); - Assertions.assertEquals("vyzuyqzjfvbn", response.registryPrivateEndpointConnections().get(0).location()); - Assertions.assertEquals("zlscyzvvsxmyz", - response.registryPrivateEndpointConnections().get(0).groupIds().get(0)); - Assertions.assertEquals("kxx", response.registryPrivateEndpointConnections().get(0).provisioningState()); - Assertions.assertEquals("irybwgaccvwky", response.publicNetworkAccess()); - Assertions.assertEquals("tbynxshcawexge", response.regionDetails().get(0).location()); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersCreateOrUpdateMockTests.java deleted file mode 100644 index faec9d02becb7..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersCreateOrUpdateMockTests.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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; -import com.azure.resourcemanager.machinelearning.models.CodeContainer; -import com.azure.resourcemanager.machinelearning.models.CodeContainerProperties; -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 reactor.core.publisher.Mono; - -public final class RegistryCodeContainersCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"latestVersion\":\"putocr\",\"nextVersion\":\"gqicmdrgcuzjmvkr\",\"description\":\"jcqhgcmljzksqim\",\"tags\":{\"qpvhszopeukufds\":\"jvfiomhc\",\"fsjbpwjwz\":\"bsskgqjemosq\"},\"properties\":{\"zkhxfp\":\"pdzy\",\"ibweua\":\"cuudqhadxjvvl\"}},\"id\":\"txlz\",\"name\":\"coqxtvytzqlyldj\",\"type\":\"zmxyrazzstjvcs\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.registryCodeContainers() - .createOrUpdate("btd", "zhixccnkf", "og", - new CodeContainerInner().withProperties(new CodeContainerProperties().withDescription("ev") - .withTags( - mapOf("wukfjvqglaxseisv", "ddpwmgw", "phheove", "vg", "h", "kpalecztl", "fssrgrq", "tzpu")) - .withProperties(mapOf("louurmuzembqq", "quo", "oxlorxgsl", "ehdhjofywwna", "u", "c")) - .withIsArchived(true)), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("jcqhgcmljzksqim", response.properties().description()); - Assertions.assertEquals("jvfiomhc", response.properties().tags().get("qpvhszopeukufds")); - Assertions.assertEquals("pdzy", response.properties().properties().get("zkhxfp")); - Assertions.assertEquals(true, response.properties().isArchived()); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersDeleteMockTests.java deleted file mode 100644 index b1a0331bd4c32..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryCodeContainersDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.registryCodeContainers().delete("gnmfakeqnitroml", "svktfps", "ows", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersGetWithResponseMockTests.java deleted file mode 100644 index 15722bd5391f7..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.CodeContainer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryCodeContainersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Deleting\",\"isArchived\":false,\"latestVersion\":\"iri\",\"nextVersion\":\"mqtr\",\"description\":\"doxdegacdedpkw\",\"tags\":{\"mn\":\"bpgdcidpdaqe\"},\"properties\":{\"dureevivk\":\"irqqclsaqife\",\"fpxeswctlfytb\":\"glioklsu\"}},\"id\":\"ytvnpbgcesfd\",\"name\":\"fclmowur\",\"type\":\"fofkbcjzzwweob\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.registryCodeContainers() - .getWithResponse("vfxjtxlawmv", "yqabjropxfqd", "llznyjyuwqlzw", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("doxdegacdedpkw", response.properties().description()); - Assertions.assertEquals("bpgdcidpdaqe", response.properties().tags().get("mn")); - Assertions.assertEquals("irqqclsaqife", response.properties().properties().get("dureevivk")); - Assertions.assertEquals(false, response.properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersListMockTests.java deleted file mode 100644 index 6fe21069c33fc..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeContainersListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.CodeContainer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryCodeContainersListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"latestVersion\":\"clclf\",\"nextVersion\":\"vyjommw\",\"description\":\"poipjylxtebvse\",\"tags\":{\"lkbntcvpvdfmo\":\"vvpaysqwhzdcyand\",\"sqpffapjpjmsbzz\":\"qctfvxu\",\"iubeqk\":\"snyfowyjzuak\"},\"properties\":{\"h\":\"lrglhxsoang\",\"reneggpdtyz\":\"nhogse\",\"dupe\":\"xlitwkejmgem\"}},\"id\":\"kvsd\",\"name\":\"vhr\",\"type\":\"pezammpkapvnpeu\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.registryCodeContainers() - .list("sphtraitrmsukxtu", "tgcptctxpoeg", "ckm", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("poipjylxtebvse", response.iterator().next().properties().description()); - Assertions.assertEquals("vvpaysqwhzdcyand", - response.iterator().next().properties().tags().get("lkbntcvpvdfmo")); - Assertions.assertEquals("lrglhxsoang", response.iterator().next().properties().properties().get("h")); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsDeleteMockTests.java deleted file mode 100644 index d21e98f6c2d82..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryCodeVersionsDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryCodeVersionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.registryCodeVersions() - .delete("hcxwwwvun", "nsgvxhxrm", "atrtcqyfjvifbmo", "tehqyoytrcoufkq", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersCreateOrUpdateMockTests.java deleted file mode 100644 index be53f387fa8be..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersCreateOrUpdateMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; -import com.azure.resourcemanager.machinelearning.models.ComponentContainer; -import com.azure.resourcemanager.machinelearning.models.ComponentContainerProperties; -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 reactor.core.publisher.Mono; - -public final class RegistryComponentContainersCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"latestVersion\":\"cuuuexsmnteevfg\",\"nextVersion\":\"fezraqs\",\"description\":\"kodkgxq\",\"tags\":{\"glwdzfss\":\"rxgmzz\"},\"properties\":{\"ddkkraj\":\"gaok\"}},\"id\":\"uklx\",\"name\":\"el\",\"type\":\"zpyqbwhuecx\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.registryComponentContainers() - .createOrUpdate("fxnwcgzuoxixtxxx", "jsehbknnrnk", "jfawpcbsogz", new ComponentContainerInner() - .withProperties(new ComponentContainerProperties().withDescription("tvbmyzuqfdqdktr") - .withTags(mapOf("mxlffqgdodnkq", "qszhhqngjndkv")) - .withProperties(mapOf("dazmdzesimeft", "gkmj", "xiefcorzbidaeb", "drfzjlflzagvdava", "e", "zni")) - .withIsArchived(true)), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("kodkgxq", response.properties().description()); - Assertions.assertEquals("rxgmzz", response.properties().tags().get("glwdzfss")); - Assertions.assertEquals("gaok", response.properties().properties().get("ddkkraj")); - Assertions.assertEquals(true, response.properties().isArchived()); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersDeleteMockTests.java deleted file mode 100644 index 53430a11e7637..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryComponentContainersDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.registryComponentContainers() - .delete("ahktxvcbicfecth", "tbkjw", "ztpxj", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersGetWithResponseMockTests.java deleted file mode 100644 index fc749e8aa2568..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComponentContainer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryComponentContainersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Canceled\",\"isArchived\":false,\"latestVersion\":\"kgbtqq\",\"nextVersion\":\"bsynne\",\"description\":\"onjqhdheosx\",\"tags\":{\"tcwgpdbbgla\":\"udmpfhwypphtjt\",\"ds\":\"cctokfspvj\",\"ftyptwjwiyyeo\":\"kvrmp\"},\"properties\":{\"fzzi\":\"cmdjmvphwfnugsl\"}},\"id\":\"bgomvue\",\"name\":\"r\",\"type\":\"m\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.registryComponentContainers() - .getWithResponse("twk", "jdpayx", "pqiwuzr", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("onjqhdheosx", response.properties().description()); - Assertions.assertEquals("udmpfhwypphtjt", response.properties().tags().get("tcwgpdbbgla")); - Assertions.assertEquals("cmdjmvphwfnugsl", response.properties().properties().get("fzzi")); - Assertions.assertEquals(false, response.properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersListMockTests.java deleted file mode 100644 index 870a40bde9c69..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentContainersListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComponentContainer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryComponentContainersListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"isArchived\":true,\"latestVersion\":\"uljgxotu\",\"nextVersion\":\"mkiyaosthulzug\",\"description\":\"gspxldlnoc\",\"tags\":{\"wm\":\"gimizlukj\",\"mspppoeszthjt\":\"ksr\"},\"properties\":{\"gzzuqi\":\"skdiy\",\"gvmxwbohxd\":\"psybqo\",\"brhgnaka\":\"koe\",\"umqeu\":\"wscmneev\"}},\"id\":\"yyh\",\"name\":\"gqaeiv\",\"type\":\"qutxrbgbzgfhzd\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.registryComponentContainers() - .list("gdpftfcb", "tsrdplqdyzaci", "sfzrguzliyvsbfsi", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("gspxldlnoc", response.iterator().next().properties().description()); - Assertions.assertEquals("gimizlukj", response.iterator().next().properties().tags().get("wm")); - Assertions.assertEquals("skdiy", response.iterator().next().properties().properties().get("gzzuqi")); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsCreateOrUpdateMockTests.java deleted file mode 100644 index c6706592a1613..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsCreateOrUpdateMockTests.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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; -import com.azure.resourcemanager.machinelearning.models.ComponentVersion; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionProperties; -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 reactor.core.publisher.Mono; - -public final class RegistryComponentVersionsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"componentSpec\":\"dataurmrfyyqj\",\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"ddcuqddldaoyvf\",\"tags\":{\"joj\":\"ew\",\"zzw\":\"sxjht\",\"trgu\":\"ocygoyineuaxpmez\",\"oyxfoafzdypzlx\":\"lw\"},\"properties\":{\"qxa\":\"dhgwhlbpjuaj\",\"yy\":\"mitnwlyhbujysvd\",\"tjtnnrjewih\":\"dbhatmabtpgn\"}},\"id\":\"gaahmdfsp\",\"name\":\"dnxq\",\"type\":\"z\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.registryComponentVersions() - .createOrUpdate("oqatdjka", "dp", "e", "smxfzynfemqy", - new ComponentVersionInner().withProperties(new ComponentVersionProperties().withDescription("nl") - .withTags(mapOf("jwdzpvirzyudrqu", "dsqx", "n", "rxhxmlfouqpskv", "h", "bpmr")) - .withProperties(mapOf("acz", "cq", "tt", "vwae", "qlyyslg", "jqyfy")) - .withIsArchived(false) - .withIsAnonymous(true) - .withComponentSpec("datakpgwgssd")), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ddcuqddldaoyvf", response.properties().description()); - Assertions.assertEquals("ew", response.properties().tags().get("joj")); - Assertions.assertEquals("dhgwhlbpjuaj", response.properties().properties().get("qxa")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsDeleteMockTests.java deleted file mode 100644 index 7e1f5043ec34b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryComponentVersionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.registryComponentVersions().delete("wxqd", "oqzh", "wdjox", "kbd", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsGetWithResponseMockTests.java deleted file mode 100644 index 61bc43ec2de4c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComponentVersion; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryComponentVersionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"componentSpec\":\"datafzqyugtkxnc\",\"provisioningState\":\"Creating\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"cmwbejywwwvn\",\"tags\":{\"dfyziruqvgnjxi\":\"krmqevrhhafqf\",\"gikyluyu\":\"kgyjmzbm\",\"c\":\"mbrdcvoloxtv\"},\"properties\":{\"okkyankxvcptf\":\"yhmmglvnbenkps\",\"gazhlrdxpc\":\"fbhnkxasomaf\"}},\"id\":\"utfz\",\"name\":\"trcdzytrtffvpkd\",\"type\":\"cyuwenbqvpraw\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.registryComponentVersions() - .getWithResponse("sobvcnsb", "oeznl", "hn", "z", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("cmwbejywwwvn", response.properties().description()); - Assertions.assertEquals("krmqevrhhafqf", response.properties().tags().get("dfyziruqvgnjxi")); - Assertions.assertEquals("yhmmglvnbenkps", response.properties().properties().get("okkyankxvcptf")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsListMockTests.java deleted file mode 100644 index 96c4d78ccf7f7..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryComponentVersionsListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComponentVersion; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryComponentVersionsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"componentSpec\":\"datakz\",\"provisioningState\":\"Deleting\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"plslfc\",\"tags\":{\"lkyqfnjo\":\"ksuowt\",\"nrtc\":\"rhnxzmfvmw\"},\"properties\":{\"vwnbu\":\"wwhyxfshmbyd\",\"mpshaezcldkckrn\":\"sodtevzshqyke\"}},\"id\":\"qdmhcejstfs\",\"name\":\"a\",\"type\":\"jakgk\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.registryComponentVersions() - .list("gsingmhpavsfg", "rvqrwwbdrwroqk", "jnzpqhqqsa", "kyu", 2097989242, "ameaasjqen", - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("plslfc", response.iterator().next().properties().description()); - Assertions.assertEquals("ksuowt", response.iterator().next().properties().tags().get("lkyqfnjo")); - Assertions.assertEquals("wwhyxfshmbyd", response.iterator().next().properties().properties().get("vwnbu")); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - Assertions.assertEquals(true, response.iterator().next().properties().isAnonymous()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersCreateOrUpdateMockTests.java deleted file mode 100644 index 6deceebf956ae..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersCreateOrUpdateMockTests.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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner; -import com.azure.resourcemanager.machinelearning.models.DataContainer; -import com.azure.resourcemanager.machinelearning.models.DataContainerProperties; -import com.azure.resourcemanager.machinelearning.models.DataType; -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 reactor.core.publisher.Mono; - -public final class RegistryDataContainersCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"dataType\":\"uri_file\",\"isArchived\":false,\"latestVersion\":\"zfmnpbdrcibjxnn\",\"nextVersion\":\"ztnhvdtuoamqobq\",\"description\":\"spshtis\",\"tags\":{\"wckzeb\":\"eoctrzjwn\"},\"properties\":{\"qzlmln\":\"wdxgyypm\",\"ilyeshox\":\"rcatkuhskegdkvv\",\"jdmu\":\"z\",\"xzgzum\":\"busxyugozwp\"}},\"id\":\"tiixkkbygbgi\",\"name\":\"kwyshybbn\",\"type\":\"ttyizonzsurqcoja\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.registryDataContainers() - .createOrUpdate("uijtickzo", "guzprpxhhboigzxk", "pqlrzhtocjzfppex", - new DataContainerInner().withProperties(new DataContainerProperties().withDescription("joypplodaqrbk") - .withTags(mapOf("valcrqaxlmbrtvtg", "ffsobg")) - .withProperties( - mapOf("oysxaqq", "lplgtlayyxhxj", "njc", "hdfhfaob", "qwssyd", "bozvc", "ywo", "wrybi")) - .withIsArchived(true) - .withDataType(DataType.URI_FILE)), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("spshtis", response.properties().description()); - Assertions.assertEquals("eoctrzjwn", response.properties().tags().get("wckzeb")); - Assertions.assertEquals("wdxgyypm", response.properties().properties().get("qzlmln")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(DataType.URI_FILE, response.properties().dataType()); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersDeleteMockTests.java deleted file mode 100644 index 5cf9319d1588a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryDataContainersDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.registryDataContainers().delete("xhwis", "so", "db", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersGetWithResponseMockTests.java deleted file mode 100644 index 08126f6d05c17..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DataContainer; -import com.azure.resourcemanager.machinelearning.models.DataType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryDataContainersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"dataType\":\"uri_file\",\"isArchived\":false,\"latestVersion\":\"ywab\",\"nextVersion\":\"tnipaptgv\",\"description\":\"qyjukkajn\",\"tags\":{\"femiwfhhawbabhz\":\"ltonop\",\"qnxyd\":\"fcdi\",\"zsuspaywvslq\":\"zfoi\"},\"properties\":{\"kxfmu\":\"nzea\",\"v\":\"dbvytq\",\"axgbiwpgop\":\"uymkdeuqxlvzpfd\"}},\"id\":\"ktthbmrrmtrx\",\"name\":\"jmpdvrjzwaw\",\"type\":\"ewajccsdjuz\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.registryDataContainers() - .getWithResponse("wjsba", "xaxtuxirppbiichl", "gkvuixwonkr", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("qyjukkajn", response.properties().description()); - Assertions.assertEquals("ltonop", response.properties().tags().get("femiwfhhawbabhz")); - Assertions.assertEquals("nzea", response.properties().properties().get("kxfmu")); - 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/RegistryDataContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersListMockTests.java deleted file mode 100644 index 8e068fb69d931..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataContainersListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.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.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryDataContainersListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"dataType\":\"mltable\",\"isArchived\":false,\"latestVersion\":\"ghaknklt\",\"nextVersion\":\"wppvihbmwrv\",\"description\":\"drohu\",\"tags\":{\"nygtixkgyob\":\"kabhvxjuaivxzni\",\"xzpqditudcltf\":\"kphvdlo\",\"kehldopjsxvbbwsg\":\"ieileemw\",\"d\":\"kkmibnmdp\"},\"properties\":{\"qa\":\"tgzwmzhcmrl\",\"nmbj\":\"styzavkyjjlu\",\"optythctoxo\":\"bngzldvvd\"}},\"id\":\"mqnerwh\",\"name\":\"mvidsssfzsgzgusp\",\"type\":\"jomeq\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.registryDataContainers() - .list("tertnzrrwsc", "clhdwienvtol", "jy", ListViewType.ACTIVE_ONLY, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("drohu", response.iterator().next().properties().description()); - Assertions.assertEquals("kabhvxjuaivxzni", response.iterator().next().properties().tags().get("nygtixkgyob")); - Assertions.assertEquals("tgzwmzhcmrl", response.iterator().next().properties().properties().get("qa")); - 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/RegistryDataVersionsCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsCreateOrUpdateMockTests.java deleted file mode 100644 index 0449f6fcf9f50..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsCreateOrUpdateMockTests.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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner; -import com.azure.resourcemanager.machinelearning.models.DataVersionBase; -import com.azure.resourcemanager.machinelearning.models.DataVersionBaseProperties; -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 reactor.core.publisher.Mono; - -public final class RegistryDataVersionsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"ymxsfqeaxdqelu\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"viawg\",\"tags\":{\"zfz\":\"uhv\"},\"properties\":{\"djieask\":\"pbcbkcpym\",\"noskkhbmj\":\"kqclnfusr\",\"yeikbv\":\"hlyyuah\"}},\"id\":\"rurgbqaucpck\",\"name\":\"jnohafwm\",\"type\":\"pgjl\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.registryDataVersions() - .createOrUpdate("ppwxnikfz", "xxfnduv", "zjnnuwwv", "zrfxajtbcqj", - new DataVersionBaseInner().withProperties(new DataVersionBaseProperties().withDescription("wyzrieitqml") - .withTags(mapOf("kmpebfhlgeehb", "tbdzqaj", "buafmoubukqmier", "jgplnlxrfeszu")) - .withProperties(mapOf("zytapgzdhzb", "obvveq")) - .withIsArchived(true) - .withIsAnonymous(false) - .withDataUri("bkj")), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("viawg", response.properties().description()); - Assertions.assertEquals("uhv", response.properties().tags().get("zfz")); - Assertions.assertEquals("pbcbkcpym", response.properties().properties().get("djieask")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals("ymxsfqeaxdqelu", response.properties().dataUri()); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsDeleteMockTests.java deleted file mode 100644 index 6f4d222b065d1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryDataVersionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.registryDataVersions() - .delete("vclfjyclvi", "dlff", "leirmtxfqpfildcg", "fouzfbpg", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsGetWithResponseMockTests.java deleted file mode 100644 index fc248a2a444fa..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DataVersionBase; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryDataVersionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"akzbyqha\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"x\",\"tags\":{\"gsbpgmncrvtp\":\"olusyruxrzhhlhrv\",\"a\":\"foromppz\",\"plfcmpua\":\"qmeu\",\"iccu\":\"ugoceqtlyspjym\"},\"properties\":{\"nla\":\"f\",\"iwtwfgoc\":\"gixhqjqhgqwbb\",\"zugabkyy\":\"alvemn\",\"bftswcd\":\"syweohlmtsnvon\"}},\"id\":\"nseptvdtic\",\"name\":\"af\",\"type\":\"gzwkopxdkbtwoqh\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.registryDataVersions() - .getWithResponse("ryvidbzdylb", "jatgngwn", "jftecgprzsqmp", "q", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("x", response.properties().description()); - Assertions.assertEquals("olusyruxrzhhlhrv", response.properties().tags().get("gsbpgmncrvtp")); - Assertions.assertEquals("f", response.properties().properties().get("nla")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(false, response.properties().isAnonymous()); - Assertions.assertEquals("akzbyqha", response.properties().dataUri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsListMockTests.java deleted file mode 100644 index be9c4ed38eee9..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryDataVersionsListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DataVersionBase; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryDataVersionsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"czzunfnbphceeiv\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"pghcnuqhqpvt\",\"tags\":{\"ga\":\"fscl\",\"zjuzvw\":\"ygntbfytnhdnihu\"},\"properties\":{\"biwny\":\"dto\",\"objzr\":\"zdpxctsucrxdte\",\"ltyl\":\"wtidcnzalgmpupj\",\"p\":\"uudvbgvzlzjsb\"}},\"id\":\"tzaziydpoknseaim\",\"name\":\"dqraokdarluobbva\",\"type\":\"qwzknyujxy\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.registryDataVersions() - .list("fzhzzcarciuo", "yipdthjfvnh", "sgnspu", "felfchnuf", 336300860, "jgbfbba", "h", ListViewType.ALL, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("pghcnuqhqpvt", response.iterator().next().properties().description()); - Assertions.assertEquals("fscl", response.iterator().next().properties().tags().get("ga")); - Assertions.assertEquals("dto", response.iterator().next().properties().properties().get("biwny")); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - Assertions.assertEquals(true, response.iterator().next().properties().isAnonymous()); - Assertions.assertEquals("czzunfnbphceeiv", response.iterator().next().properties().dataUri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersCreateOrUpdateMockTests.java deleted file mode 100644 index 75a1e7a64e157..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersCreateOrUpdateMockTests.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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainer; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties; -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 reactor.core.publisher.Mono; - -public final class RegistryEnvironmentContainersCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"nsjxwfogb\",\"nextVersion\":\"ylyumb\",\"description\":\"prlnuom\",\"tags\":{\"byoull\":\"dkhmemxkahapes\",\"wba\":\"fzmnxrmxxj\",\"xfmdjsiommd\":\"jgzkmwfwzlm\"},\"properties\":{\"ttowqx\":\"xulxrcbdnpfcgh\",\"oovhatiywtcvzu\":\"cpbzxpz\",\"i\":\"pkfeomotquqlqe\"}},\"id\":\"qpzksdpfvls\",\"name\":\"mmetwtla\",\"type\":\"nkjtefbd\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.registryEnvironmentContainers() - .createOrUpdate("xjkc", "eenubr", "kjfkxnwtzs", - new EnvironmentContainerInner().withProperties(new EnvironmentContainerProperties() - .withDescription("hdikatzmtuvf") - .withTags(mapOf("ibxl", "tjk", "u", "zlvkcm", "aoboiahk", "aunlodincf", "ksaxyeedvpmodkt", "psvax")) - .withProperties( - mapOf("vuztnsvmsh", "ydvvgkmorbpcjesf", "gf", "kg", "hlclpkr", "hrme", "bmjjv", "r")) - .withIsArchived(false)), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("prlnuom", response.properties().description()); - Assertions.assertEquals("dkhmemxkahapes", response.properties().tags().get("byoull")); - Assertions.assertEquals("xulxrcbdnpfcgh", response.properties().properties().get("ttowqx")); - Assertions.assertEquals(false, response.properties().isArchived()); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersDeleteMockTests.java deleted file mode 100644 index f1f3140bf4dde..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryEnvironmentContainersDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.registryEnvironmentContainers() - .delete("cjqzrevfwcba", "apndm", "qvmkmzvag", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersGetWithResponseMockTests.java deleted file mode 100644 index 142cdb342bbf5..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryEnvironmentContainersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Failed\",\"isArchived\":true,\"latestVersion\":\"yx\",\"nextVersion\":\"xcgqbmxbp\",\"description\":\"nxskehojvma\",\"tags\":{\"pdncokq\":\"lfpiuuf\",\"mjlyhbjf\":\"givbhmn\"},\"properties\":{\"gcaygumqeobrwre\":\"ibgwcduy\",\"s\":\"dgsawhami\"}},\"id\":\"mfkia\",\"name\":\"g\",\"type\":\"k\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.registryEnvironmentContainers() - .getWithResponse("xfblsxyfq", "todgkllefmizdcsr", "b", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("nxskehojvma", response.properties().description()); - Assertions.assertEquals("lfpiuuf", response.properties().tags().get("pdncokq")); - Assertions.assertEquals("ibgwcduy", response.properties().properties().get("gcaygumqeobrwre")); - Assertions.assertEquals(true, response.properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersListMockTests.java deleted file mode 100644 index d946d0717df4d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentContainersListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainer; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryEnvironmentContainersListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"isArchived\":false,\"latestVersion\":\"tt\",\"nextVersion\":\"pbilnszyjbuw\",\"description\":\"usydscizvkayiox\",\"tags\":{\"l\":\"qs\"},\"properties\":{\"ym\":\"feombodvdgfuakqs\",\"vzceuy\":\"f\"}},\"id\":\"ktck\",\"name\":\"nbpkfnxrlncmlzvv\",\"type\":\"mesfhqs\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.registryEnvironmentContainers() - .list("ovriqtuzwbkqcgz", "gtdjhtbarptxurs", "oyyumhzps", ListViewType.ACTIVE_ONLY, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("usydscizvkayiox", response.iterator().next().properties().description()); - Assertions.assertEquals("qs", response.iterator().next().properties().tags().get("l")); - Assertions.assertEquals("feombodvdgfuakqs", response.iterator().next().properties().properties().get("ym")); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsCreateOrUpdateMockTests.java deleted file mode 100644 index 2c5106aa2b4ff..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsCreateOrUpdateMockTests.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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -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.EnvironmentVersion; -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.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 reactor.core.publisher.Mono; - -public final class RegistryEnvironmentVersionsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"environmentType\":\"Curated\",\"image\":\"ovelvsp\",\"condaFile\":\"xjtezujtoudo\",\"build\":{\"contextUri\":\"x\",\"dockerfilePath\":\"vssrj\"},\"osType\":\"Windows\",\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"wemt\",\"port\":1587028677},\"readinessRoute\":{\"path\":\"ebymmcgskscbsx\",\"port\":297174289},\"scoringRoute\":{\"path\":\"xicjojxolknsh\",\"port\":307738924}},\"autoRebuild\":\"OnBaseImageUpdate\",\"provisioningState\":\"Succeeded\",\"stage\":\"hmbglmnlbn\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"zzc\",\"tags\":{\"kahophqwojdz\":\"ortdzzvhbu\",\"srbfbs\":\"cqt\"},\"properties\":{\"h\":\"cdzfbvexrv\",\"vrsksdzmhwt\":\"mfsnqpvjtshl\"}},\"id\":\"ppwfbw\",\"name\":\"etxizrfwxhflgdun\",\"type\":\"aypxsazbxs\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.registryEnvironmentVersions() - .createOrUpdate("bjlpfwuq", "rpdgitenyuksli", "mpnxg", "amrplanch", - new EnvironmentVersionInner().withProperties(new EnvironmentVersionProperties().withDescription("a") - .withTags(mapOf("ltckiwxggfagi", "jt", "ah", "xmdboefnhx", "so", "qeinv", "ypcjxhyzzlocjhzp", - "mokrqdbsgkqyjko")) - .withProperties(mapOf("bofprsmivapesb", "rbmc")) - .withIsArchived(false) - .withIsAnonymous(false) - .withImage("mxlmxejwyvjzb") - .withCondaFile("vtuekbb") - .withBuild(new BuildContext().withContextUri("qsm").withDockerfilePath("beqieiuxhjuw")) - .withOsType(OperatingSystemType.LINUX) - .withInferenceConfig(new InferenceContainerProperties() - .withLivenessRoute(new Route().withPath("jjhrgkjjpc").withPort(752508930)) - .withReadinessRoute(new Route().withPath("lzyxvtajfjatoid").withPort(1842998823)) - .withScoringRoute(new Route().withPath("urdgc").withPort(1626550750))) - .withAutoRebuild(AutoRebuildSetting.DISABLED) - .withStage("engnpuelrnanbrpk")), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("zzc", response.properties().description()); - Assertions.assertEquals("ortdzzvhbu", response.properties().tags().get("kahophqwojdz")); - Assertions.assertEquals("cdzfbvexrv", response.properties().properties().get("h")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals("ovelvsp", response.properties().image()); - Assertions.assertEquals("xjtezujtoudo", response.properties().condaFile()); - Assertions.assertEquals("x", response.properties().build().contextUri()); - Assertions.assertEquals("vssrj", response.properties().build().dockerfilePath()); - Assertions.assertEquals(OperatingSystemType.WINDOWS, response.properties().osType()); - Assertions.assertEquals("wemt", response.properties().inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(1587028677, response.properties().inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("ebymmcgskscbsx", response.properties().inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(297174289, response.properties().inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("xicjojxolknsh", response.properties().inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(307738924, response.properties().inferenceConfig().scoringRoute().port()); - Assertions.assertEquals(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE, response.properties().autoRebuild()); - Assertions.assertEquals("hmbglmnlbn", response.properties().stage()); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsDeleteMockTests.java deleted file mode 100644 index b607dd272a68a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryEnvironmentVersionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.registryEnvironmentVersions() - .delete("spjvsyydjlhd", "kcsqvyeegxhulo", "wumfjd", "meqvnxpf", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsGetWithResponseMockTests.java deleted file mode 100644 index c06970c13e99a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.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.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryEnvironmentVersionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"environmentType\":\"Curated\",\"image\":\"jlwwef\",\"condaFile\":\"twllqypmjc\",\"build\":{\"contextUri\":\"vfwgkz\",\"dockerfilePath\":\"kshxjkckwb\"},\"osType\":\"Windows\",\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"mmkwahrooy\",\"port\":677197142},\"readinessRoute\":{\"path\":\"bnvy\",\"port\":658844384},\"scoringRoute\":{\"path\":\"a\",\"port\":1415322253}},\"autoRebuild\":\"OnBaseImageUpdate\",\"provisioningState\":\"Updating\",\"stage\":\"xtigukfkbsyc\",\"isArchived\":true,\"isAnonymous\":false,\"description\":\"peenlqtqyvlfbsav\",\"tags\":{\"phtoshqtuarjwgu\":\"fjdsq\"},\"properties\":{\"q\":\"nxaeyp\",\"bwscjwyye\":\"izfyasydd\"}},\"id\":\"iflrvfeowctshw\",\"name\":\"rhhasabvauz\",\"type\":\"wwumkbpgcilbwtp\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.registryEnvironmentVersions() - .getWithResponse("xdjspnonxe", "hq", "zhn", "twvgc", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("peenlqtqyvlfbsav", response.properties().description()); - Assertions.assertEquals("fjdsq", response.properties().tags().get("phtoshqtuarjwgu")); - Assertions.assertEquals("nxaeyp", response.properties().properties().get("q")); - Assertions.assertEquals(true, response.properties().isArchived()); - Assertions.assertEquals(false, response.properties().isAnonymous()); - Assertions.assertEquals("jlwwef", response.properties().image()); - Assertions.assertEquals("twllqypmjc", response.properties().condaFile()); - Assertions.assertEquals("vfwgkz", response.properties().build().contextUri()); - Assertions.assertEquals("kshxjkckwb", response.properties().build().dockerfilePath()); - Assertions.assertEquals(OperatingSystemType.WINDOWS, response.properties().osType()); - Assertions.assertEquals("mmkwahrooy", response.properties().inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(677197142, response.properties().inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("bnvy", response.properties().inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(658844384, response.properties().inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("a", response.properties().inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(1415322253, response.properties().inferenceConfig().scoringRoute().port()); - Assertions.assertEquals(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE, response.properties().autoRebuild()); - Assertions.assertEquals("xtigukfkbsyc", response.properties().stage()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsListMockTests.java deleted file mode 100644 index b8e699e02ea9c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryEnvironmentVersionsListMockTests.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.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.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.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryEnvironmentVersionsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"environmentType\":\"Curated\",\"image\":\"zebc\",\"condaFile\":\"luedcmkryhh\",\"build\":{\"contextUri\":\"xzh\",\"dockerfilePath\":\"lxwknooxdjklfsdn\"},\"osType\":\"Linux\",\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"mmddslwnlg\",\"port\":1497973223},\"readinessRoute\":{\"path\":\"hmk\",\"port\":775061052},\"scoringRoute\":{\"path\":\"bnnnlpqdnns\",\"port\":2111031568}},\"autoRebuild\":\"Disabled\",\"provisioningState\":\"Creating\",\"stage\":\"slwknrdvvmb\",\"isArchived\":true,\"isAnonymous\":true,\"description\":\"zywx\",\"tags\":{\"etnnefputlkszux\":\"qxtkd\"},\"properties\":{\"wasfw\":\"zs\"}},\"id\":\"zybmfqdnppfcf\",\"name\":\"uamrvamuvkgd\",\"type\":\"pjbblukgctv\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.registryEnvironmentVersions() - .list("nuvhgcgrllyyfsm", "cbx", "rchmetvzhuugd", "kgdskwvb", 577736960, "awwayqtsrny", - ListViewType.ACTIVE_ONLY, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("zywx", response.iterator().next().properties().description()); - Assertions.assertEquals("qxtkd", response.iterator().next().properties().tags().get("etnnefputlkszux")); - Assertions.assertEquals("zs", response.iterator().next().properties().properties().get("wasfw")); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - Assertions.assertEquals(true, response.iterator().next().properties().isAnonymous()); - Assertions.assertEquals("zebc", response.iterator().next().properties().image()); - Assertions.assertEquals("luedcmkryhh", response.iterator().next().properties().condaFile()); - Assertions.assertEquals("xzh", response.iterator().next().properties().build().contextUri()); - Assertions.assertEquals("lxwknooxdjklfsdn", response.iterator().next().properties().build().dockerfilePath()); - Assertions.assertEquals(OperatingSystemType.LINUX, response.iterator().next().properties().osType()); - Assertions.assertEquals("mmddslwnlg", - response.iterator().next().properties().inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(1497973223, - response.iterator().next().properties().inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("hmk", - response.iterator().next().properties().inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(775061052, - response.iterator().next().properties().inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("bnnnlpqdnns", - response.iterator().next().properties().inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(2111031568, - response.iterator().next().properties().inferenceConfig().scoringRoute().port()); - Assertions.assertEquals(AutoRebuildSetting.DISABLED, response.iterator().next().properties().autoRebuild()); - Assertions.assertEquals("slwknrdvvmb", response.iterator().next().properties().stage()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryInnerTests.java deleted file mode 100644 index 1b73638cff573..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryInnerTests.java +++ /dev/null @@ -1,202 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code 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.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 org.junit.jupiter.api.Assertions; - -public final class RegistryInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RegistryInner model = BinaryData.fromString( - "{\"identity\":{\"principalId\":\"2e21de19-ed91-4869-9c73-7565782ea7b9\",\"tenantId\":\"6af9fc2c-506b-4cbe-8e65-6b28bf960d2b\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"mhk\":{\"principalId\":\"206b86e3-cc8b-4130-9b9a-9d2ab40780d1\",\"clientId\":\"1680cf3f-58ba-449f-b8e2-71f038c17e3e\"},\"sdsu\":{\"principalId\":\"3b5ce0d2-eb15-439d-9cf3-3c1e4543e219\",\"clientId\":\"aa584360-fd95-4661-8ac6-11c9a843aa09\"}}},\"kind\":\"eqdgcruxsp\",\"properties\":{\"discoveryUrl\":\"ymmqgwokmikp\",\"intellectualPropertyPublisher\":\"fbmjxuvji\",\"managedResourceGroup\":{\"resourceId\":\"vhax\"},\"mlFlowRegistryUri\":\"w\",\"registryPrivateEndpointConnections\":[{\"id\":\"pphthdklmvetatla\",\"location\":\"q\",\"properties\":{\"groupIds\":[\"giksbbvto\",\"xrpo\",\"wp\"],\"privateEndpoint\":{\"subnetArmId\":\"gjtnhtukfacihm\",\"id\":\"ntumeezbxvq\"},\"registryPrivateLinkServiceConnectionState\":{\"actionsRequired\":\"uvwc\",\"description\":\"sgomtmjz\",\"status\":\"Disconnected\"},\"provisioningState\":\"govsxpwwzt\"}},{\"id\":\"mkkhtgfredml\",\"location\":\"grllcc\",\"properties\":{\"groupIds\":[\"jowazhpab\",\"comlyotgkwsx\",\"srqorcgenmvceb\"],\"privateEndpoint\":{\"subnetArmId\":\"tqujxcxxqndcqjk\",\"id\":\"wqurc\"},\"registryPrivateLinkServiceConnectionState\":{\"actionsRequired\":\"mrvvxwj\",\"description\":\"gzseh\",\"status\":\"Disconnected\"},\"provisioningState\":\"ilcchskxxkansbvr\"}},{\"id\":\"qgvtojrulfu\",\"location\":\"ejrthcfjzhxlyub\",\"properties\":{\"groupIds\":[\"stvrjeqmt\",\"zbeqrztrxa\",\"xrd\",\"absr\"],\"privateEndpoint\":{\"subnetArmId\":\"nrhpqatiwkk\",\"id\":\"anxkvvcsemsvuv\"},\"registryPrivateLinkServiceConnectionState\":{\"actionsRequired\":\"qxetqmmlivrjjx\",\"description\":\"xdchp\",\"status\":\"Disconnected\"},\"provisioningState\":\"ehzl\"}},{\"id\":\"gfquwz\",\"location\":\"iibelwcerw\",\"properties\":{\"groupIds\":[\"jxljtxbusq\",\"bxxn\"],\"privateEndpoint\":{\"subnetArmId\":\"sdzhgbdgzpagsec\",\"id\":\"db\"},\"registryPrivateLinkServiceConnectionState\":{\"actionsRequired\":\"r\",\"description\":\"fllmqiy\",\"status\":\"Disconnected\"},\"provisioningState\":\"ellnkkii\"}}],\"publicNetworkAccess\":\"mtum\",\"regionDetails\":[{\"acrDetails\":[{\"systemCreatedAcrAccount\":{},\"userCreatedAcrAccount\":{}}],\"location\":\"axroqvqpilrgunc\",\"storageAccountDetails\":[{\"systemCreatedStorageAccount\":{},\"userCreatedStorageAccount\":{}},{\"systemCreatedStorageAccount\":{},\"userCreatedStorageAccount\":{}},{\"systemCreatedStorageAccount\":{},\"userCreatedStorageAccount\":{}}]},{\"acrDetails\":[{\"systemCreatedAcrAccount\":{},\"userCreatedAcrAccount\":{}},{\"systemCreatedAcrAccount\":{},\"userCreatedAcrAccount\":{}}],\"location\":\"klxymxkqvfqepdxc\",\"storageAccountDetails\":[{\"systemCreatedStorageAccount\":{},\"userCreatedStorageAccount\":{}},{\"systemCreatedStorageAccount\":{},\"userCreatedStorageAccount\":{}},{\"systemCreatedStorageAccount\":{},\"userCreatedStorageAccount\":{}}]}]},\"sku\":{\"name\":\"bowcpjqduqgi\",\"tier\":\"Standard\",\"size\":\"ydfbwlj\",\"family\":\"huerkjddvrglie\",\"capacity\":53261195},\"location\":\"vbiiftksdwgdnk\",\"tags\":{\"zoutb\":\"mwdhcebuvczldbg\",\"orbjg\":\"aqgzekajclyzgs\"},\"id\":\"nzjotvmr\",\"name\":\"khlobvvjbhvhdi\",\"type\":\"ayfluiyuosnu\"}") - .toObject(RegistryInner.class); - Assertions.assertEquals("vbiiftksdwgdnk", model.location()); - Assertions.assertEquals("mwdhcebuvczldbg", model.tags().get("zoutb")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("eqdgcruxsp", model.kind()); - Assertions.assertEquals("bowcpjqduqgi", model.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); - Assertions.assertEquals("ydfbwlj", model.sku().size()); - Assertions.assertEquals("huerkjddvrglie", model.sku().family()); - Assertions.assertEquals(53261195, model.sku().capacity()); - Assertions.assertEquals("ymmqgwokmikp", model.discoveryUrl()); - Assertions.assertEquals("fbmjxuvji", model.intellectualPropertyPublisher()); - Assertions.assertEquals("vhax", model.managedResourceGroup().resourceId()); - Assertions.assertEquals("w", model.mlFlowRegistryUri()); - Assertions.assertEquals("pphthdklmvetatla", model.registryPrivateEndpointConnections().get(0).id()); - Assertions.assertEquals("q", model.registryPrivateEndpointConnections().get(0).location()); - Assertions.assertEquals("giksbbvto", model.registryPrivateEndpointConnections().get(0).groupIds().get(0)); - Assertions.assertEquals("gjtnhtukfacihm", - model.registryPrivateEndpointConnections().get(0).privateEndpoint().subnetArmId()); - Assertions.assertEquals("uvwc", - model.registryPrivateEndpointConnections() - .get(0) - .registryPrivateLinkServiceConnectionState() - .actionsRequired()); - Assertions.assertEquals("sgomtmjz", - model.registryPrivateEndpointConnections() - .get(0) - .registryPrivateLinkServiceConnectionState() - .description()); - Assertions.assertEquals(EndpointServiceConnectionStatus.DISCONNECTED, - model.registryPrivateEndpointConnections().get(0).registryPrivateLinkServiceConnectionState().status()); - Assertions.assertEquals("govsxpwwzt", model.registryPrivateEndpointConnections().get(0).provisioningState()); - Assertions.assertEquals("mtum", model.publicNetworkAccess()); - Assertions.assertEquals("axroqvqpilrgunc", model.regionDetails().get(0).location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RegistryInner model = new RegistryInner().withLocation("vbiiftksdwgdnk") - .withTags(mapOf("zoutb", "mwdhcebuvczldbg", "orbjg", "aqgzekajclyzgs")) - .withIdentity( - new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf("mhk", new UserAssignedIdentity(), "sdsu", new UserAssignedIdentity()))) - .withKind("eqdgcruxsp") - .withSku(new Sku().withName("bowcpjqduqgi") - .withTier(SkuTier.STANDARD) - .withSize("ydfbwlj") - .withFamily("huerkjddvrglie") - .withCapacity(53261195)) - .withDiscoveryUrl("ymmqgwokmikp") - .withIntellectualPropertyPublisher("fbmjxuvji") - .withManagedResourceGroup(new ArmResourceId().withResourceId("vhax")) - .withMlFlowRegistryUri("w") - .withRegistryPrivateEndpointConnections(Arrays.asList( - new RegistryPrivateEndpointConnection().withId("pphthdklmvetatla") - .withLocation("q") - .withGroupIds(Arrays.asList("giksbbvto", "xrpo", "wp")) - .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("gjtnhtukfacihm")) - .withRegistryPrivateLinkServiceConnectionState( - new RegistryPrivateLinkServiceConnectionState().withActionsRequired("uvwc") - .withDescription("sgomtmjz") - .withStatus(EndpointServiceConnectionStatus.DISCONNECTED)) - .withProvisioningState("govsxpwwzt"), - new RegistryPrivateEndpointConnection().withId("mkkhtgfredml") - .withLocation("grllcc") - .withGroupIds(Arrays.asList("jowazhpab", "comlyotgkwsx", "srqorcgenmvceb")) - .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("tqujxcxxqndcqjk")) - .withRegistryPrivateLinkServiceConnectionState( - new RegistryPrivateLinkServiceConnectionState().withActionsRequired("mrvvxwj") - .withDescription("gzseh") - .withStatus(EndpointServiceConnectionStatus.DISCONNECTED)) - .withProvisioningState("ilcchskxxkansbvr"), - new RegistryPrivateEndpointConnection().withId("qgvtojrulfu") - .withLocation("ejrthcfjzhxlyub") - .withGroupIds(Arrays.asList("stvrjeqmt", "zbeqrztrxa", "xrd", "absr")) - .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("nrhpqatiwkk")) - .withRegistryPrivateLinkServiceConnectionState( - new RegistryPrivateLinkServiceConnectionState().withActionsRequired("qxetqmmlivrjjx") - .withDescription("xdchp") - .withStatus(EndpointServiceConnectionStatus.DISCONNECTED)) - .withProvisioningState("ehzl"), - new RegistryPrivateEndpointConnection().withId("gfquwz") - .withLocation("iibelwcerw") - .withGroupIds(Arrays.asList("jxljtxbusq", "bxxn")) - .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("sdzhgbdgzpagsec")) - .withRegistryPrivateLinkServiceConnectionState( - new RegistryPrivateLinkServiceConnectionState().withActionsRequired("r") - .withDescription("fllmqiy") - .withStatus(EndpointServiceConnectionStatus.DISCONNECTED)) - .withProvisioningState("ellnkkii"))) - .withPublicNetworkAccess("mtum") - .withRegionDetails(Arrays.asList( - new RegistryRegionArmDetails() - .withAcrDetails( - Arrays.asList(new AcrDetails().withSystemCreatedAcrAccount(new SystemCreatedAcrAccount()) - .withUserCreatedAcrAccount(new UserCreatedAcrAccount()))) - .withLocation("axroqvqpilrgunc") - .withStorageAccountDetails(Arrays.asList( - new StorageAccountDetails().withSystemCreatedStorageAccount(new SystemCreatedStorageAccount()) - .withUserCreatedStorageAccount(new UserCreatedStorageAccount()), - new StorageAccountDetails().withSystemCreatedStorageAccount(new SystemCreatedStorageAccount()) - .withUserCreatedStorageAccount(new UserCreatedStorageAccount()), - new StorageAccountDetails().withSystemCreatedStorageAccount(new SystemCreatedStorageAccount()) - .withUserCreatedStorageAccount(new UserCreatedStorageAccount()))), - new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList( - new AcrDetails().withSystemCreatedAcrAccount(new SystemCreatedAcrAccount()) - .withUserCreatedAcrAccount(new UserCreatedAcrAccount()), - new AcrDetails().withSystemCreatedAcrAccount(new SystemCreatedAcrAccount()) - .withUserCreatedAcrAccount(new UserCreatedAcrAccount()))) - .withLocation("klxymxkqvfqepdxc") - .withStorageAccountDetails(Arrays.asList( - new StorageAccountDetails().withSystemCreatedStorageAccount(new SystemCreatedStorageAccount()) - .withUserCreatedStorageAccount(new UserCreatedStorageAccount()), - new StorageAccountDetails().withSystemCreatedStorageAccount(new SystemCreatedStorageAccount()) - .withUserCreatedStorageAccount(new UserCreatedStorageAccount()), - new StorageAccountDetails().withSystemCreatedStorageAccount(new SystemCreatedStorageAccount()) - .withUserCreatedStorageAccount(new UserCreatedStorageAccount()))))); - model = BinaryData.fromObject(model).toObject(RegistryInner.class); - Assertions.assertEquals("vbiiftksdwgdnk", model.location()); - Assertions.assertEquals("mwdhcebuvczldbg", model.tags().get("zoutb")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("eqdgcruxsp", model.kind()); - Assertions.assertEquals("bowcpjqduqgi", model.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); - Assertions.assertEquals("ydfbwlj", model.sku().size()); - Assertions.assertEquals("huerkjddvrglie", model.sku().family()); - Assertions.assertEquals(53261195, model.sku().capacity()); - Assertions.assertEquals("ymmqgwokmikp", model.discoveryUrl()); - Assertions.assertEquals("fbmjxuvji", model.intellectualPropertyPublisher()); - Assertions.assertEquals("vhax", model.managedResourceGroup().resourceId()); - Assertions.assertEquals("w", model.mlFlowRegistryUri()); - Assertions.assertEquals("pphthdklmvetatla", model.registryPrivateEndpointConnections().get(0).id()); - Assertions.assertEquals("q", model.registryPrivateEndpointConnections().get(0).location()); - Assertions.assertEquals("giksbbvto", model.registryPrivateEndpointConnections().get(0).groupIds().get(0)); - Assertions.assertEquals("gjtnhtukfacihm", - model.registryPrivateEndpointConnections().get(0).privateEndpoint().subnetArmId()); - Assertions.assertEquals("uvwc", - model.registryPrivateEndpointConnections() - .get(0) - .registryPrivateLinkServiceConnectionState() - .actionsRequired()); - Assertions.assertEquals("sgomtmjz", - model.registryPrivateEndpointConnections() - .get(0) - .registryPrivateLinkServiceConnectionState() - .description()); - Assertions.assertEquals(EndpointServiceConnectionStatus.DISCONNECTED, - model.registryPrivateEndpointConnections().get(0).registryPrivateLinkServiceConnectionState().status()); - Assertions.assertEquals("govsxpwwzt", model.registryPrivateEndpointConnections().get(0).provisioningState()); - Assertions.assertEquals("mtum", model.publicNetworkAccess()); - Assertions.assertEquals("axroqvqpilrgunc", model.regionDetails().get(0).location()); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersCreateOrUpdateMockTests.java deleted file mode 100644 index 191ce9a3b89de..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersCreateOrUpdateMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; -import com.azure.resourcemanager.machinelearning.models.ModelContainer; -import com.azure.resourcemanager.machinelearning.models.ModelContainerProperties; -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 reactor.core.publisher.Mono; - -public final class RegistryModelContainersCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":true,\"latestVersion\":\"skmpeajzzypa\",\"nextVersion\":\"mzmzfntteyrftxyt\",\"description\":\"ypjdrjli\",\"tags\":{\"vjqxav\":\"vbfaehjji\",\"sscygyzhcvlavyrj\":\"mdmracfsffdralih\",\"u\":\"ndxrmyzvtiojtpd\",\"h\":\"xaxoyj\"},\"properties\":{\"teccxfn\":\"edigiv\"}},\"id\":\"ntmcaxb\",\"name\":\"pmfhjikqcnbdq\",\"type\":\"tghnmelzvrchm\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.registryModelContainers() - .createOrUpdate("rgmnkgtlhzkrazk", "oiyecznvzmsvzng", "eqzhehgvmm", - new ModelContainerInner().withProperties(new ModelContainerProperties().withDescription("ilzvxotno") - .withTags(mapOf("mbwcacwa", "cdvhyefqhxyts", "xra", "qakvokya")) - .withProperties(mapOf("mmd", "reqbr")) - .withIsArchived(true)), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ypjdrjli", response.properties().description()); - Assertions.assertEquals("vbfaehjji", response.properties().tags().get("vjqxav")); - Assertions.assertEquals("edigiv", response.properties().properties().get("teccxfn")); - Assertions.assertEquals(true, response.properties().isArchived()); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersDeleteMockTests.java deleted file mode 100644 index d520a6af0e92e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryModelContainersDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.registryModelContainers().delete("ujyiqywlpxm", "iytdeg", "runbkil", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersGetWithResponseMockTests.java deleted file mode 100644 index f48834b03daa2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ModelContainer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryModelContainersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Failed\",\"isArchived\":false,\"latestVersion\":\"denmjogx\",\"nextVersion\":\"ggyciwbnqi\",\"description\":\"sx\",\"tags\":{\"oxqswsych\":\"rnjrdi\",\"nowvfxeytzgwjek\":\"cjggcmpncjqbgbno\",\"bdvxlfhlzzgapsp\":\"qirvcpolnvgpppdi\"},\"properties\":{\"xnroyhthesyw\":\"blscrmzquuzywkgo\",\"zcwuejmxlfzl\":\"wnvgyoscif\",\"hrau\":\"zyrgrlh\"}},\"id\":\"ovlx\",\"name\":\"tvmvzpni\",\"type\":\"wx\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.registryModelContainers() - .getWithResponse("stekbirhyv", "yuvriemorszffi", "kltrvgioguoxc", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("sx", response.properties().description()); - Assertions.assertEquals("rnjrdi", response.properties().tags().get("oxqswsych")); - Assertions.assertEquals("blscrmzquuzywkgo", response.properties().properties().get("xnroyhthesyw")); - Assertions.assertEquals(false, response.properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersListMockTests.java deleted file mode 100644 index 8188868975476..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelContainersListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.ModelContainer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryModelContainersListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"isArchived\":false,\"latestVersion\":\"rolhsfddk\",\"nextVersion\":\"vevwxmnbw\",\"description\":\"a\",\"tags\":{\"na\":\"npyhtuhalpqil\",\"zbtgtzpcat\":\"kexznpnytkqjarl\",\"ujfgtg\":\"mz\"},\"properties\":{\"naidvssv\":\"pczeg\",\"bqgzkuobclo\":\"yoggkztzttjnkn\"}},\"id\":\"aqeizp\",\"name\":\"iqlyugp\",\"type\":\"nhzjmkffeonmnv\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.registryModelContainers() - .list("xyksznfstmp", "vgrandzktwo", "lpczlq", ListViewType.ALL, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("a", response.iterator().next().properties().description()); - Assertions.assertEquals("npyhtuhalpqil", response.iterator().next().properties().tags().get("na")); - Assertions.assertEquals("pczeg", response.iterator().next().properties().properties().get("naidvssv")); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsCreateOrUpdateMockTests.java deleted file mode 100644 index 4909c6310aad5..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsCreateOrUpdateMockTests.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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; -import com.azure.resourcemanager.machinelearning.models.FlavorData; -import com.azure.resourcemanager.machinelearning.models.ModelVersion; -import com.azure.resourcemanager.machinelearning.models.ModelVersionProperties; -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 reactor.core.publisher.Mono; - -public final class RegistryModelVersionsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"flavors\":{\"rnlsyiaanistc\":{\"data\":{\"ivxcodwkwoytcach\":\"txrrgkwiyoyhq\",\"fiikqcdnzsfiu\":\"sizfuewlf\",\"o\":\"gne\",\"ufakrxjjwnbrmdwt\":\"mcrxlyzoaho\"}}},\"modelType\":\"atclpphcs\",\"modelUri\":\"rycpanapfa\",\"jobName\":\"zrinlpxngzzx\",\"provisioningState\":\"Succeeded\",\"stage\":\"nzmzct\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"ifpucv\",\"tags\":{\"e\":\"zwbsk\",\"qmbinpxmiwt\":\"fz\"},\"properties\":{\"abux\":\"fpvrdukcdnzox\",\"wshramqsugqcgl\":\"wgb\",\"xvqlauu\":\"adfzto\",\"fmcerfxfeiqba\":\"gwa\"}},\"id\":\"hzwj\",\"name\":\"pssvnonij\",\"type\":\"qcj\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.registryModelVersions() - .createOrUpdate("susfdyw", "rqcowk", "ndgrciff", "xqqnugt", - new ModelVersionInner().withProperties(new ModelVersionProperties().withDescription("lqllbofsn") - .withTags(mapOf("hxgiknr", "yb", "feamz", "ugseiqbroq", "pksgo", "uxd")) - .withProperties(mapOf("ldrqqv", "nvnj", "xedthfwlnvqac", "ugusqlx", "blnlmpuyypaggpai", "yfi")) - .withIsArchived(true) - .withIsAnonymous(false) - .withFlavors(mapOf("ifmyzb", - new FlavorData().withData(mapOf("yjdiujticwmlfz", "g", "bktuajkufpvvd", "hibfmco", - "fyqzaisfofgvmrkm", "nmeiomnobbaibcf")), - "bpcwtwtrchkcmru", new FlavorData().withData(mapOf("cmtslptb", "nh", "cnuqfpzjz", "ponhblqi")), - "zgi", - new FlavorData() - .withData(mapOf("xipwqchfpt", "esqsqmie", "ajcur", "kkvjjl", "izchmb", "yqokbgumuejxxpx")), - "yahfoyfz", - new FlavorData().withData(mapOf("laybhozlsb", "jkngzfs", "ytrsljzmzui", "fnhbvcntpoe", - "mkqbylbbnjldicq", "sggsxznbp", "efwlenitv", "ma")))) - .withModelType("dyaepre") - .withModelUri("jukfalwceechcayv") - .withJobName("eqpucnus") - .withStage("hicrjriy")), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ifpucv", response.properties().description()); - Assertions.assertEquals("zwbsk", response.properties().tags().get("e")); - Assertions.assertEquals("fpvrdukcdnzox", response.properties().properties().get("abux")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals("txrrgkwiyoyhq", - response.properties().flavors().get("rnlsyiaanistc").data().get("ivxcodwkwoytcach")); - Assertions.assertEquals("atclpphcs", response.properties().modelType()); - Assertions.assertEquals("rycpanapfa", response.properties().modelUri()); - Assertions.assertEquals("zrinlpxngzzx", response.properties().jobName()); - Assertions.assertEquals("nzmzct", response.properties().stage()); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsDeleteMockTests.java deleted file mode 100644 index 7ad5b30b8233b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryModelVersionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.registryModelVersions() - .delete("uxkdiumgsivxw", "scwbshf", "hvlms", "eylaulpuexy", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsGetWithResponseMockTests.java deleted file mode 100644 index 8b1763598ec96..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ModelVersion; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryModelVersionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"flavors\":{\"pmonxdwf\":{\"data\":{\"qtfkmvzr\":\"svsyltap\"}},\"subehztbejrdzwyk\":{\"data\":{\"zene\":\"bgftfvqukkm\",\"jylwqqsemjhhx\":\"pdq\"}}},\"modelType\":\"pfzwufifnj\",\"modelUri\":\"hmjkykqf\",\"jobName\":\"mcyk\",\"provisioningState\":\"Canceled\",\"stage\":\"mkbndnrihpjax\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"noignydlkrnpsb\",\"tags\":{\"pfgwdxmiaelnpbi\":\"mhkipjardv\"},\"properties\":{\"skjvaycxrwknsbg\":\"unddvjlpbjszqj\"}},\"id\":\"pbrzwi\",\"name\":\"pzcyhk\",\"type\":\"cebtpgvut\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.registryModelVersions() - .getWithResponse("gxzty", "c", "d", "lspgnndefyhsb", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("noignydlkrnpsb", response.properties().description()); - Assertions.assertEquals("mhkipjardv", response.properties().tags().get("pfgwdxmiaelnpbi")); - Assertions.assertEquals("unddvjlpbjszqj", response.properties().properties().get("skjvaycxrwknsbg")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals("svsyltap", response.properties().flavors().get("pmonxdwf").data().get("qtfkmvzr")); - Assertions.assertEquals("pfzwufifnj", response.properties().modelType()); - Assertions.assertEquals("hmjkykqf", response.properties().modelUri()); - Assertions.assertEquals("mcyk", response.properties().jobName()); - Assertions.assertEquals("mkbndnrihpjax", response.properties().stage()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsListMockTests.java deleted file mode 100644 index 0a9e4a89b4f2e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryModelVersionsListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.ModelVersion; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class RegistryModelVersionsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"flavors\":{\"cocdxvbeqzjd\":{\"data\":{\"mv\":\"gosijiqexqwqy\",\"cnnkvthwtam\":\"gflhdhoxur\",\"gyvxhfmuhkezuucq\":\"m\"}}},\"modelType\":\"tutpdwnee\",\"modelUri\":\"ytlxugjr\",\"jobName\":\"nffaofkvfruxzkfb\",\"provisioningState\":\"Failed\",\"stage\":\"kzovstvymdqay\",\"isArchived\":false,\"isAnonymous\":true,\"description\":\"zgubqkfnoxhvo\",\"tags\":{\"xwejuguvnx\":\"gfkrqsjrvpakxrde\",\"yfenrozoijoxcbpk\":\"ohpzurnzoytkbea\",\"pan\":\"wseacbtaxd\",\"r\":\"sxwhxrztda\"},\"properties\":{\"gqysyaj\":\"k\"}},\"id\":\"czupdcbgr\",\"name\":\"f\",\"type\":\"db\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.registryModelVersions() - .list("ucgrmwyv", "d", "yplgq", "qgrbrhhv", "pgtipaaoylwh", 445590794, "kbweasgypjixdmob", "dyd", - "qeuwdvclsxdqdch", "zibixrgsrwxxqkwa", ListViewType.ARCHIVED_ONLY, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("zgubqkfnoxhvo", response.iterator().next().properties().description()); - Assertions.assertEquals("gfkrqsjrvpakxrde", response.iterator().next().properties().tags().get("xwejuguvnx")); - Assertions.assertEquals("k", response.iterator().next().properties().properties().get("gqysyaj")); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); - Assertions.assertEquals(true, response.iterator().next().properties().isAnonymous()); - Assertions.assertEquals("gosijiqexqwqy", - response.iterator().next().properties().flavors().get("cocdxvbeqzjd").data().get("mv")); - Assertions.assertEquals("tutpdwnee", response.iterator().next().properties().modelType()); - Assertions.assertEquals("ytlxugjr", response.iterator().next().properties().modelUri()); - Assertions.assertEquals("nffaofkvfruxzkfb", response.iterator().next().properties().jobName()); - Assertions.assertEquals("kzovstvymdqay", response.iterator().next().properties().stage()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPartialManagedServiceIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPartialManagedServiceIdentityTests.java deleted file mode 100644 index 3cf7a50353edd..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPartialManagedServiceIdentityTests.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.RegistryPartialManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class RegistryPartialManagedServiceIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RegistryPartialManagedServiceIdentity model = BinaryData.fromString( - "{\"principalId\":\"acaceebc-8dc5-46a0-a47a-b4682a356778\",\"tenantId\":\"05e04309-83a4-4a06-a3fe-43ad2d346a82\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"dynzjahwr\":{\"principalId\":\"fd0a6aeb-9da8-46f3-9fec-e6c6e47ced61\",\"clientId\":\"48715817-14d2-4ade-b6f6-ebc25ebde7a4\"}}}") - .toObject(RegistryPartialManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RegistryPartialManagedServiceIdentity model - = new RegistryPartialManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("dynzjahwr", new UserAssignedIdentity())); - model = BinaryData.fromObject(model).toObject(RegistryPartialManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPrivateEndpointConnectionPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPrivateEndpointConnectionPropertiesTests.java deleted file mode 100644 index 24dad62377428..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPrivateEndpointConnectionPropertiesTests.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.fluent.models.RegistryPrivateEndpointConnectionProperties; -import com.azure.resourcemanager.machinelearning.models.EndpointServiceConnectionStatus; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointResource; -import com.azure.resourcemanager.machinelearning.models.RegistryPrivateLinkServiceConnectionState; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RegistryPrivateEndpointConnectionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RegistryPrivateEndpointConnectionProperties model = BinaryData.fromString( - "{\"groupIds\":[\"dfqnhttwdowrczfj\"],\"privateEndpoint\":{\"subnetArmId\":\"uxxrkkmhmnulwemp\",\"id\":\"ifrhjulrsul\"},\"registryPrivateLinkServiceConnectionState\":{\"actionsRequired\":\"flu\",\"description\":\"awmhh\",\"status\":\"Approved\"},\"provisioningState\":\"friyrg\"}") - .toObject(RegistryPrivateEndpointConnectionProperties.class); - Assertions.assertEquals("dfqnhttwdowrczfj", model.groupIds().get(0)); - Assertions.assertEquals("uxxrkkmhmnulwemp", model.privateEndpoint().subnetArmId()); - Assertions.assertEquals("flu", model.registryPrivateLinkServiceConnectionState().actionsRequired()); - Assertions.assertEquals("awmhh", model.registryPrivateLinkServiceConnectionState().description()); - Assertions.assertEquals(EndpointServiceConnectionStatus.APPROVED, - model.registryPrivateLinkServiceConnectionState().status()); - Assertions.assertEquals("friyrg", model.provisioningState()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RegistryPrivateEndpointConnectionProperties model - = new RegistryPrivateEndpointConnectionProperties().withGroupIds(Arrays.asList("dfqnhttwdowrczfj")) - .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("uxxrkkmhmnulwemp")) - .withRegistryPrivateLinkServiceConnectionState( - new RegistryPrivateLinkServiceConnectionState().withActionsRequired("flu") - .withDescription("awmhh") - .withStatus(EndpointServiceConnectionStatus.APPROVED)) - .withProvisioningState("friyrg"); - model = BinaryData.fromObject(model).toObject(RegistryPrivateEndpointConnectionProperties.class); - Assertions.assertEquals("dfqnhttwdowrczfj", model.groupIds().get(0)); - Assertions.assertEquals("uxxrkkmhmnulwemp", model.privateEndpoint().subnetArmId()); - Assertions.assertEquals("flu", model.registryPrivateLinkServiceConnectionState().actionsRequired()); - Assertions.assertEquals("awmhh", model.registryPrivateLinkServiceConnectionState().description()); - Assertions.assertEquals(EndpointServiceConnectionStatus.APPROVED, - model.registryPrivateLinkServiceConnectionState().status()); - Assertions.assertEquals("friyrg", model.provisioningState()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPrivateEndpointConnectionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPrivateEndpointConnectionTests.java deleted file mode 100644 index 9310621b6c63f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPrivateEndpointConnectionTests.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.EndpointServiceConnectionStatus; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointResource; -import com.azure.resourcemanager.machinelearning.models.RegistryPrivateEndpointConnection; -import com.azure.resourcemanager.machinelearning.models.RegistryPrivateLinkServiceConnectionState; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RegistryPrivateEndpointConnectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RegistryPrivateEndpointConnection model = BinaryData.fromString( - "{\"id\":\"vvjhvvlrlohewjj\",\"location\":\"jnkdflqion\",\"properties\":{\"groupIds\":[\"qkzfz\"],\"privateEndpoint\":{\"subnetArmId\":\"oshohtotrye\",\"id\":\"khxrmexznlwkbf\"},\"registryPrivateLinkServiceConnectionState\":{\"actionsRequired\":\"khup\",\"description\":\"rufgjblcdrmyfcem\",\"status\":\"Rejected\"},\"provisioningState\":\"yykyalu\"}}") - .toObject(RegistryPrivateEndpointConnection.class); - Assertions.assertEquals("vvjhvvlrlohewjj", model.id()); - Assertions.assertEquals("jnkdflqion", model.location()); - Assertions.assertEquals("qkzfz", model.groupIds().get(0)); - Assertions.assertEquals("oshohtotrye", model.privateEndpoint().subnetArmId()); - Assertions.assertEquals("khup", model.registryPrivateLinkServiceConnectionState().actionsRequired()); - Assertions.assertEquals("rufgjblcdrmyfcem", model.registryPrivateLinkServiceConnectionState().description()); - Assertions.assertEquals(EndpointServiceConnectionStatus.REJECTED, - model.registryPrivateLinkServiceConnectionState().status()); - Assertions.assertEquals("yykyalu", model.provisioningState()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RegistryPrivateEndpointConnection model = new RegistryPrivateEndpointConnection().withId("vvjhvvlrlohewjj") - .withLocation("jnkdflqion") - .withGroupIds(Arrays.asList("qkzfz")) - .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("oshohtotrye")) - .withRegistryPrivateLinkServiceConnectionState( - new RegistryPrivateLinkServiceConnectionState().withActionsRequired("khup") - .withDescription("rufgjblcdrmyfcem") - .withStatus(EndpointServiceConnectionStatus.REJECTED)) - .withProvisioningState("yykyalu"); - model = BinaryData.fromObject(model).toObject(RegistryPrivateEndpointConnection.class); - Assertions.assertEquals("vvjhvvlrlohewjj", model.id()); - Assertions.assertEquals("jnkdflqion", model.location()); - Assertions.assertEquals("qkzfz", model.groupIds().get(0)); - Assertions.assertEquals("oshohtotrye", model.privateEndpoint().subnetArmId()); - Assertions.assertEquals("khup", model.registryPrivateLinkServiceConnectionState().actionsRequired()); - Assertions.assertEquals("rufgjblcdrmyfcem", model.registryPrivateLinkServiceConnectionState().description()); - Assertions.assertEquals(EndpointServiceConnectionStatus.REJECTED, - model.registryPrivateLinkServiceConnectionState().status()); - Assertions.assertEquals("yykyalu", model.provisioningState()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPrivateLinkServiceConnectionStateTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPrivateLinkServiceConnectionStateTests.java deleted file mode 100644 index 954b791af0ba5..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPrivateLinkServiceConnectionStateTests.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.EndpointServiceConnectionStatus; -import com.azure.resourcemanager.machinelearning.models.RegistryPrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; - -public final class RegistryPrivateLinkServiceConnectionStateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RegistryPrivateLinkServiceConnectionState model = BinaryData - .fromString("{\"actionsRequired\":\"cqydey\",\"description\":\"skiczd\",\"status\":\"Approved\"}") - .toObject(RegistryPrivateLinkServiceConnectionState.class); - Assertions.assertEquals("cqydey", model.actionsRequired()); - Assertions.assertEquals("skiczd", model.description()); - Assertions.assertEquals(EndpointServiceConnectionStatus.APPROVED, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RegistryPrivateLinkServiceConnectionState model - = new RegistryPrivateLinkServiceConnectionState().withActionsRequired("cqydey") - .withDescription("skiczd") - .withStatus(EndpointServiceConnectionStatus.APPROVED); - model = BinaryData.fromObject(model).toObject(RegistryPrivateLinkServiceConnectionState.class); - Assertions.assertEquals("cqydey", model.actionsRequired()); - Assertions.assertEquals("skiczd", model.description()); - Assertions.assertEquals(EndpointServiceConnectionStatus.APPROVED, model.status()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPropertiesTests.java deleted file mode 100644 index be91556d57c67..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryPropertiesTests.java +++ /dev/null @@ -1,281 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code 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.RegistryProperties; -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.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.StorageAccountDetails; -import com.azure.resourcemanager.machinelearning.models.SystemCreatedAcrAccount; -import com.azure.resourcemanager.machinelearning.models.SystemCreatedStorageAccount; -import com.azure.resourcemanager.machinelearning.models.UserCreatedAcrAccount; -import com.azure.resourcemanager.machinelearning.models.UserCreatedStorageAccount; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RegistryPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RegistryProperties model = BinaryData.fromString( - "{\"discoveryUrl\":\"t\",\"intellectualPropertyPublisher\":\"vhyibdrqrsw\",\"managedResourceGroup\":{\"resourceId\":\"ubpyrow\"},\"mlFlowRegistryUri\":\"oxztfwfqch\",\"registryPrivateEndpointConnections\":[{\"id\":\"vjnn\",\"location\":\"agfyvrtpqpe\",\"properties\":{\"groupIds\":[\"gkrepdqhqyhw\",\"wemvxqabckmze\",\"xin\"],\"privateEndpoint\":{\"subnetArmId\":\"eoh\",\"id\":\"h\"},\"registryPrivateLinkServiceConnectionState\":{\"actionsRequired\":\"zjpcee\",\"description\":\"zangprbfaxyxzlbc\",\"status\":\"Approved\"},\"provisioningState\":\"sexroqrndkt\"}},{\"id\":\"vonfeeqgpkr\",\"location\":\"tbgnixxowwzkyfw\",\"properties\":{\"groupIds\":[\"wxeiicrmpepk\",\"dm\",\"xxij\"],\"privateEndpoint\":{\"subnetArmId\":\"ws\",\"id\":\"kjgyacwrasekwe\"},\"registryPrivateLinkServiceConnectionState\":{\"actionsRequired\":\"o\",\"description\":\"woqartwy\",\"status\":\"Approved\"},\"provisioningState\":\"l\"}},{\"id\":\"vatdavuqmcbymsf\",\"location\":\"jlquvjez\",\"properties\":{\"groupIds\":[\"v\",\"simi\",\"yoi\"],\"privateEndpoint\":{\"subnetArmId\":\"miqwnnrac\",\"id\":\"bbfqpspklady\"},\"registryPrivateLinkServiceConnectionState\":{\"actionsRequired\":\"hautw\",\"description\":\"exzgpmnmabedd\",\"status\":\"Disconnected\"},\"provisioningState\":\"gdfpfqfpcvst\"}}],\"publicNetworkAccess\":\"gq\",\"regionDetails\":[{\"acrDetails\":[{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"xbsmtbljje\",\"acrAccountSku\":\"ci\",\"armResourceId\":{}},\"userCreatedAcrAccount\":{\"armResourceId\":{}}},{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"tbrekqhsqhtf\",\"acrAccountSku\":\"pqbye\",\"armResourceId\":{}},\"userCreatedAcrAccount\":{\"armResourceId\":{}}},{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"dqigmg\",\"acrAccountSku\":\"inztxl\",\"armResourceId\":{}},\"userCreatedAcrAccount\":{\"armResourceId\":{}}}],\"location\":\"jcmrnkfm\",\"storageAccountDetails\":[{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":false,\"armResourceId\":{},\"storageAccountHnsEnabled\":false,\"storageAccountName\":\"jnqtqe\",\"storageAccountType\":\"j\"},\"userCreatedStorageAccount\":{\"armResourceId\":{}}},{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":true,\"armResourceId\":{},\"storageAccountHnsEnabled\":false,\"storageAccountName\":\"dxe\",\"storageAccountType\":\"h\"},\"userCreatedStorageAccount\":{\"armResourceId\":{}}},{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":false,\"armResourceId\":{},\"storageAccountHnsEnabled\":true,\"storageAccountName\":\"k\",\"storageAccountType\":\"kqynspgbvo\"},\"userCreatedStorageAccount\":{\"armResourceId\":{}}},{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":false,\"armResourceId\":{},\"storageAccountHnsEnabled\":true,\"storageAccountName\":\"exqokmy\",\"storageAccountType\":\"jialz\"},\"userCreatedStorageAccount\":{\"armResourceId\":{}}}]},{\"acrDetails\":[{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"pbcjtrpzuyudivbx\",\"acrAccountSku\":\"sqeaeonqelwg\",\"armResourceId\":{}},\"userCreatedAcrAccount\":{\"armResourceId\":{}}},{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"y\",\"acrAccountSku\":\"arogatmolji\",\"armResourceId\":{}},\"userCreatedAcrAccount\":{\"armResourceId\":{}}},{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"mzvfkneerz\",\"acrAccountSku\":\"rknsjulug\",\"armResourceId\":{}},\"userCreatedAcrAccount\":{\"armResourceId\":{}}}],\"location\":\"rxle\",\"storageAccountDetails\":[{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":false,\"armResourceId\":{},\"storageAccountHnsEnabled\":false,\"storageAccountName\":\"ihtd\",\"storageAccountType\":\"wjekptycaydbj\"},\"userCreatedStorageAccount\":{\"armResourceId\":{}}},{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":false,\"armResourceId\":{},\"storageAccountHnsEnabled\":false,\"storageAccountName\":\"hmhsurlgwqkpm\",\"storageAccountType\":\"pstauol\"},\"userCreatedStorageAccount\":{\"armResourceId\":{}}}]}]}") - .toObject(RegistryProperties.class); - Assertions.assertEquals("t", model.discoveryUrl()); - Assertions.assertEquals("vhyibdrqrsw", model.intellectualPropertyPublisher()); - Assertions.assertEquals("ubpyrow", model.managedResourceGroup().resourceId()); - Assertions.assertEquals("oxztfwfqch", model.mlFlowRegistryUri()); - Assertions.assertEquals("vjnn", model.registryPrivateEndpointConnections().get(0).id()); - Assertions.assertEquals("agfyvrtpqpe", model.registryPrivateEndpointConnections().get(0).location()); - Assertions.assertEquals("gkrepdqhqyhw", model.registryPrivateEndpointConnections().get(0).groupIds().get(0)); - Assertions.assertEquals("eoh", - model.registryPrivateEndpointConnections().get(0).privateEndpoint().subnetArmId()); - Assertions.assertEquals("zjpcee", - model.registryPrivateEndpointConnections() - .get(0) - .registryPrivateLinkServiceConnectionState() - .actionsRequired()); - Assertions.assertEquals("zangprbfaxyxzlbc", - model.registryPrivateEndpointConnections() - .get(0) - .registryPrivateLinkServiceConnectionState() - .description()); - Assertions.assertEquals(EndpointServiceConnectionStatus.APPROVED, - model.registryPrivateEndpointConnections().get(0).registryPrivateLinkServiceConnectionState().status()); - Assertions.assertEquals("sexroqrndkt", model.registryPrivateEndpointConnections().get(0).provisioningState()); - Assertions.assertEquals("gq", model.publicNetworkAccess()); - Assertions.assertEquals("xbsmtbljje", - model.regionDetails().get(0).acrDetails().get(0).systemCreatedAcrAccount().acrAccountName()); - Assertions.assertEquals("ci", - model.regionDetails().get(0).acrDetails().get(0).systemCreatedAcrAccount().acrAccountSku()); - Assertions.assertEquals("jcmrnkfm", model.regionDetails().get(0).location()); - Assertions.assertEquals(false, - model.regionDetails() - .get(0) - .storageAccountDetails() - .get(0) - .systemCreatedStorageAccount() - .allowBlobPublicAccess()); - Assertions.assertEquals(false, - model.regionDetails() - .get(0) - .storageAccountDetails() - .get(0) - .systemCreatedStorageAccount() - .storageAccountHnsEnabled()); - Assertions.assertEquals("jnqtqe", - model.regionDetails() - .get(0) - .storageAccountDetails() - .get(0) - .systemCreatedStorageAccount() - .storageAccountName()); - Assertions.assertEquals("j", - model.regionDetails() - .get(0) - .storageAccountDetails() - .get(0) - .systemCreatedStorageAccount() - .storageAccountType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RegistryProperties model = new RegistryProperties().withDiscoveryUrl("t") - .withIntellectualPropertyPublisher("vhyibdrqrsw") - .withManagedResourceGroup(new ArmResourceId().withResourceId("ubpyrow")) - .withMlFlowRegistryUri("oxztfwfqch") - .withRegistryPrivateEndpointConnections(Arrays.asList( - new RegistryPrivateEndpointConnection().withId("vjnn") - .withLocation("agfyvrtpqpe") - .withGroupIds(Arrays.asList("gkrepdqhqyhw", "wemvxqabckmze", "xin")) - .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("eoh")) - .withRegistryPrivateLinkServiceConnectionState( - new RegistryPrivateLinkServiceConnectionState().withActionsRequired("zjpcee") - .withDescription("zangprbfaxyxzlbc") - .withStatus(EndpointServiceConnectionStatus.APPROVED)) - .withProvisioningState("sexroqrndkt"), - new RegistryPrivateEndpointConnection().withId("vonfeeqgpkr") - .withLocation("tbgnixxowwzkyfw") - .withGroupIds(Arrays.asList("wxeiicrmpepk", "dm", "xxij")) - .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("ws")) - .withRegistryPrivateLinkServiceConnectionState( - new RegistryPrivateLinkServiceConnectionState().withActionsRequired("o") - .withDescription("woqartwy") - .withStatus(EndpointServiceConnectionStatus.APPROVED)) - .withProvisioningState("l"), - new RegistryPrivateEndpointConnection().withId("vatdavuqmcbymsf") - .withLocation("jlquvjez") - .withGroupIds(Arrays.asList("v", "simi", "yoi")) - .withPrivateEndpoint(new PrivateEndpointResource().withSubnetArmId("miqwnnrac")) - .withRegistryPrivateLinkServiceConnectionState( - new RegistryPrivateLinkServiceConnectionState().withActionsRequired("hautw") - .withDescription("exzgpmnmabedd") - .withStatus(EndpointServiceConnectionStatus.DISCONNECTED)) - .withProvisioningState("gdfpfqfpcvst"))) - .withPublicNetworkAccess("gq") - .withRegionDetails(Arrays.asList(new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList( - new AcrDetails() - .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("xbsmtbljje") - .withAcrAccountSku("ci") - .withArmResourceId(new ArmResourceId())) - .withUserCreatedAcrAccount(new UserCreatedAcrAccount().withArmResourceId(new ArmResourceId())), - new AcrDetails() - .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("tbrekqhsqhtf") - .withAcrAccountSku("pqbye") - .withArmResourceId(new ArmResourceId())) - .withUserCreatedAcrAccount(new UserCreatedAcrAccount().withArmResourceId(new ArmResourceId())), - new AcrDetails() - .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("dqigmg") - .withAcrAccountSku("inztxl") - .withArmResourceId(new ArmResourceId())) - .withUserCreatedAcrAccount(new UserCreatedAcrAccount().withArmResourceId(new ArmResourceId())))) - .withLocation("jcmrnkfm") - .withStorageAccountDetails( - Arrays - .asList( - new StorageAccountDetails() - .withSystemCreatedStorageAccount(new SystemCreatedStorageAccount() - .withAllowBlobPublicAccess(false) - .withArmResourceId(new ArmResourceId()) - .withStorageAccountHnsEnabled(false) - .withStorageAccountName("jnqtqe") - .withStorageAccountType("j")) - .withUserCreatedStorageAccount( - new UserCreatedStorageAccount().withArmResourceId(new ArmResourceId())), - new StorageAccountDetails() - .withSystemCreatedStorageAccount( - new SystemCreatedStorageAccount() - .withAllowBlobPublicAccess(true) - .withArmResourceId(new ArmResourceId()) - .withStorageAccountHnsEnabled(false) - .withStorageAccountName("dxe") - .withStorageAccountType("h")) - .withUserCreatedStorageAccount(new UserCreatedStorageAccount() - .withArmResourceId(new ArmResourceId())), - new StorageAccountDetails() - .withSystemCreatedStorageAccount( - new SystemCreatedStorageAccount() - .withAllowBlobPublicAccess(false) - .withArmResourceId(new ArmResourceId()) - .withStorageAccountHnsEnabled(true) - .withStorageAccountName("k") - .withStorageAccountType("kqynspgbvo")) - .withUserCreatedStorageAccount( - new UserCreatedStorageAccount().withArmResourceId(new ArmResourceId())), - new StorageAccountDetails() - .withSystemCreatedStorageAccount( - new SystemCreatedStorageAccount().withAllowBlobPublicAccess(false) - .withArmResourceId(new ArmResourceId()) - .withStorageAccountHnsEnabled(true) - .withStorageAccountName("exqokmy") - .withStorageAccountType("jialz")) - .withUserCreatedStorageAccount( - new UserCreatedStorageAccount().withArmResourceId(new ArmResourceId())))), - new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList( - new AcrDetails() - .withSystemCreatedAcrAccount( - new SystemCreatedAcrAccount().withAcrAccountName("pbcjtrpzuyudivbx") - .withAcrAccountSku("sqeaeonqelwg") - .withArmResourceId(new ArmResourceId())) - .withUserCreatedAcrAccount( - new UserCreatedAcrAccount().withArmResourceId(new ArmResourceId())), - new AcrDetails() - .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("y") - .withAcrAccountSku("arogatmolji") - .withArmResourceId(new ArmResourceId())) - .withUserCreatedAcrAccount( - new UserCreatedAcrAccount().withArmResourceId(new ArmResourceId())), - new AcrDetails() - .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("mzvfkneerz") - .withAcrAccountSku("rknsjulug") - .withArmResourceId(new ArmResourceId())) - .withUserCreatedAcrAccount( - new UserCreatedAcrAccount().withArmResourceId(new ArmResourceId())))) - .withLocation("rxle") - .withStorageAccountDetails(Arrays.asList( - new StorageAccountDetails() - .withSystemCreatedStorageAccount( - new SystemCreatedStorageAccount().withAllowBlobPublicAccess(false) - .withArmResourceId(new ArmResourceId()) - .withStorageAccountHnsEnabled(false) - .withStorageAccountName("ihtd") - .withStorageAccountType("wjekptycaydbj")) - .withUserCreatedStorageAccount( - new UserCreatedStorageAccount().withArmResourceId(new ArmResourceId())), - new StorageAccountDetails() - .withSystemCreatedStorageAccount( - new SystemCreatedStorageAccount().withAllowBlobPublicAccess(false) - .withArmResourceId(new ArmResourceId()) - .withStorageAccountHnsEnabled(false) - .withStorageAccountName("hmhsurlgwqkpm") - .withStorageAccountType("pstauol")) - .withUserCreatedStorageAccount( - new UserCreatedStorageAccount().withArmResourceId(new ArmResourceId())))))); - model = BinaryData.fromObject(model).toObject(RegistryProperties.class); - Assertions.assertEquals("t", model.discoveryUrl()); - Assertions.assertEquals("vhyibdrqrsw", model.intellectualPropertyPublisher()); - Assertions.assertEquals("ubpyrow", model.managedResourceGroup().resourceId()); - Assertions.assertEquals("oxztfwfqch", model.mlFlowRegistryUri()); - Assertions.assertEquals("vjnn", model.registryPrivateEndpointConnections().get(0).id()); - Assertions.assertEquals("agfyvrtpqpe", model.registryPrivateEndpointConnections().get(0).location()); - Assertions.assertEquals("gkrepdqhqyhw", model.registryPrivateEndpointConnections().get(0).groupIds().get(0)); - Assertions.assertEquals("eoh", - model.registryPrivateEndpointConnections().get(0).privateEndpoint().subnetArmId()); - Assertions.assertEquals("zjpcee", - model.registryPrivateEndpointConnections() - .get(0) - .registryPrivateLinkServiceConnectionState() - .actionsRequired()); - Assertions.assertEquals("zangprbfaxyxzlbc", - model.registryPrivateEndpointConnections() - .get(0) - .registryPrivateLinkServiceConnectionState() - .description()); - Assertions.assertEquals(EndpointServiceConnectionStatus.APPROVED, - model.registryPrivateEndpointConnections().get(0).registryPrivateLinkServiceConnectionState().status()); - Assertions.assertEquals("sexroqrndkt", model.registryPrivateEndpointConnections().get(0).provisioningState()); - Assertions.assertEquals("gq", model.publicNetworkAccess()); - Assertions.assertEquals("xbsmtbljje", - model.regionDetails().get(0).acrDetails().get(0).systemCreatedAcrAccount().acrAccountName()); - Assertions.assertEquals("ci", - model.regionDetails().get(0).acrDetails().get(0).systemCreatedAcrAccount().acrAccountSku()); - Assertions.assertEquals("jcmrnkfm", model.regionDetails().get(0).location()); - Assertions.assertEquals(false, - model.regionDetails() - .get(0) - .storageAccountDetails() - .get(0) - .systemCreatedStorageAccount() - .allowBlobPublicAccess()); - Assertions.assertEquals(false, - model.regionDetails() - .get(0) - .storageAccountDetails() - .get(0) - .systemCreatedStorageAccount() - .storageAccountHnsEnabled()); - Assertions.assertEquals("jnqtqe", - model.regionDetails() - .get(0) - .storageAccountDetails() - .get(0) - .systemCreatedStorageAccount() - .storageAccountName()); - Assertions.assertEquals("j", - model.regionDetails() - .get(0) - .storageAccountDetails() - .get(0) - .systemCreatedStorageAccount() - .storageAccountType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryRegionArmDetailsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryRegionArmDetailsTests.java deleted file mode 100644 index bb6e3483d495e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryRegionArmDetailsTests.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AcrDetails; -import com.azure.resourcemanager.machinelearning.models.ArmResourceId; -import com.azure.resourcemanager.machinelearning.models.RegistryRegionArmDetails; -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.UserCreatedAcrAccount; -import com.azure.resourcemanager.machinelearning.models.UserCreatedStorageAccount; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RegistryRegionArmDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RegistryRegionArmDetails model = BinaryData.fromString( - "{\"acrDetails\":[{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"kgqaboo\",\"acrAccountSku\":\"bmsgycqsxrmdv\",\"armResourceId\":{\"resourceId\":\"yqaeohpjhgejk\"}},\"userCreatedAcrAccount\":{\"armResourceId\":{\"resourceId\":\"daurgho\"}}},{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"exbkhx\",\"acrAccountSku\":\"joezlqxrkdknkobe\",\"armResourceId\":{\"resourceId\":\"b\"}},\"userCreatedAcrAccount\":{\"armResourceId\":{\"resourceId\":\"tzamicbig\"}}},{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"gzseznuxkeua\",\"acrAccountSku\":\"aabmdlqjb\",\"armResourceId\":{\"resourceId\":\"f\"}},\"userCreatedAcrAccount\":{\"armResourceId\":{\"resourceId\":\"upmomihzbd\"}}},{\"systemCreatedAcrAccount\":{\"acrAccountName\":\"pkcdpreyxely\",\"acrAccountSku\":\"ghflrufssjyghsf\",\"armResourceId\":{\"resourceId\":\"bh\"}},\"userCreatedAcrAccount\":{\"armResourceId\":{\"resourceId\":\"mqfmefgvqcpd\"}}}],\"location\":\"gquxweysland\",\"storageAccountDetails\":[{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":false,\"armResourceId\":{\"resourceId\":\"hghcgawnrrnqu\"},\"storageAccountHnsEnabled\":false,\"storageAccountName\":\"tireimse\",\"storageAccountType\":\"fsxstcyil\"},\"userCreatedStorageAccount\":{\"armResourceId\":{\"resourceId\":\"mxcjzlquzexokjx\"}}},{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":false,\"armResourceId\":{\"resourceId\":\"inzabwmvoglj\"},\"storageAccountHnsEnabled\":false,\"storageAccountName\":\"gi\",\"storageAccountType\":\"wcehaqidoyzlt\"},\"userCreatedStorageAccount\":{\"armResourceId\":{\"resourceId\":\"qoqpepiaeap\"}}}]}") - .toObject(RegistryRegionArmDetails.class); - Assertions.assertEquals("kgqaboo", model.acrDetails().get(0).systemCreatedAcrAccount().acrAccountName()); - Assertions.assertEquals("bmsgycqsxrmdv", model.acrDetails().get(0).systemCreatedAcrAccount().acrAccountSku()); - Assertions.assertEquals("yqaeohpjhgejk", - model.acrDetails().get(0).systemCreatedAcrAccount().armResourceId().resourceId()); - Assertions.assertEquals("daurgho", - model.acrDetails().get(0).userCreatedAcrAccount().armResourceId().resourceId()); - Assertions.assertEquals("gquxweysland", model.location()); - Assertions.assertEquals(false, - model.storageAccountDetails().get(0).systemCreatedStorageAccount().allowBlobPublicAccess()); - Assertions.assertEquals("hghcgawnrrnqu", - model.storageAccountDetails().get(0).systemCreatedStorageAccount().armResourceId().resourceId()); - Assertions.assertEquals(false, - model.storageAccountDetails().get(0).systemCreatedStorageAccount().storageAccountHnsEnabled()); - Assertions.assertEquals("tireimse", - model.storageAccountDetails().get(0).systemCreatedStorageAccount().storageAccountName()); - Assertions.assertEquals("fsxstcyil", - model.storageAccountDetails().get(0).systemCreatedStorageAccount().storageAccountType()); - Assertions.assertEquals("mxcjzlquzexokjx", - model.storageAccountDetails().get(0).userCreatedStorageAccount().armResourceId().resourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RegistryRegionArmDetails model = new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList( - new AcrDetails() - .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("kgqaboo") - .withAcrAccountSku("bmsgycqsxrmdv") - .withArmResourceId(new ArmResourceId().withResourceId("yqaeohpjhgejk"))) - .withUserCreatedAcrAccount( - new UserCreatedAcrAccount().withArmResourceId(new ArmResourceId().withResourceId("daurgho"))), - new AcrDetails() - .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("exbkhx") - .withAcrAccountSku("joezlqxrkdknkobe") - .withArmResourceId(new ArmResourceId().withResourceId("b"))) - .withUserCreatedAcrAccount( - new UserCreatedAcrAccount().withArmResourceId(new ArmResourceId().withResourceId("tzamicbig"))), - new AcrDetails() - .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("gzseznuxkeua") - .withAcrAccountSku("aabmdlqjb") - .withArmResourceId(new ArmResourceId().withResourceId("f"))) - .withUserCreatedAcrAccount(new UserCreatedAcrAccount() - .withArmResourceId(new ArmResourceId().withResourceId("upmomihzbd"))), - new AcrDetails() - .withSystemCreatedAcrAccount(new SystemCreatedAcrAccount().withAcrAccountName("pkcdpreyxely") - .withAcrAccountSku("ghflrufssjyghsf") - .withArmResourceId(new ArmResourceId().withResourceId("bh"))) - .withUserCreatedAcrAccount(new UserCreatedAcrAccount() - .withArmResourceId(new ArmResourceId().withResourceId("mqfmefgvqcpd"))))) - .withLocation("gquxweysland") - .withStorageAccountDetails(Arrays.asList( - new StorageAccountDetails() - .withSystemCreatedStorageAccount(new SystemCreatedStorageAccount().withAllowBlobPublicAccess(false) - .withArmResourceId(new ArmResourceId().withResourceId("hghcgawnrrnqu")) - .withStorageAccountHnsEnabled(false) - .withStorageAccountName("tireimse") - .withStorageAccountType("fsxstcyil")) - .withUserCreatedStorageAccount(new UserCreatedStorageAccount() - .withArmResourceId(new ArmResourceId().withResourceId("mxcjzlquzexokjx"))), - new StorageAccountDetails() - .withSystemCreatedStorageAccount(new SystemCreatedStorageAccount().withAllowBlobPublicAccess(false) - .withArmResourceId(new ArmResourceId().withResourceId("inzabwmvoglj")) - .withStorageAccountHnsEnabled(false) - .withStorageAccountName("gi") - .withStorageAccountType("wcehaqidoyzlt")) - .withUserCreatedStorageAccount(new UserCreatedStorageAccount() - .withArmResourceId(new ArmResourceId().withResourceId("qoqpepiaeap"))))); - model = BinaryData.fromObject(model).toObject(RegistryRegionArmDetails.class); - Assertions.assertEquals("kgqaboo", model.acrDetails().get(0).systemCreatedAcrAccount().acrAccountName()); - Assertions.assertEquals("bmsgycqsxrmdv", model.acrDetails().get(0).systemCreatedAcrAccount().acrAccountSku()); - Assertions.assertEquals("yqaeohpjhgejk", - model.acrDetails().get(0).systemCreatedAcrAccount().armResourceId().resourceId()); - Assertions.assertEquals("daurgho", - model.acrDetails().get(0).userCreatedAcrAccount().armResourceId().resourceId()); - Assertions.assertEquals("gquxweysland", model.location()); - Assertions.assertEquals(false, - model.storageAccountDetails().get(0).systemCreatedStorageAccount().allowBlobPublicAccess()); - Assertions.assertEquals("hghcgawnrrnqu", - model.storageAccountDetails().get(0).systemCreatedStorageAccount().armResourceId().resourceId()); - Assertions.assertEquals(false, - model.storageAccountDetails().get(0).systemCreatedStorageAccount().storageAccountHnsEnabled()); - Assertions.assertEquals("tireimse", - model.storageAccountDetails().get(0).systemCreatedStorageAccount().storageAccountName()); - Assertions.assertEquals("fsxstcyil", - model.storageAccountDetails().get(0).systemCreatedStorageAccount().storageAccountType()); - Assertions.assertEquals("mxcjzlquzexokjx", - model.storageAccountDetails().get(0).userCreatedStorageAccount().armResourceId().resourceId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryTrackedResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryTrackedResourceArmPaginatedResultTests.java deleted file mode 100644 index 85fb0076b4b02..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegistryTrackedResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,233 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code 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.RegistryInner; -import com.azure.resourcemanager.machinelearning.models.AcrDetails; -import com.azure.resourcemanager.machinelearning.models.ArmResourceId; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.RegistryPrivateEndpointConnection; -import com.azure.resourcemanager.machinelearning.models.RegistryRegionArmDetails; -import com.azure.resourcemanager.machinelearning.models.RegistryTrackedResourceArmPaginatedResult; -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.UserAssignedIdentity; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class RegistryTrackedResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RegistryTrackedResourceArmPaginatedResult model = BinaryData.fromString( - "{\"nextLink\":\"deolctaebfs\",\"value\":[{\"identity\":{\"principalId\":\"07040a70-dc4d-409a-93b0-d16491c8a0c2\",\"tenantId\":\"28d8ce6f-2bef-43e1-a54d-097b41679968\",\"type\":\"None\",\"userAssignedIdentities\":{\"vtqigdxzvsgeafg\":{\"principalId\":\"2198b80a-38b1-4f58-af6e-8c77123aab0f\",\"clientId\":\"274d2530-3115-4925-b2f3-1d4d1d19a6a9\"},\"ehxlzsxezppk\":{\"principalId\":\"9f1832a9-90d9-405b-b727-56ee03ab0826\",\"clientId\":\"c579a59a-75cc-407c-b5b4-440628177d78\"}}},\"kind\":\"aaeskyfjlpze\",\"properties\":{\"discoveryUrl\":\"oyrplixl\",\"intellectualPropertyPublisher\":\"mllpquevhamfowg\",\"managedResourceGroup\":{\"resourceId\":\"mkekxpkzwaqxo\"},\"mlFlowRegistryUri\":\"ovchiqbplvfid\",\"registryPrivateEndpointConnections\":[{\"id\":\"ekxbyjg\",\"location\":\"fepxyihpqadag\",\"properties\":{}},{\"id\":\"dicxdw\",\"location\":\"fowxwyovcxjsgbi\",\"properties\":{}},{\"id\":\"kdveksb\",\"location\":\"oduchvlscr\",\"properties\":{}},{\"id\":\"bfdyjduss\",\"location\":\"szekbh\",\"properties\":{}}],\"publicNetworkAccess\":\"aaggkre\",\"regionDetails\":[{\"acrDetails\":[{}],\"location\":\"ybff\",\"storageAccountDetails\":[{},{},{}]},{\"acrDetails\":[{},{}],\"location\":\"reoagsqtaadus\",\"storageAccountDetails\":[{},{},{},{}]},{\"acrDetails\":[{}],\"location\":\"vsqw\",\"storageAccountDetails\":[{},{},{}]}]},\"sku\":{\"name\":\"zilfmnlikps\",\"tier\":\"Free\",\"size\":\"eypofqpm\",\"family\":\"yqgs\",\"capacity\":551840235},\"location\":\"ttjxophgerhsmvgo\",\"tags\":{\"qywwwmhk\":\"zmqilrixysfnim\"},\"id\":\"uwaedrympmlqoi\",\"name\":\"hzdue\",\"type\":\"ihapfjiiknjdiq\"},{\"identity\":{\"principalId\":\"5323f3c2-5ef8-4d6e-83da-ead8dfdb1c5b\",\"tenantId\":\"09354a5e-5d27-4ebe-8851-9b8d190751e0\",\"type\":\"None\",\"userAssignedIdentities\":{\"bi\":{\"principalId\":\"fab38cd6-baff-47cf-8bbc-bba778109e9d\",\"clientId\":\"9205257f-f78c-4f10-b861-b3af0e7c539a\"},\"sbw\":{\"principalId\":\"3d78241d-b70c-494a-8c45-4c72b944fd9a\",\"clientId\":\"2e026a3a-114d-4559-9df9-81ac5f4fdb15\"},\"vbvzipbwxgo\":{\"principalId\":\"2ce94d1a-4419-49a3-aae2-c40bebb4a862\",\"clientId\":\"c56e523e-d40c-4f44-bd09-ac8e416f5eca\"}}},\"kind\":\"x\",\"properties\":{\"discoveryUrl\":\"rad\",\"intellectualPropertyPublisher\":\"kxknpdg\",\"managedResourceGroup\":{\"resourceId\":\"jsugswhgs\"},\"mlFlowRegistryUri\":\"dkwwn\",\"registryPrivateEndpointConnections\":[{\"id\":\"ctohzhaquvwsxbgn\",\"location\":\"ervqchoadhrsxqvz\",\"properties\":{}}],\"publicNetworkAccess\":\"abdsr\",\"regionDetails\":[{\"acrDetails\":[{},{}],\"location\":\"zrsubklrxhjnltce\",\"storageAccountDetails\":[{},{}]},{\"acrDetails\":[{}],\"location\":\"dieq\",\"storageAccountDetails\":[{}]},{\"acrDetails\":[{},{},{},{}],\"location\":\"wdxvqzxoebwg\",\"storageAccountDetails\":[{},{}]}]},\"sku\":{\"name\":\"banbaupwtzv\",\"tier\":\"Basic\",\"size\":\"ozkxbzrpejplss\",\"family\":\"bttt\",\"capacity\":102469809},\"location\":\"xunrswgkpjhboy\",\"tags\":{\"lgw\":\"bhuhk\",\"o\":\"okhu\",\"cqypz\":\"jy\",\"fejyvdwtfxptpqa\":\"zufgs\"},\"id\":\"amkncfgy\",\"name\":\"mxsnxocuul\",\"type\":\"ojkpoyh\"},{\"identity\":{\"principalId\":\"ea345ed6-776c-4d1a-af21-0e2d89aefb7f\",\"tenantId\":\"0dbb5db4-62b2-49ea-ae41-301ef257bb96\",\"type\":\"None\",\"userAssignedIdentities\":{\"dljzgdyrc\":{\"principalId\":\"bc448ae0-9cce-4f4c-b12d-32a6a580a358\",\"clientId\":\"2c0f2b5d-3184-446e-bde6-b8f7b3fb7569\"},\"bsgzl\":{\"principalId\":\"5cf505b0-c6ff-4e22-815d-6e8dc355f1fe\",\"clientId\":\"8eda3cb4-5ab7-4382-a59c-b273d65517fa\"},\"bjnqogdxwbsf\":{\"principalId\":\"20785746-6ce0-4a33-801f-95f2c487367b\",\"clientId\":\"e16cf91f-6e91-45dd-aa47-424423aa1655\"},\"x\":{\"principalId\":\"73d525d2-f44c-450d-b6e8-f6a63167c620\",\"clientId\":\"c02314e6-1d95-4640-b57f-549f7787e75f\"}}},\"kind\":\"lflec\",\"properties\":{\"discoveryUrl\":\"inxojjlux\",\"intellectualPropertyPublisher\":\"hilzzdzzq\",\"managedResourceGroup\":{\"resourceId\":\"ezay\"},\"mlFlowRegistryUri\":\"ribqlotokh\",\"registryPrivateEndpointConnections\":[{\"id\":\"azn\",\"location\":\"qww\",\"properties\":{}},{\"id\":\"yofgwhnkbtlwljss\",\"location\":\"tsnld\",\"properties\":{}},{\"id\":\"olgisu\",\"location\":\"bteogfg\",\"properties\":{}}],\"publicNetworkAccess\":\"jrykwlefksxqce\",\"regionDetails\":[{\"acrDetails\":[{},{},{}],\"location\":\"nmqvzvluy\",\"storageAccountDetails\":[{},{},{},{}]},{\"acrDetails\":[{},{}],\"location\":\"sscyvai\",\"storageAccountDetails\":[{}]},{\"acrDetails\":[{},{},{}],\"location\":\"vfyeowpsfxtj\",\"storageAccountDetails\":[{}]}]},\"sku\":{\"name\":\"ymh\",\"tier\":\"Basic\",\"size\":\"qfttehdpboujs\",\"family\":\"fvvdshxcdedsue\",\"capacity\":1734780864},\"location\":\"xcgjtf\",\"tags\":{\"myltrwntfmtbg\":\"uktrfnslnlrx\",\"zjwhsetwwjwz\":\"jdxwnazkurrdre\",\"qzzdcykeyste\":\"qseuzuukykcyqhy\"},\"id\":\"fop\",\"name\":\"z\",\"type\":\"azgbsqgpe\"},{\"identity\":{\"principalId\":\"5ea494c7-bae9-44fd-9c8f-9bad43b0f936\",\"tenantId\":\"4cc0399d-a3c0-4836-9671-70bc2b801c1f\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"vozglqjbk\":{\"principalId\":\"7a757d69-a3ec-4510-94aa-a8a5080b76bb\",\"clientId\":\"b17f4a14-9677-425d-bbc8-ac66d3ec45d7\"}}},\"kind\":\"zcl\",\"properties\":{\"discoveryUrl\":\"zeyowmndcovdwzqa\",\"intellectualPropertyPublisher\":\"zanhmkvfru\",\"managedResourceGroup\":{\"resourceId\":\"drbcp\"},\"mlFlowRegistryUri\":\"xudqyemebunaucmc\",\"registryPrivateEndpointConnections\":[{\"id\":\"eemmjauwcgx\",\"location\":\"noh\",\"properties\":{}},{\"id\":\"ranizerw\",\"location\":\"dasmxu\",\"properties\":{}},{\"id\":\"bngfcocefhpri\",\"location\":\"fmpztraudsvh\",\"properties\":{}},{\"id\":\"culregpqt\",\"location\":\"jhvrztnvgyshqrdg\",\"properties\":{}}],\"publicNetworkAccess\":\"mewjzlpyk\",\"regionDetails\":[{\"acrDetails\":[{},{}],\"location\":\"jcayerzrransyby\",\"storageAccountDetails\":[{}]},{\"acrDetails\":[{},{},{}],\"location\":\"rghsrleinkfsc\",\"storageAccountDetails\":[{},{}]}]},\"sku\":{\"name\":\"jwvuag\",\"tier\":\"Premium\",\"size\":\"ltngvmreupt\",\"family\":\"lzmijajwolxfsv\",\"capacity\":202449168},\"location\":\"pynwlslrcigtzjcv\",\"tags\":{\"yxpavidnie\":\"lapsnsso\",\"slpuxgcbdsva\":\"wffcvvye\",\"rkxgpazwugxyqvnj\":\"pnptw\"},\"id\":\"bfe\",\"name\":\"hldiuhzzgqlm\",\"type\":\"aewzgiudjp\"}]}") - .toObject(RegistryTrackedResourceArmPaginatedResult.class); - Assertions.assertEquals("deolctaebfs", model.nextLink()); - Assertions.assertEquals("ttjxophgerhsmvgo", model.value().get(0).location()); - Assertions.assertEquals("zmqilrixysfnim", model.value().get(0).tags().get("qywwwmhk")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).identity().type()); - Assertions.assertEquals("aaeskyfjlpze", model.value().get(0).kind()); - Assertions.assertEquals("zilfmnlikps", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.FREE, model.value().get(0).sku().tier()); - Assertions.assertEquals("eypofqpm", model.value().get(0).sku().size()); - Assertions.assertEquals("yqgs", model.value().get(0).sku().family()); - Assertions.assertEquals(551840235, model.value().get(0).sku().capacity()); - Assertions.assertEquals("oyrplixl", model.value().get(0).discoveryUrl()); - Assertions.assertEquals("mllpquevhamfowg", model.value().get(0).intellectualPropertyPublisher()); - Assertions.assertEquals("mkekxpkzwaqxo", model.value().get(0).managedResourceGroup().resourceId()); - Assertions.assertEquals("ovchiqbplvfid", model.value().get(0).mlFlowRegistryUri()); - Assertions.assertEquals("ekxbyjg", model.value().get(0).registryPrivateEndpointConnections().get(0).id()); - Assertions.assertEquals("fepxyihpqadag", - model.value().get(0).registryPrivateEndpointConnections().get(0).location()); - Assertions.assertEquals("aaggkre", model.value().get(0).publicNetworkAccess()); - Assertions.assertEquals("ybff", model.value().get(0).regionDetails().get(0).location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RegistryTrackedResourceArmPaginatedResult model - = new RegistryTrackedResourceArmPaginatedResult().withNextLink("deolctaebfs") - .withValue(Arrays.asList( - new RegistryInner().withLocation("ttjxophgerhsmvgo") - .withTags(mapOf("qywwwmhk", "zmqilrixysfnim")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("vtqigdxzvsgeafg", new UserAssignedIdentity(), - "ehxlzsxezppk", new UserAssignedIdentity()))) - .withKind("aaeskyfjlpze") - .withSku(new Sku().withName("zilfmnlikps") - .withTier(SkuTier.FREE) - .withSize("eypofqpm") - .withFamily("yqgs") - .withCapacity(551840235)) - .withDiscoveryUrl("oyrplixl") - .withIntellectualPropertyPublisher("mllpquevhamfowg") - .withManagedResourceGroup(new ArmResourceId().withResourceId("mkekxpkzwaqxo")) - .withMlFlowRegistryUri("ovchiqbplvfid") - .withRegistryPrivateEndpointConnections(Arrays.asList( - new RegistryPrivateEndpointConnection().withId("ekxbyjg").withLocation("fepxyihpqadag"), - new RegistryPrivateEndpointConnection().withId("dicxdw").withLocation("fowxwyovcxjsgbi"), - new RegistryPrivateEndpointConnection().withId("kdveksb").withLocation("oduchvlscr"), - new RegistryPrivateEndpointConnection().withId("bfdyjduss").withLocation("szekbh"))) - .withPublicNetworkAccess("aaggkre") - .withRegionDetails(Arrays - .asList( - new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails())) - .withLocation("ybff") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails(), - new StorageAccountDetails(), new StorageAccountDetails())), - new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails())) - .withLocation("reoagsqtaadus") - .withStorageAccountDetails( - Arrays.asList(new StorageAccountDetails(), new StorageAccountDetails(), - new StorageAccountDetails(), new StorageAccountDetails())), - new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails())) - .withLocation("vsqw") - .withStorageAccountDetails( - Arrays.asList(new StorageAccountDetails(), new StorageAccountDetails(), - new StorageAccountDetails())))), - new RegistryInner().withLocation("xunrswgkpjhboy") - .withTags(mapOf("lgw", "bhuhk", "o", "okhu", "cqypz", "jy", "fejyvdwtfxptpqa", "zufgs")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("bi", new UserAssignedIdentity(), "sbw", - new UserAssignedIdentity(), "vbvzipbwxgo", new UserAssignedIdentity()))) - .withKind("x") - .withSku(new Sku().withName("banbaupwtzv") - .withTier(SkuTier.BASIC) - .withSize("ozkxbzrpejplss") - .withFamily("bttt") - .withCapacity(102469809)) - .withDiscoveryUrl("rad") - .withIntellectualPropertyPublisher("kxknpdg") - .withManagedResourceGroup(new ArmResourceId().withResourceId("jsugswhgs")) - .withMlFlowRegistryUri("dkwwn") - .withRegistryPrivateEndpointConnections( - Arrays.asList(new RegistryPrivateEndpointConnection().withId("ctohzhaquvwsxbgn") - .withLocation("ervqchoadhrsxqvz"))) - .withPublicNetworkAccess("abdsr") - .withRegionDetails(Arrays.asList(new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails())) - .withLocation("zrsubklrxhjnltce") - .withStorageAccountDetails( - Arrays.asList(new StorageAccountDetails(), new StorageAccountDetails())), - new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails())) - .withLocation("dieq") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails())), - new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails(), new AcrDetails(), - new AcrDetails())) - .withLocation("wdxvqzxoebwg") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails(), - new StorageAccountDetails())))), - new RegistryInner().withLocation("xcgjtf") - .withTags(mapOf("myltrwntfmtbg", "uktrfnslnlrx", "zjwhsetwwjwz", "jdxwnazkurrdre", - "qzzdcykeyste", "fakeTokenPlaceholder")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities( - mapOf("dljzgdyrc", new UserAssignedIdentity(), "bsgzl", new UserAssignedIdentity(), - "bjnqogdxwbsf", new UserAssignedIdentity(), "x", new UserAssignedIdentity()))) - .withKind("lflec") - .withSku(new Sku().withName("ymh") - .withTier(SkuTier.BASIC) - .withSize("qfttehdpboujs") - .withFamily("fvvdshxcdedsue") - .withCapacity(1734780864)) - .withDiscoveryUrl("inxojjlux") - .withIntellectualPropertyPublisher("hilzzdzzq") - .withManagedResourceGroup(new ArmResourceId().withResourceId("ezay")) - .withMlFlowRegistryUri("ribqlotokh") - .withRegistryPrivateEndpointConnections(Arrays.asList( - new RegistryPrivateEndpointConnection().withId("azn").withLocation("qww"), - new RegistryPrivateEndpointConnection().withId("yofgwhnkbtlwljss").withLocation("tsnld"), - new RegistryPrivateEndpointConnection().withId("olgisu").withLocation("bteogfg"))) - .withPublicNetworkAccess("jrykwlefksxqce") - .withRegionDetails(Arrays.asList(new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails(), new AcrDetails())) - .withLocation("nmqvzvluy") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails(), - new StorageAccountDetails(), new StorageAccountDetails(), new StorageAccountDetails())), - new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails())) - .withLocation("sscyvai") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails())), - new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails(), new AcrDetails())) - .withLocation("vfyeowpsfxtj") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails())))), - new RegistryInner().withLocation("pynwlslrcigtzjcv") - .withTags( - mapOf("yxpavidnie", "lapsnsso", "slpuxgcbdsva", "wffcvvye", "rkxgpazwugxyqvnj", "pnptw")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("vozglqjbk", new UserAssignedIdentity()))) - .withKind("zcl") - .withSku(new Sku().withName("jwvuag") - .withTier(SkuTier.PREMIUM) - .withSize("ltngvmreupt") - .withFamily("lzmijajwolxfsv") - .withCapacity(202449168)) - .withDiscoveryUrl("zeyowmndcovdwzqa") - .withIntellectualPropertyPublisher("zanhmkvfru") - .withManagedResourceGroup(new ArmResourceId().withResourceId("drbcp")) - .withMlFlowRegistryUri("xudqyemebunaucmc") - .withRegistryPrivateEndpointConnections(Arrays.asList( - new RegistryPrivateEndpointConnection().withId("eemmjauwcgx").withLocation("noh"), - new RegistryPrivateEndpointConnection().withId("ranizerw").withLocation("dasmxu"), - new RegistryPrivateEndpointConnection() - .withId("bngfcocefhpri") - .withLocation("fmpztraudsvh"), - new RegistryPrivateEndpointConnection().withId("culregpqt") - .withLocation("jhvrztnvgyshqrdg"))) - .withPublicNetworkAccess("mewjzlpyk") - .withRegionDetails(Arrays.asList( - new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails())) - .withLocation("jcayerzrransyby") - .withStorageAccountDetails(Arrays.asList(new StorageAccountDetails())), - new RegistryRegionArmDetails() - .withAcrDetails(Arrays.asList(new AcrDetails(), new AcrDetails(), new AcrDetails())) - .withLocation("rghsrleinkfsc") - .withStorageAccountDetails( - Arrays.asList(new StorageAccountDetails(), new StorageAccountDetails())))))); - model = BinaryData.fromObject(model).toObject(RegistryTrackedResourceArmPaginatedResult.class); - Assertions.assertEquals("deolctaebfs", model.nextLink()); - Assertions.assertEquals("ttjxophgerhsmvgo", model.value().get(0).location()); - Assertions.assertEquals("zmqilrixysfnim", model.value().get(0).tags().get("qywwwmhk")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).identity().type()); - Assertions.assertEquals("aaeskyfjlpze", model.value().get(0).kind()); - Assertions.assertEquals("zilfmnlikps", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.FREE, model.value().get(0).sku().tier()); - Assertions.assertEquals("eypofqpm", model.value().get(0).sku().size()); - Assertions.assertEquals("yqgs", model.value().get(0).sku().family()); - Assertions.assertEquals(551840235, model.value().get(0).sku().capacity()); - Assertions.assertEquals("oyrplixl", model.value().get(0).discoveryUrl()); - Assertions.assertEquals("mllpquevhamfowg", model.value().get(0).intellectualPropertyPublisher()); - Assertions.assertEquals("mkekxpkzwaqxo", model.value().get(0).managedResourceGroup().resourceId()); - Assertions.assertEquals("ovchiqbplvfid", model.value().get(0).mlFlowRegistryUri()); - Assertions.assertEquals("ekxbyjg", model.value().get(0).registryPrivateEndpointConnections().get(0).id()); - Assertions.assertEquals("fepxyihpqadag", - model.value().get(0).registryPrivateEndpointConnections().get(0).location()); - Assertions.assertEquals("aaggkre", model.value().get(0).publicNetworkAccess()); - Assertions.assertEquals("ybff", model.value().get(0).regionDetails().get(0).location()); - } - - // 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/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 f4f861b215726..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegressionTests.java +++ /dev/null @@ -1,215 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated 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.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\":\"R2Score\",\"trainingSettings\":{\"allowedTrainingAlgorithms\":[\"LightGBM\"],\"blockedTrainingAlgorithms\":[\"RandomForest\",\"ExtremeRandomTrees\",\"DecisionTree\",\"ExtremeRandomTrees\"],\"enableOnnxCompatibleModels\":false,\"stackEnsembleSettings\":{\"stackMetaLearnerType\":\"LightGBMRegressor\",\"stackMetaLearnerTrainPercentage\":8.33007277629979,\"stackMetaLearnerKWargs\":\"datayvichcap\"},\"enableStackEnsemble\":true,\"enableVoteEnsemble\":false,\"ensembleModelDownloadTimeout\":\"PT9H16M19S\",\"enableModelExplainability\":true,\"enableDnnTraining\":true},\"limitSettings\":{\"maxTrials\":1273889376,\"trialTimeout\":\"PT180H28M30S\",\"timeout\":\"PT69H35M25S\",\"maxConcurrentTrials\":1570051650,\"maxCoresPerTrial\":1441156662,\"exitScore\":37.32116818441482,\"enableEarlyTermination\":true},\"nCrossValidations\":{\"mode\":\"NCrossValidations\"},\"cvSplitColumnNames\":[\"tigpksywicklktg\",\"dprtqjytdcfe\"],\"weightColumnName\":\"hbdwbvjsbgmlamo\",\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"caytnpkvbpbltcws\",\"mode\":\"EvalDownload\",\"description\":\"eocnqoubvepvlrys\"},\"testData\":{\"jobInputType\":\"mltable\",\"uri\":\"h\",\"mode\":\"EvalDownload\",\"description\":\"hxohzbzhhavzf\"},\"validationDataSize\":40.045012854483886,\"testDataSize\":47.5872192816281,\"featurizationSettings\":{\"mode\":\"Auto\",\"blockedTransformers\":[\"CatTargetEncoder\"],\"columnNameAndTypes\":{\"fddxqfussub\":\"uehouisaklh\",\"p\":\"sspmjvailfauyv\",\"wvoglff\":\"wlkqdgwbztrthl\",\"lor\":\"dhg\"},\"transformerParams\":{\"cmo\":[{\"fields\":[\"cvxkylhc\",\"sdylmnq\",\"nkyg\"],\"parameters\":\"datatmsgkwedwl\"},{\"fields\":[\"hgbgbhudh\",\"pjimvrrqfibpkwm\",\"mrlfizjuddndi\"],\"parameters\":\"datapngyhylqyafe\"}],\"jfqreeo\":[{\"fields\":[\"uytxnxr\"],\"parameters\":\"datartzea\"},{\"fields\":[\"fvkhbjhmv\"],\"parameters\":\"dataxsdhweignybffq\"},{\"fields\":[\"ynepkt\",\"mwg\",\"conyse\",\"jijfhpxni\"],\"parameters\":\"datauoxfa\"},{\"fields\":[\"bskkypor\",\"ynieunbydlgfaphw\"],\"parameters\":\"databwtsaynrt\"}],\"rmclyqwwu\":[{\"fields\":[\"mrnblihs\",\"bfb\",\"divixzhpjgqzmiao\"],\"parameters\":\"dataeacfxaubuh\"},{\"fields\":[\"tcnxriqz\",\"dckhsq\"],\"parameters\":\"datarjsurnowo\"},{\"fields\":[\"rxmyokohlsf\",\"fouqjpzhea\",\"uvkqxqkvadmj\",\"ymudj\"],\"parameters\":\"dataajzdebhs\"}]},\"enableDnnFeaturization\":true,\"datasetLanguage\":\"aaptbs\"},\"logVerbosity\":\"Critical\",\"trainingData\":{\"jobInputType\":\"mltable\",\"uri\":\"bcbptwybloc\",\"mode\":\"Download\",\"description\":\"lxzbnsshvqn\"},\"targetColumnName\":\"zbeuybutcdzjf\"}") - .toObject(Regression.class); - Assertions.assertEquals(LogVerbosity.CRITICAL, model.logVerbosity()); - Assertions.assertEquals("lxzbnsshvqn", model.trainingData().description()); - Assertions.assertEquals("bcbptwybloc", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("zbeuybutcdzjf", model.targetColumnName()); - Assertions.assertEquals(RegressionPrimaryMetrics.R2SCORE, model.primaryMetric()); - Assertions.assertEquals(false, model.trainingSettings().enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.LIGHT_GBMREGRESSOR, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(8.33007277629979D, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(true, model.trainingSettings().enableStackEnsemble()); - Assertions.assertEquals(false, model.trainingSettings().enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT9H16M19S"), model.trainingSettings().ensembleModelDownloadTimeout()); - Assertions.assertEquals(true, model.trainingSettings().enableModelExplainability()); - Assertions.assertEquals(true, model.trainingSettings().enableDnnTraining()); - Assertions.assertEquals(RegressionModels.LIGHT_GBM, - model.trainingSettings().allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(RegressionModels.RANDOM_FOREST, - model.trainingSettings().blockedTrainingAlgorithms().get(0)); - Assertions.assertEquals(1273889376, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT180H28M30S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals(Duration.parse("PT69H35M25S"), model.limitSettings().timeout()); - Assertions.assertEquals(1570051650, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1441156662, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(37.32116818441482D, model.limitSettings().exitScore()); - Assertions.assertEquals(true, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals("tigpksywicklktg", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("hbdwbvjsbgmlamo", model.weightColumnName()); - Assertions.assertEquals("eocnqoubvepvlrys", model.validationData().description()); - Assertions.assertEquals("caytnpkvbpbltcws", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals("hxohzbzhhavzf", model.testData().description()); - Assertions.assertEquals("h", model.testData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.testData().mode()); - Assertions.assertEquals(40.045012854483886D, model.validationDataSize()); - Assertions.assertEquals(47.5872192816281D, model.testDataSize()); - Assertions.assertEquals("aaptbs", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(FeaturizationMode.AUTO, model.featurizationSettings().mode()); - Assertions.assertEquals(BlockedTransformers.CAT_TARGET_ENCODER, - model.featurizationSettings().blockedTransformers().get(0)); - Assertions.assertEquals("uehouisaklh", model.featurizationSettings().columnNameAndTypes().get("fddxqfussub")); - Assertions.assertEquals("cvxkylhc", - model.featurizationSettings().transformerParams().get("cmo").get(0).fields().get(0)); - Assertions.assertEquals(true, model.featurizationSettings().enableDnnFeaturization()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Regression model - = new Regression().withLogVerbosity(LogVerbosity.CRITICAL) - .withTrainingData(new MLTableJobInput().withDescription("lxzbnsshvqn") - .withUri("bcbptwybloc") - .withMode(InputDeliveryMode.DOWNLOAD)) - .withTargetColumnName("zbeuybutcdzjf") - .withPrimaryMetric(RegressionPrimaryMetrics.R2SCORE) - .withTrainingSettings( - new RegressionTrainingSettings().withEnableOnnxCompatibleModels(false) - .withStackEnsembleSettings(new StackEnsembleSettings() - .withStackMetaLearnerType(StackMetaLearnerType.LIGHT_GBMREGRESSOR) - .withStackMetaLearnerTrainPercentage(8.33007277629979D) - .withStackMetaLearnerKWargs("datayvichcap")) - .withEnableStackEnsemble(true) - .withEnableVoteEnsemble(false) - .withEnsembleModelDownloadTimeout(Duration.parse("PT9H16M19S")) - .withEnableModelExplainability(true) - .withEnableDnnTraining(true) - .withAllowedTrainingAlgorithms(Arrays.asList(RegressionModels.LIGHT_GBM)) - .withBlockedTrainingAlgorithms( - Arrays.asList(RegressionModels.RANDOM_FOREST, RegressionModels.EXTREME_RANDOM_TREES, - RegressionModels.DECISION_TREE, RegressionModels.EXTREME_RANDOM_TREES))) - .withLimitSettings(new TableVerticalLimitSettings().withMaxTrials(1273889376) - .withTrialTimeout(Duration.parse("PT180H28M30S")) - .withTimeout(Duration.parse("PT69H35M25S")) - .withMaxConcurrentTrials(1570051650) - .withMaxCoresPerTrial(1441156662) - .withExitScore(37.32116818441482D) - .withEnableEarlyTermination(true)) - .withNCrossValidations(new NCrossValidations()) - .withCvSplitColumnNames(Arrays.asList("tigpksywicklktg", "dprtqjytdcfe")) - .withWeightColumnName("hbdwbvjsbgmlamo") - .withValidationData(new MLTableJobInput().withDescription("eocnqoubvepvlrys") - .withUri("caytnpkvbpbltcws") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD)) - .withTestData(new MLTableJobInput() - .withDescription("hxohzbzhhavzf") - .withUri("h") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD)) - .withValidationDataSize(40.045012854483886D) - .withTestDataSize(47.5872192816281D) - .withFeaturizationSettings(new TableVerticalFeaturizationSettings().withDatasetLanguage("aaptbs") - .withMode(FeaturizationMode.AUTO) - .withBlockedTransformers(Arrays.asList(BlockedTransformers.CAT_TARGET_ENCODER)) - .withColumnNameAndTypes(mapOf("fddxqfussub", "uehouisaklh", "p", "sspmjvailfauyv", "wvoglff", - "wlkqdgwbztrthl", "lor", "dhg")) - .withTransformerParams(mapOf("cmo", - Arrays.asList( - new ColumnTransformer().withFields(Arrays.asList("cvxkylhc", "sdylmnq", "nkyg")) - .withParameters("datatmsgkwedwl"), - new ColumnTransformer() - .withFields(Arrays.asList("hgbgbhudh", "pjimvrrqfibpkwm", "mrlfizjuddndi")) - .withParameters("datapngyhylqyafe")), - "jfqreeo", - Arrays.asList( - new ColumnTransformer().withFields(Arrays.asList("uytxnxr")).withParameters("datartzea"), - new ColumnTransformer().withFields(Arrays.asList("fvkhbjhmv")) - .withParameters("dataxsdhweignybffq"), - new ColumnTransformer().withFields(Arrays.asList("ynepkt", "mwg", "conyse", "jijfhpxni")) - .withParameters("datauoxfa"), - new ColumnTransformer().withFields(Arrays.asList("bskkypor", "ynieunbydlgfaphw")) - .withParameters("databwtsaynrt")), - "rmclyqwwu", - Arrays.asList( - new ColumnTransformer().withFields(Arrays.asList("mrnblihs", "bfb", "divixzhpjgqzmiao")) - .withParameters("dataeacfxaubuh"), - new ColumnTransformer().withFields(Arrays.asList("tcnxriqz", "dckhsq")) - .withParameters("datarjsurnowo"), - new ColumnTransformer() - .withFields(Arrays.asList("rxmyokohlsf", "fouqjpzhea", "uvkqxqkvadmj", "ymudj")) - .withParameters("dataajzdebhs")))) - .withEnableDnnFeaturization(true)); - model = BinaryData.fromObject(model).toObject(Regression.class); - Assertions.assertEquals(LogVerbosity.CRITICAL, model.logVerbosity()); - Assertions.assertEquals("lxzbnsshvqn", model.trainingData().description()); - Assertions.assertEquals("bcbptwybloc", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("zbeuybutcdzjf", model.targetColumnName()); - Assertions.assertEquals(RegressionPrimaryMetrics.R2SCORE, model.primaryMetric()); - Assertions.assertEquals(false, model.trainingSettings().enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.LIGHT_GBMREGRESSOR, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(8.33007277629979D, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(true, model.trainingSettings().enableStackEnsemble()); - Assertions.assertEquals(false, model.trainingSettings().enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT9H16M19S"), model.trainingSettings().ensembleModelDownloadTimeout()); - Assertions.assertEquals(true, model.trainingSettings().enableModelExplainability()); - Assertions.assertEquals(true, model.trainingSettings().enableDnnTraining()); - Assertions.assertEquals(RegressionModels.LIGHT_GBM, - model.trainingSettings().allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(RegressionModels.RANDOM_FOREST, - model.trainingSettings().blockedTrainingAlgorithms().get(0)); - Assertions.assertEquals(1273889376, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT180H28M30S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals(Duration.parse("PT69H35M25S"), model.limitSettings().timeout()); - Assertions.assertEquals(1570051650, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1441156662, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(37.32116818441482D, model.limitSettings().exitScore()); - Assertions.assertEquals(true, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals("tigpksywicklktg", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("hbdwbvjsbgmlamo", model.weightColumnName()); - Assertions.assertEquals("eocnqoubvepvlrys", model.validationData().description()); - Assertions.assertEquals("caytnpkvbpbltcws", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals("hxohzbzhhavzf", model.testData().description()); - Assertions.assertEquals("h", model.testData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.testData().mode()); - Assertions.assertEquals(40.045012854483886D, model.validationDataSize()); - Assertions.assertEquals(47.5872192816281D, model.testDataSize()); - Assertions.assertEquals("aaptbs", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(FeaturizationMode.AUTO, model.featurizationSettings().mode()); - Assertions.assertEquals(BlockedTransformers.CAT_TARGET_ENCODER, - model.featurizationSettings().blockedTransformers().get(0)); - Assertions.assertEquals("uehouisaklh", model.featurizationSettings().columnNameAndTypes().get("fddxqfussub")); - Assertions.assertEquals("cvxkylhc", - model.featurizationSettings().transformerParams().get("cmo").get(0).fields().get(0)); - Assertions.assertEquals(true, model.featurizationSettings().enableDnnFeaturization()); - } - - // 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/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 7b58e0cf878ce..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegressionTrainingSettingsTests.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.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\":[\"ExtremeRandomTrees\",\"KNN\",\"LightGBM\",\"ElasticNet\"],\"blockedTrainingAlgorithms\":[\"ElasticNet\",\"ElasticNet\",\"GradientBoosting\",\"RandomForest\"],\"enableOnnxCompatibleModels\":false,\"stackEnsembleSettings\":{\"stackMetaLearnerType\":\"LightGBMClassifier\",\"stackMetaLearnerTrainPercentage\":82.88657288403749,\"stackMetaLearnerKWargs\":\"datagp\"},\"enableStackEnsemble\":false,\"enableVoteEnsemble\":true,\"ensembleModelDownloadTimeout\":\"PT146H7M34S\",\"enableModelExplainability\":false,\"enableDnnTraining\":false}") - .toObject(RegressionTrainingSettings.class); - Assertions.assertEquals(false, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.LIGHT_GBMCLASSIFIER, - model.stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(82.88657288403749D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(false, model.enableStackEnsemble()); - Assertions.assertEquals(true, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT146H7M34S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(false, model.enableModelExplainability()); - Assertions.assertEquals(false, model.enableDnnTraining()); - Assertions.assertEquals(RegressionModels.EXTREME_RANDOM_TREES, model.allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(RegressionModels.ELASTIC_NET, model.blockedTrainingAlgorithms().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RegressionTrainingSettings model = new RegressionTrainingSettings().withEnableOnnxCompatibleModels(false) - .withStackEnsembleSettings( - new StackEnsembleSettings().withStackMetaLearnerType(StackMetaLearnerType.LIGHT_GBMCLASSIFIER) - .withStackMetaLearnerTrainPercentage(82.88657288403749D) - .withStackMetaLearnerKWargs("datagp")) - .withEnableStackEnsemble(false) - .withEnableVoteEnsemble(true) - .withEnsembleModelDownloadTimeout(Duration.parse("PT146H7M34S")) - .withEnableModelExplainability(false) - .withEnableDnnTraining(false) - .withAllowedTrainingAlgorithms(Arrays.asList(RegressionModels.EXTREME_RANDOM_TREES, RegressionModels.KNN, - RegressionModels.LIGHT_GBM, RegressionModels.ELASTIC_NET)) - .withBlockedTrainingAlgorithms(Arrays.asList(RegressionModels.ELASTIC_NET, RegressionModels.ELASTIC_NET, - RegressionModels.GRADIENT_BOOSTING, RegressionModels.RANDOM_FOREST)); - model = BinaryData.fromObject(model).toObject(RegressionTrainingSettings.class); - Assertions.assertEquals(false, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.LIGHT_GBMCLASSIFIER, - model.stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(82.88657288403749D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(false, model.enableStackEnsemble()); - Assertions.assertEquals(true, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT146H7M34S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(false, model.enableModelExplainability()); - Assertions.assertEquals(false, model.enableDnnTraining()); - Assertions.assertEquals(RegressionModels.EXTREME_RANDOM_TREES, model.allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(RegressionModels.ELASTIC_NET, model.blockedTrainingAlgorithms().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RequestLoggingTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RequestLoggingTests.java deleted file mode 100644 index 984b09efc1b23..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RequestLoggingTests.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.RequestLogging; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RequestLoggingTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RequestLogging model - = BinaryData.fromString("{\"captureHeaders\":[\"ozoolzq\"]}").toObject(RequestLogging.class); - Assertions.assertEquals("ozoolzq", model.captureHeaders().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RequestLogging model = new RequestLogging().withCaptureHeaders(Arrays.asList("ozoolzq")); - model = BinaryData.fromObject(model).toObject(RequestLogging.class); - Assertions.assertEquals("ozoolzq", model.captureHeaders().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 5119a6d50e4ca..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceBaseTests.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.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\":\"fgytguslfeadcyg\",\"tags\":{\"lolp\":\"yhejhzisxgfp\",\"r\":\"vk\",\"swibyr\":\"qvujzraehtwdwrf\"},\"properties\":{\"hevxcced\":\"bhshfwpracstwity\"}}") - .toObject(ResourceBase.class); - Assertions.assertEquals("fgytguslfeadcyg", model.description()); - Assertions.assertEquals("yhejhzisxgfp", model.tags().get("lolp")); - Assertions.assertEquals("bhshfwpracstwity", model.properties().get("hevxcced")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceBase model = new ResourceBase().withDescription("fgytguslfeadcyg") - .withTags(mapOf("lolp", "yhejhzisxgfp", "r", "vk", "swibyr", "qvujzraehtwdwrf")) - .withProperties(mapOf("hevxcced", "bhshfwpracstwity")); - model = BinaryData.fromObject(model).toObject(ResourceBase.class); - Assertions.assertEquals("fgytguslfeadcyg", model.description()); - Assertions.assertEquals("yhejhzisxgfp", model.tags().get("lolp")); - Assertions.assertEquals("bhshfwpracstwity", model.properties().get("hevxcced")); - } - - // 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/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 4d9be476f9e85..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceConfigurationTests.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.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\":190807596,\"instanceType\":\"uunfprnjletlxsm\",\"properties\":{\"ifamowazi\":\"datado\",\"hxqszdtmaajquh\":\"datanknlqwzdvpi\"}}") - .toObject(ResourceConfiguration.class); - Assertions.assertEquals(190807596, model.instanceCount()); - Assertions.assertEquals("uunfprnjletlxsm", model.instanceType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceConfiguration model = new ResourceConfiguration().withInstanceCount(190807596) - .withInstanceType("uunfprnjletlxsm") - .withProperties(mapOf("ifamowazi", "datado", "hxqszdtmaajquh", "datanknlqwzdvpi")); - model = BinaryData.fromObject(model).toObject(ResourceConfiguration.class); - Assertions.assertEquals(190807596, model.instanceCount()); - Assertions.assertEquals("uunfprnjletlxsm", model.instanceType()); - } - - // 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/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 205e951611437..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\":\"qgnnbz\"}").toObject(ResourceId.class); - Assertions.assertEquals("qgnnbz", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceId model = new ResourceId().withId("qgnnbz"); - model = BinaryData.fromObject(model).toObject(ResourceId.class); - Assertions.assertEquals("qgnnbz", 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 59af47ed645af..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceNameTests.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.ResourceName; - -public final class ResourceNameTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceName model - = BinaryData.fromString("{\"value\":\"fcnj\",\"localizedValue\":\"cn\"}").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 ca45d7d5bec06..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceQuotaInnerTests.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.fluent.models.ResourceQuotaInner; - -public final class ResourceQuotaInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceQuotaInner model = BinaryData.fromString( - "{\"id\":\"rdqmhjjdhtldwkyz\",\"amlWorkspaceLocation\":\"utknc\",\"type\":\"cwsvlxotog\",\"name\":{\"value\":\"upqsx\",\"localizedValue\":\"micykvceoveilo\"},\"limit\":2837447101588730204,\"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/RollingInputDataTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RollingInputDataTests.java deleted file mode 100644 index 160ece9acc0f3..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RollingInputDataTests.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.JobInputType; -import com.azure.resourcemanager.machinelearning.models.RollingInputData; -import java.time.Duration; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class RollingInputDataTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RollingInputData model = BinaryData.fromString( - "{\"inputDataType\":\"Rolling\",\"windowOffset\":\"PT167H19S\",\"windowSize\":\"PT35H51M52S\",\"preprocessingComponentId\":\"mqfvxgwpqnyumz\",\"dataContext\":\"dokez\",\"jobInputType\":\"custom_model\",\"uri\":\"ezknfzqnzbflbqmh\",\"columns\":{\"bs\":\"xxvwedhagq\",\"crolrzesbomp\":\"seayuflmsyzz\",\"munwjivtbuszbdjr\":\"zk\",\"isdeqng\":\"feujywda\"}}") - .toObject(RollingInputData.class); - Assertions.assertEquals("dokez", model.dataContext()); - Assertions.assertEquals(JobInputType.CUSTOM_MODEL, model.jobInputType()); - Assertions.assertEquals("ezknfzqnzbflbqmh", model.uri()); - Assertions.assertEquals("xxvwedhagq", model.columns().get("bs")); - Assertions.assertEquals(Duration.parse("PT167H19S"), model.windowOffset()); - Assertions.assertEquals(Duration.parse("PT35H51M52S"), model.windowSize()); - Assertions.assertEquals("mqfvxgwpqnyumz", model.preprocessingComponentId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RollingInputData model = new RollingInputData().withDataContext("dokez") - .withJobInputType(JobInputType.CUSTOM_MODEL) - .withUri("ezknfzqnzbflbqmh") - .withColumns(mapOf("bs", "xxvwedhagq", "crolrzesbomp", "seayuflmsyzz", "munwjivtbuszbdjr", "zk", "isdeqng", - "feujywda")) - .withWindowOffset(Duration.parse("PT167H19S")) - .withWindowSize(Duration.parse("PT35H51M52S")) - .withPreprocessingComponentId("mqfvxgwpqnyumz"); - model = BinaryData.fromObject(model).toObject(RollingInputData.class); - Assertions.assertEquals("dokez", model.dataContext()); - Assertions.assertEquals(JobInputType.CUSTOM_MODEL, model.jobInputType()); - Assertions.assertEquals("ezknfzqnzbflbqmh", model.uri()); - Assertions.assertEquals("xxvwedhagq", model.columns().get("bs")); - Assertions.assertEquals(Duration.parse("PT167H19S"), model.windowOffset()); - Assertions.assertEquals(Duration.parse("PT35H51M52S"), model.windowSize()); - Assertions.assertEquals("mqfvxgwpqnyumz", model.preprocessingComponentId()); - } - - // 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/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 2f7cea25f27b6..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\":\"eranokqgukkjqnv\",\"port\":2004582271}").toObject(Route.class); - Assertions.assertEquals("eranokqgukkjqnv", model.path()); - Assertions.assertEquals(2004582271, model.port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Route model = new Route().withPath("eranokqgukkjqnv").withPort(2004582271); - model = BinaryData.fromObject(model).toObject(Route.class); - Assertions.assertEquals("eranokqgukkjqnv", model.path()); - Assertions.assertEquals(2004582271, 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 cea13a05cca27..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SamplingAlgorithmTests.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.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 fc94115f1fd81..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScaleSettingsInformationTests.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.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\":1901953478,\"minNodeCount\":1742737473,\"nodeIdleTimeBeforeScaleDown\":\"PT26H51M46S\"}}") - .toObject(ScaleSettingsInformation.class); - Assertions.assertEquals(1901953478, model.scaleSettings().maxNodeCount()); - Assertions.assertEquals(1742737473, model.scaleSettings().minNodeCount()); - Assertions.assertEquals(Duration.parse("PT26H51M46S"), model.scaleSettings().nodeIdleTimeBeforeScaleDown()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScaleSettingsInformation model - = new ScaleSettingsInformation().withScaleSettings(new ScaleSettings().withMaxNodeCount(1901953478) - .withMinNodeCount(1742737473) - .withNodeIdleTimeBeforeScaleDown(Duration.parse("PT26H51M46S"))); - model = BinaryData.fromObject(model).toObject(ScaleSettingsInformation.class); - Assertions.assertEquals(1901953478, model.scaleSettings().maxNodeCount()); - Assertions.assertEquals(1742737473, model.scaleSettings().minNodeCount()); - Assertions.assertEquals(Duration.parse("PT26H51M46S"), 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 4e41bcc8cec42..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScaleSettingsTests.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.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\":1397437100,\"minNodeCount\":1232796575,\"nodeIdleTimeBeforeScaleDown\":\"PT232H8M24S\"}") - .toObject(ScaleSettings.class); - Assertions.assertEquals(1397437100, model.maxNodeCount()); - Assertions.assertEquals(1232796575, model.minNodeCount()); - Assertions.assertEquals(Duration.parse("PT232H8M24S"), model.nodeIdleTimeBeforeScaleDown()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScaleSettings model = new ScaleSettings().withMaxNodeCount(1397437100) - .withMinNodeCount(1232796575) - .withNodeIdleTimeBeforeScaleDown(Duration.parse("PT232H8M24S")); - model = BinaryData.fromObject(model).toObject(ScaleSettings.class); - Assertions.assertEquals(1397437100, model.maxNodeCount()); - Assertions.assertEquals(1232796575, model.minNodeCount()); - Assertions.assertEquals(Duration.parse("PT232H8M24S"), 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 68d99d619390e..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 119db6cb13d73..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleBaseTests.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.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\":\"qirvtk\",\"provisioningStatus\":\"Provisioning\",\"status\":\"Disabled\"}") - .toObject(ScheduleBase.class); - Assertions.assertEquals("qirvtk", model.id()); - Assertions.assertEquals(ScheduleProvisioningState.PROVISIONING, model.provisioningStatus()); - Assertions.assertEquals(ScheduleStatus.DISABLED, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScheduleBase model = new ScheduleBase().withId("qirvtk") - .withProvisioningStatus(ScheduleProvisioningState.PROVISIONING) - .withStatus(ScheduleStatus.DISABLED); - model = BinaryData.fromObject(model).toObject(ScheduleBase.class); - Assertions.assertEquals("qirvtk", model.id()); - Assertions.assertEquals(ScheduleProvisioningState.PROVISIONING, 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 999e9f22e553c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleInnerTests.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.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\":{\"displayName\":\"cteoedlrslsk\",\"isEnabled\":false,\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"vjnzdpvocojhpcna\",\"startTime\":\"zf\",\"timeZone\":\"ggytexvzilmhivz\"},\"action\":{\"actionType\":\"ScheduleActionBase\"},\"provisioningState\":\"Deleting\",\"description\":\"ncknrzdajlsk\",\"tags\":{\"eucyrth\":\"jxul\",\"hokamvfej\":\"qlehmcgcjeinu\"},\"properties\":{\"okpysthhzagj\":\"ttmbqdabzfiv\",\"lhgenuzejgvkv\":\"wyy\"}},\"id\":\"aqszllrzl\",\"name\":\"mmdqgmihzpimc\",\"type\":\"rh\"}") - .toObject(ScheduleInner.class); - Assertions.assertEquals("ncknrzdajlsk", model.properties().description()); - Assertions.assertEquals("jxul", model.properties().tags().get("eucyrth")); - Assertions.assertEquals("ttmbqdabzfiv", model.properties().properties().get("okpysthhzagj")); - Assertions.assertEquals("cteoedlrslsk", model.properties().displayName()); - Assertions.assertEquals(false, model.properties().isEnabled()); - Assertions.assertEquals("vjnzdpvocojhpcna", model.properties().trigger().endTime()); - Assertions.assertEquals("zf", model.properties().trigger().startTime()); - Assertions.assertEquals("ggytexvzilmhivz", model.properties().trigger().timeZone()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScheduleInner model = new ScheduleInner().withProperties(new ScheduleProperties() - .withDescription("ncknrzdajlsk") - .withTags(mapOf("eucyrth", "jxul", "hokamvfej", "qlehmcgcjeinu")) - .withProperties(mapOf("okpysthhzagj", "ttmbqdabzfiv", "lhgenuzejgvkv", "wyy")) - .withDisplayName("cteoedlrslsk") - .withIsEnabled(false) - .withTrigger( - new TriggerBase().withEndTime("vjnzdpvocojhpcna").withStartTime("zf").withTimeZone("ggytexvzilmhivz")) - .withAction(new ScheduleActionBase())); - model = BinaryData.fromObject(model).toObject(ScheduleInner.class); - Assertions.assertEquals("ncknrzdajlsk", model.properties().description()); - Assertions.assertEquals("jxul", model.properties().tags().get("eucyrth")); - Assertions.assertEquals("ttmbqdabzfiv", model.properties().properties().get("okpysthhzagj")); - Assertions.assertEquals("cteoedlrslsk", model.properties().displayName()); - Assertions.assertEquals(false, model.properties().isEnabled()); - Assertions.assertEquals("vjnzdpvocojhpcna", model.properties().trigger().endTime()); - Assertions.assertEquals("zf", model.properties().trigger().startTime()); - Assertions.assertEquals("ggytexvzilmhivz", model.properties().trigger().timeZone()); - } - - // 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/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 4e8e540a1a4bc..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulePropertiesTests.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.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( - "{\"displayName\":\"t\",\"isEnabled\":true,\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"logxsvtzar\",\"startTime\":\"vqnsqk\",\"timeZone\":\"mbjwzzoslpkyb\"},\"action\":{\"actionType\":\"ScheduleActionBase\"},\"provisioningState\":\"Deleting\",\"description\":\"kzpgaj\",\"tags\":{\"uqrebluimmbwx\":\"cemqbmfuvqarwz\",\"kraokq\":\"fgtdmbvx\",\"aokbavlyttaaknwf\":\"budbt\",\"sm\":\"ke\"},\"properties\":{\"gatolekscbctnan\":\"ujd\",\"wnsnlaimouxwks\":\"imwbzxpdcldpk\",\"fco\":\"mud\",\"kbqsjhbtqqvyfscy\":\"bicziuswswj\"}}") - .toObject(ScheduleProperties.class); - Assertions.assertEquals("kzpgaj", model.description()); - Assertions.assertEquals("cemqbmfuvqarwz", model.tags().get("uqrebluimmbwx")); - Assertions.assertEquals("ujd", model.properties().get("gatolekscbctnan")); - Assertions.assertEquals("t", model.displayName()); - Assertions.assertEquals(true, model.isEnabled()); - Assertions.assertEquals("logxsvtzar", model.trigger().endTime()); - Assertions.assertEquals("vqnsqk", model.trigger().startTime()); - Assertions.assertEquals("mbjwzzoslpkyb", model.trigger().timeZone()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScheduleProperties model = new ScheduleProperties().withDescription("kzpgaj") - .withTags( - mapOf("uqrebluimmbwx", "cemqbmfuvqarwz", "kraokq", "fgtdmbvx", "aokbavlyttaaknwf", "budbt", "sm", "ke")) - .withProperties(mapOf("gatolekscbctnan", "ujd", "wnsnlaimouxwks", "imwbzxpdcldpk", "fco", "mud", - "kbqsjhbtqqvyfscy", "bicziuswswj")) - .withDisplayName("t") - .withIsEnabled(true) - .withTrigger( - new TriggerBase().withEndTime("logxsvtzar").withStartTime("vqnsqk").withTimeZone("mbjwzzoslpkyb")) - .withAction(new ScheduleActionBase()); - model = BinaryData.fromObject(model).toObject(ScheduleProperties.class); - Assertions.assertEquals("kzpgaj", model.description()); - Assertions.assertEquals("cemqbmfuvqarwz", model.tags().get("uqrebluimmbwx")); - Assertions.assertEquals("ujd", model.properties().get("gatolekscbctnan")); - Assertions.assertEquals("t", model.displayName()); - Assertions.assertEquals(true, model.isEnabled()); - Assertions.assertEquals("logxsvtzar", model.trigger().endTime()); - Assertions.assertEquals("vqnsqk", model.trigger().startTime()); - Assertions.assertEquals("mbjwzzoslpkyb", model.trigger().timeZone()); - } - - // 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/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 e970d016f9d55..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleResourceArmPaginatedResultTests.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.ScheduleInner; -import com.azure.resourcemanager.machinelearning.models.ScheduleActionBase; -import com.azure.resourcemanager.machinelearning.models.ScheduleProperties; -import com.azure.resourcemanager.machinelearning.models.ScheduleResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.TriggerBase; -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( - "{\"value\":[{\"properties\":{\"displayName\":\"dmkrrb\",\"isEnabled\":false,\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"ulubefgybp\",\"startTime\":\"bfununmpzkrv\",\"timeZone\":\"ifkdschlzvf\"},\"action\":{\"actionType\":\"ScheduleActionBase\"},\"provisioningState\":\"Creating\",\"description\":\"kjjwgcwn\",\"tags\":{\"rtogmhmj\":\"kgf\",\"fp\":\"jsc\",\"fv\":\"qwtygevgwmseharx\",\"x\":\"n\"},\"properties\":{\"wjhrsidqpxlbtpa\":\"pjptn\",\"ngatwmy\":\"f\",\"mfjhpycvjqdvdwkq\":\"yutrymd\",\"n\":\"ldrlefgnaavua\"}},\"id\":\"taoutnpdct\",\"name\":\"hspfefyihd\",\"type\":\"yeuyldph\"},{\"properties\":{\"displayName\":\"ybkcgsuthhllnmwy\",\"isEnabled\":true,\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"exlfciatxtjrrl\",\"startTime\":\"dskjhhxdlaj\",\"timeZone\":\"xcxscvslxlh\"},\"action\":{\"actionType\":\"ScheduleActionBase\"},\"provisioningState\":\"Failed\",\"description\":\"rmukmyjmkxett\",\"tags\":{\"dnqtoqxjhqx\":\"ojfkq\",\"htkbtnq\":\"s\",\"mbiipsnawwlqk\":\"rngl\"},\"properties\":{\"xricctkwmuqq\":\"hhl\",\"rwvaexhdc\":\"ajxeiygle\",\"hdmljz\":\"rceqnkbrupob\"}},\"id\":\"vume\",\"name\":\"jpbi\",\"type\":\"nzpphepife\"},{\"properties\":{\"displayName\":\"eqir\",\"isEnabled\":false,\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"ly\",\"startTime\":\"gxvrpjl\",\"timeZone\":\"zuodacpun\"},\"action\":{\"actionType\":\"ScheduleActionBase\"},\"provisioningState\":\"Updating\",\"description\":\"pdjxqeskoynu\",\"tags\":{\"vesk\":\"pckaewse\",\"fn\":\"xegqphr\",\"bcbcpz\":\"hctmjtsgh\",\"ldtzmpypefcp\":\"rpzeqac\"},\"properties\":{\"fkhuytu\":\"hnuqndaizu\",\"mtvtvegwqiukvzwy\":\"zx\"}},\"id\":\"tthaokgkskj\",\"name\":\"vb\",\"type\":\"shajqf\"},{\"properties\":{\"displayName\":\"peexpgeumilhwuit\",\"isEnabled\":true,\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"yion\",\"startTime\":\"ninbdbzsxcwqqrs\",\"timeZone\":\"cbbprtugav\"},\"action\":{\"actionType\":\"ScheduleActionBase\"},\"provisioningState\":\"Canceled\",\"description\":\"yksivmfogdrtbfc\",\"tags\":{\"xsgm\":\"ftsjcwj\",\"if\":\"awvifdxke\",\"loozrvt\":\"ocjxw\"},\"properties\":{\"cpxxvirye\":\"mufun\",\"lpmcrdc\":\"ngjgvrquvpyg\",\"x\":\"eljtiahxmfqryarv\"}},\"id\":\"bglcjkayspthzodu\",\"name\":\"tl\",\"type\":\"jtgblios\"}],\"nextLink\":\"fmkmfdjxyxgbkkq\"}") - .toObject(ScheduleResourceArmPaginatedResult.class); - Assertions.assertEquals("kjjwgcwn", model.value().get(0).properties().description()); - Assertions.assertEquals("kgf", model.value().get(0).properties().tags().get("rtogmhmj")); - Assertions.assertEquals("pjptn", model.value().get(0).properties().properties().get("wjhrsidqpxlbtpa")); - Assertions.assertEquals("dmkrrb", model.value().get(0).properties().displayName()); - Assertions.assertEquals(false, model.value().get(0).properties().isEnabled()); - Assertions.assertEquals("ulubefgybp", model.value().get(0).properties().trigger().endTime()); - Assertions.assertEquals("bfununmpzkrv", model.value().get(0).properties().trigger().startTime()); - Assertions.assertEquals("ifkdschlzvf", model.value().get(0).properties().trigger().timeZone()); - Assertions.assertEquals("fmkmfdjxyxgbkkq", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScheduleResourceArmPaginatedResult model = new ScheduleResourceArmPaginatedResult().withValue(Arrays.asList( - new ScheduleInner().withProperties(new ScheduleProperties().withDescription("kjjwgcwn") - .withTags(mapOf("rtogmhmj", "kgf", "fp", "jsc", "fv", "qwtygevgwmseharx", "x", "n")) - .withProperties(mapOf("wjhrsidqpxlbtpa", "pjptn", "ngatwmy", "f", "mfjhpycvjqdvdwkq", "yutrymd", "n", - "ldrlefgnaavua")) - .withDisplayName("dmkrrb") - .withIsEnabled(false) - .withTrigger(new TriggerBase().withEndTime("ulubefgybp") - .withStartTime("bfununmpzkrv") - .withTimeZone("ifkdschlzvf")) - .withAction(new ScheduleActionBase())), - new ScheduleInner().withProperties(new ScheduleProperties().withDescription("rmukmyjmkxett") - .withTags(mapOf("dnqtoqxjhqx", "ojfkq", "htkbtnq", "s", "mbiipsnawwlqk", "rngl")) - .withProperties(mapOf("xricctkwmuqq", "hhl", "rwvaexhdc", "ajxeiygle", "hdmljz", "rceqnkbrupob")) - .withDisplayName("ybkcgsuthhllnmwy") - .withIsEnabled(true) - .withTrigger(new TriggerBase().withEndTime("exlfciatxtjrrl") - .withStartTime("dskjhhxdlaj") - .withTimeZone("xcxscvslxlh")) - .withAction(new ScheduleActionBase())), - new ScheduleInner().withProperties(new ScheduleProperties().withDescription("pdjxqeskoynu") - .withTags(mapOf("vesk", "pckaewse", "fn", "xegqphr", "bcbcpz", "hctmjtsgh", "ldtzmpypefcp", "rpzeqac")) - .withProperties(mapOf("fkhuytu", "hnuqndaizu", "mtvtvegwqiukvzwy", "zx")) - .withDisplayName("eqir") - .withIsEnabled(false) - .withTrigger(new TriggerBase().withEndTime("ly").withStartTime("gxvrpjl").withTimeZone("zuodacpun")) - .withAction(new ScheduleActionBase())), - new ScheduleInner().withProperties(new ScheduleProperties().withDescription("yksivmfogdrtbfc") - .withTags(mapOf("xsgm", "ftsjcwj", "if", "awvifdxke", "loozrvt", "ocjxw")) - .withProperties(mapOf("cpxxvirye", "mufun", "lpmcrdc", "ngjgvrquvpyg", "x", "eljtiahxmfqryarv")) - .withDisplayName("peexpgeumilhwuit") - .withIsEnabled(true) - .withTrigger( - new TriggerBase().withEndTime("yion").withStartTime("ninbdbzsxcwqqrs").withTimeZone("cbbprtugav")) - .withAction(new ScheduleActionBase())))) - .withNextLink("fmkmfdjxyxgbkkq"); - model = BinaryData.fromObject(model).toObject(ScheduleResourceArmPaginatedResult.class); - Assertions.assertEquals("kjjwgcwn", model.value().get(0).properties().description()); - Assertions.assertEquals("kgf", model.value().get(0).properties().tags().get("rtogmhmj")); - Assertions.assertEquals("pjptn", model.value().get(0).properties().properties().get("wjhrsidqpxlbtpa")); - Assertions.assertEquals("dmkrrb", model.value().get(0).properties().displayName()); - Assertions.assertEquals(false, model.value().get(0).properties().isEnabled()); - Assertions.assertEquals("ulubefgybp", model.value().get(0).properties().trigger().endTime()); - Assertions.assertEquals("bfununmpzkrv", model.value().get(0).properties().trigger().startTime()); - Assertions.assertEquals("ifkdschlzvf", model.value().get(0).properties().trigger().timeZone()); - Assertions.assertEquals("fmkmfdjxyxgbkkq", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 694885a70c038..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesCreateOrUpdateMockTests.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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -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.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 reactor.core.publisher.Mono; - -public final class SchedulesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"displayName\":\"xjxueilixzjvkqj\",\"isEnabled\":false,\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"hcmxxxpnkx\",\"startTime\":\"jnkmsfsq\",\"timeZone\":\"xqcim\"},\"action\":{\"actionType\":\"ScheduleActionBase\"},\"provisioningState\":\"Succeeded\",\"description\":\"kjwr\",\"tags\":{\"ybdgtfoz\":\"gcsmrtep\",\"bpqelmszobt\":\"sfjdcokb\",\"bgrdrumu\":\"eltnby\"},\"properties\":{\"kwv\":\"wecdsybiazfvx\",\"byqqon\":\"eqly\"}},\"id\":\"ekiojusmdo\",\"name\":\"kukycn\",\"type\":\"aovlyykx\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("o") - .withExistingWorkspace("tlxrdepqtz", "hkpko") - .withProperties(new ScheduleProperties().withDescription("mbbhluvdce") - .withTags(mapOf("wdskiegtae", "vnomzlre", "xaodbhgxbadbor", "aleptaasqo")) - .withProperties(mapOf("hqwyxbat", "ihggv", "dsclqwkddgepu", "viynlslgxif", "ueq", "ambzfxgshaq", - "jtunlllmtiy", "niagzmyxsoxqa")) - .withDisplayName("nobuwhutvcdtgx") - .withIsEnabled(false) - .withTrigger(new TriggerBase().withEndTime("hgmmzxpsrlbppjq") - .withStartTime("cpdaoskgtalljsoa") - .withTimeZone("jjklmpbgrosxfdx")) - .withAction(new ScheduleActionBase())) - .create(); - - Assertions.assertEquals("kjwr", response.properties().description()); - Assertions.assertEquals("gcsmrtep", response.properties().tags().get("ybdgtfoz")); - Assertions.assertEquals("wecdsybiazfvx", response.properties().properties().get("kwv")); - Assertions.assertEquals("xjxueilixzjvkqj", response.properties().displayName()); - Assertions.assertEquals(false, response.properties().isEnabled()); - Assertions.assertEquals("hcmxxxpnkx", response.properties().trigger().endTime()); - Assertions.assertEquals("jnkmsfsq", response.properties().trigger().startTime()); - Assertions.assertEquals("xqcim", response.properties().trigger().timeZone()); - } - - // 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/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 24c48ec8fa477..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SchedulesDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("qoucmfuvuslvbujw", "nz", "j", 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 7105742be9cab..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.Schedule; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SchedulesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"displayName\":\"g\",\"isEnabled\":false,\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"ypxwlvthiv\",\"startTime\":\"uaxoswqwbh\",\"timeZone\":\"zlgkcnp\"},\"action\":{\"actionType\":\"ScheduleActionBase\"},\"provisioningState\":\"Deleting\",\"description\":\"rxfezlmzse\",\"tags\":{\"vofrenuvp\":\"uzyowra\"},\"properties\":{\"pgqxt\":\"tnyyeyjatfpbxnre\",\"ynxbuvyglfyfcs\":\"hruqtximrxeyz\"}},\"id\":\"jhoxtbsybpefojp\",\"name\":\"ixdgqjkfvmrnwgea\",\"type\":\"yifeiiriomjdnkn\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("yyvecr", "hqym", "dsthktsaljkhlpg", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("rxfezlmzse", response.properties().description()); - Assertions.assertEquals("uzyowra", response.properties().tags().get("vofrenuvp")); - Assertions.assertEquals("tnyyeyjatfpbxnre", response.properties().properties().get("pgqxt")); - Assertions.assertEquals("g", response.properties().displayName()); - Assertions.assertEquals(false, response.properties().isEnabled()); - Assertions.assertEquals("ypxwlvthiv", response.properties().trigger().endTime()); - Assertions.assertEquals("uaxoswqwbh", response.properties().trigger().startTime()); - Assertions.assertEquals("zlgkcnp", 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 76d01c992e582..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.Schedule; -import com.azure.resourcemanager.machinelearning.models.ScheduleListViewType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class SchedulesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"oujtcp\",\"isEnabled\":true,\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"lyogzbasjckakik\",\"startTime\":\"ajmnvb\",\"timeZone\":\"mnkrqdyc\"},\"action\":{\"actionType\":\"ScheduleActionBase\"},\"provisioningState\":\"Deleting\",\"description\":\"kxx\",\"tags\":{\"bcgsa\":\"qr\",\"qedft\":\"daypx\",\"kt\":\"igmj\"},\"properties\":{\"brtzfliqntnoeg\":\"yvzixmusiidiv\",\"daiex\":\"oqpuclidyt\",\"fgivfiypf\":\"sapygiioukaffz\",\"u\":\"wyzjsixorvigrxmp\"}},\"id\":\"ekbpqghxdpg\",\"name\":\"hfimlyxd\",\"type\":\"ixjudbiac\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("nhhvp", "ukourqviyf", "segwez", ScheduleListViewType.ALL, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("kxx", response.iterator().next().properties().description()); - Assertions.assertEquals("qr", response.iterator().next().properties().tags().get("bcgsa")); - Assertions.assertEquals("yvzixmusiidiv", - response.iterator().next().properties().properties().get("brtzfliqntnoeg")); - Assertions.assertEquals("oujtcp", response.iterator().next().properties().displayName()); - Assertions.assertEquals(true, response.iterator().next().properties().isEnabled()); - Assertions.assertEquals("lyogzbasjckakik", response.iterator().next().properties().trigger().endTime()); - Assertions.assertEquals("ajmnvb", response.iterator().next().properties().trigger().startTime()); - Assertions.assertEquals("mnkrqdyc", 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 a9ce56bb4c0c9..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScriptReferenceTests.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.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\":\"nione\",\"scriptData\":\"zdrd\",\"scriptArguments\":\"enx\",\"timeout\":\"tlzlmtrlxcznnhz\"}") - .toObject(ScriptReference.class); - Assertions.assertEquals("nione", model.scriptSource()); - Assertions.assertEquals("zdrd", model.scriptData()); - Assertions.assertEquals("enx", model.scriptArguments()); - Assertions.assertEquals("tlzlmtrlxcznnhz", model.timeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptReference model = new ScriptReference().withScriptSource("nione") - .withScriptData("zdrd") - .withScriptArguments("enx") - .withTimeout("tlzlmtrlxcznnhz"); - model = BinaryData.fromObject(model).toObject(ScriptReference.class); - Assertions.assertEquals("nione", model.scriptSource()); - Assertions.assertEquals("zdrd", model.scriptData()); - Assertions.assertEquals("enx", model.scriptArguments()); - Assertions.assertEquals("tlzlmtrlxcznnhz", 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 6af7f16e93420..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScriptsToExecuteTests.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.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\":\"ibniynts\",\"scriptData\":\"mfmeftvhkmoo\",\"scriptArguments\":\"rh\",\"timeout\":\"bwgmjgrul\"},\"creationScript\":{\"scriptSource\":\"gxhcxnwjtpfdzxco\",\"scriptData\":\"fwofwakukzkdtz\",\"scriptArguments\":\"oednlwglihezomuc\",\"timeout\":\"g\"}}") - .toObject(ScriptsToExecute.class); - Assertions.assertEquals("ibniynts", model.startupScript().scriptSource()); - Assertions.assertEquals("mfmeftvhkmoo", model.startupScript().scriptData()); - Assertions.assertEquals("rh", model.startupScript().scriptArguments()); - Assertions.assertEquals("bwgmjgrul", model.startupScript().timeout()); - Assertions.assertEquals("gxhcxnwjtpfdzxco", model.creationScript().scriptSource()); - Assertions.assertEquals("fwofwakukzkdtz", model.creationScript().scriptData()); - Assertions.assertEquals("oednlwglihezomuc", model.creationScript().scriptArguments()); - Assertions.assertEquals("g", model.creationScript().timeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptsToExecute model = new ScriptsToExecute() - .withStartupScript(new ScriptReference().withScriptSource("ibniynts") - .withScriptData("mfmeftvhkmoo") - .withScriptArguments("rh") - .withTimeout("bwgmjgrul")) - .withCreationScript(new ScriptReference().withScriptSource("gxhcxnwjtpfdzxco") - .withScriptData("fwofwakukzkdtz") - .withScriptArguments("oednlwglihezomuc") - .withTimeout("g")); - model = BinaryData.fromObject(model).toObject(ScriptsToExecute.class); - Assertions.assertEquals("ibniynts", model.startupScript().scriptSource()); - Assertions.assertEquals("mfmeftvhkmoo", model.startupScript().scriptData()); - Assertions.assertEquals("rh", model.startupScript().scriptArguments()); - Assertions.assertEquals("bwgmjgrul", model.startupScript().timeout()); - Assertions.assertEquals("gxhcxnwjtpfdzxco", model.creationScript().scriptSource()); - Assertions.assertEquals("fwofwakukzkdtz", model.creationScript().scriptData()); - Assertions.assertEquals("oednlwglihezomuc", model.creationScript().scriptArguments()); - Assertions.assertEquals("g", 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/ServerlessComputeSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessComputeSettingsTests.java deleted file mode 100644 index 344842593e0d6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessComputeSettingsTests.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.ServerlessComputeSettings; -import org.junit.jupiter.api.Assertions; - -public final class ServerlessComputeSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServerlessComputeSettings model = BinaryData - .fromString("{\"serverlessComputeCustomSubnet\":\"gxsabkyq\",\"serverlessComputeNoPublicIP\":false}") - .toObject(ServerlessComputeSettings.class); - Assertions.assertEquals("gxsabkyq", model.serverlessComputeCustomSubnet()); - Assertions.assertEquals(false, model.serverlessComputeNoPublicIp()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServerlessComputeSettings model = new ServerlessComputeSettings().withServerlessComputeCustomSubnet("gxsabkyq") - .withServerlessComputeNoPublicIp(false); - model = BinaryData.fromObject(model).toObject(ServerlessComputeSettings.class); - Assertions.assertEquals("gxsabkyq", model.serverlessComputeCustomSubnet()); - Assertions.assertEquals(false, model.serverlessComputeNoPublicIp()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointInnerTests.java deleted file mode 100644 index f5fbd6182094b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointInnerTests.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.fluent.models.ServerlessEndpointInner; -import com.azure.resourcemanager.machinelearning.models.ContentSafety; -import com.azure.resourcemanager.machinelearning.models.ContentSafetyStatus; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.ModelSettings; -import com.azure.resourcemanager.machinelearning.models.ServerlessEndpointProperties; -import com.azure.resourcemanager.machinelearning.models.ServerlessInferenceEndpointAuthMode; -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 ServerlessEndpointInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServerlessEndpointInner model = BinaryData.fromString( - "{\"properties\":{\"modelSettings\":{\"modelId\":\"h\"},\"authMode\":\"Key\",\"inferenceEndpoint\":{\"uri\":\"pjtnqjilaywkdcw\",\"headers\":{\"lnkkbjpjvlywltmf\":\"yrilmhxdqaolf\",\"fnqzocr\":\"obbjwhlwy\"}},\"provisioningState\":\"Failed\",\"endpointState\":\"Suspended\",\"marketplaceSubscriptionId\":\"untgxdn\",\"contentSafety\":{\"contentSafetyStatus\":\"Enabled\"}},\"kind\":\"tiekoifuvnyttz\",\"identity\":{\"principalId\":\"7f62875c-d396-45a2-b1da-da7c4db12a89\",\"tenantId\":\"39df265d-813e-4d5e-84b3-6134ec2354fc\",\"type\":\"None\",\"userAssignedIdentities\":{\"gm\":{\"principalId\":\"a49947ca-fdaf-4604-aef9-2fd1b4656623\",\"clientId\":\"2bc9890b-220e-4d75-89d4-92a440052ecc\"},\"hlqtxnrflkn\":{\"principalId\":\"131a3a94-149d-431f-89d7-a64607ae0e41\",\"clientId\":\"3db55ce2-f3bd-45bd-9820-f0afc2c01369\"}}},\"sku\":{\"name\":\"ndpgfjodhda\",\"tier\":\"Basic\",\"size\":\"fhipx\",\"family\":\"sabvcip\",\"capacity\":1000118308},\"location\":\"fczuumljcir\",\"tags\":{\"ei\":\"fycd\"},\"id\":\"itjn\",\"name\":\"xzajlnsjhwjuyxxb\",\"type\":\"qvmvuaytuadxkxe\"}") - .toObject(ServerlessEndpointInner.class); - Assertions.assertEquals("fczuumljcir", model.location()); - Assertions.assertEquals("fycd", model.tags().get("ei")); - Assertions.assertEquals("h", model.properties().modelSettings().modelId()); - Assertions.assertEquals(ServerlessInferenceEndpointAuthMode.KEY, model.properties().authMode()); - Assertions.assertEquals(ContentSafetyStatus.ENABLED, model.properties().contentSafety().contentSafetyStatus()); - Assertions.assertEquals("tiekoifuvnyttz", model.kind()); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); - Assertions.assertEquals("ndpgfjodhda", model.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); - Assertions.assertEquals("fhipx", model.sku().size()); - Assertions.assertEquals("sabvcip", model.sku().family()); - Assertions.assertEquals(1000118308, model.sku().capacity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServerlessEndpointInner model = new ServerlessEndpointInner().withLocation("fczuumljcir") - .withTags(mapOf("ei", "fycd")) - .withProperties(new ServerlessEndpointProperties().withModelSettings(new ModelSettings().withModelId("h")) - .withAuthMode(ServerlessInferenceEndpointAuthMode.KEY) - .withContentSafety(new ContentSafety().withContentSafetyStatus(ContentSafetyStatus.ENABLED))) - .withKind("tiekoifuvnyttz") - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities( - mapOf("gm", new UserAssignedIdentity(), "hlqtxnrflkn", new UserAssignedIdentity()))) - .withSku(new Sku().withName("ndpgfjodhda") - .withTier(SkuTier.BASIC) - .withSize("fhipx") - .withFamily("sabvcip") - .withCapacity(1000118308)); - model = BinaryData.fromObject(model).toObject(ServerlessEndpointInner.class); - Assertions.assertEquals("fczuumljcir", model.location()); - Assertions.assertEquals("fycd", model.tags().get("ei")); - Assertions.assertEquals("h", model.properties().modelSettings().modelId()); - Assertions.assertEquals(ServerlessInferenceEndpointAuthMode.KEY, model.properties().authMode()); - Assertions.assertEquals(ContentSafetyStatus.ENABLED, model.properties().contentSafety().contentSafetyStatus()); - Assertions.assertEquals("tiekoifuvnyttz", model.kind()); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); - Assertions.assertEquals("ndpgfjodhda", model.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); - Assertions.assertEquals("fhipx", model.sku().size()); - Assertions.assertEquals("sabvcip", model.sku().family()); - Assertions.assertEquals(1000118308, model.sku().capacity()); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointPropertiesTests.java deleted file mode 100644 index 48a5a7eef6df9..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointPropertiesTests.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.ContentSafety; -import com.azure.resourcemanager.machinelearning.models.ContentSafetyStatus; -import com.azure.resourcemanager.machinelearning.models.ModelSettings; -import com.azure.resourcemanager.machinelearning.models.ServerlessEndpointProperties; -import com.azure.resourcemanager.machinelearning.models.ServerlessInferenceEndpointAuthMode; -import org.junit.jupiter.api.Assertions; - -public final class ServerlessEndpointPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServerlessEndpointProperties model = BinaryData.fromString( - "{\"modelSettings\":{\"modelId\":\"pntghyks\"},\"authMode\":\"Key\",\"inferenceEndpoint\":{\"uri\":\"drnxsluvlzla\",\"headers\":{\"pbqhvfdqqjwkr\":\"x\"}},\"provisioningState\":\"Updating\",\"endpointState\":\"Reinstating\",\"marketplaceSubscriptionId\":\"ojisg\",\"contentSafety\":{\"contentSafetyStatus\":\"Enabled\"}}") - .toObject(ServerlessEndpointProperties.class); - Assertions.assertEquals("pntghyks", model.modelSettings().modelId()); - Assertions.assertEquals(ServerlessInferenceEndpointAuthMode.KEY, model.authMode()); - Assertions.assertEquals(ContentSafetyStatus.ENABLED, model.contentSafety().contentSafetyStatus()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServerlessEndpointProperties model - = new ServerlessEndpointProperties().withModelSettings(new ModelSettings().withModelId("pntghyks")) - .withAuthMode(ServerlessInferenceEndpointAuthMode.KEY) - .withContentSafety(new ContentSafety().withContentSafetyStatus(ContentSafetyStatus.ENABLED)); - model = BinaryData.fromObject(model).toObject(ServerlessEndpointProperties.class); - Assertions.assertEquals("pntghyks", model.modelSettings().modelId()); - Assertions.assertEquals(ServerlessInferenceEndpointAuthMode.KEY, model.authMode()); - Assertions.assertEquals(ContentSafetyStatus.ENABLED, model.contentSafety().contentSafetyStatus()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointTrackedResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointTrackedResourceArmPaginatedResultTests.java deleted file mode 100644 index 4c51ba98e8b58..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointTrackedResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code 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.ServerlessEndpointInner; -import com.azure.resourcemanager.machinelearning.models.ContentSafety; -import com.azure.resourcemanager.machinelearning.models.ContentSafetyStatus; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.ModelSettings; -import com.azure.resourcemanager.machinelearning.models.ServerlessEndpointProperties; -import com.azure.resourcemanager.machinelearning.models.ServerlessEndpointTrackedResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.ServerlessInferenceEndpointAuthMode; -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 ServerlessEndpointTrackedResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServerlessEndpointTrackedResourceArmPaginatedResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"modelSettings\":{\"modelId\":\"vqvogf\"},\"authMode\":\"Key\",\"inferenceEndpoint\":{\"uri\":\"wvbhlimbyq\",\"headers\":{\"ikcdrdaasax\":\"ood\"}},\"provisioningState\":\"Creating\",\"endpointState\":\"Suspended\",\"marketplaceSubscriptionId\":\"kwiy\",\"contentSafety\":{\"contentSafetyStatus\":\"Enabled\"}},\"kind\":\"ko\",\"identity\":{\"principalId\":\"14063356-96fa-45ba-8878-ff13f4524052\",\"tenantId\":\"77a755f2-7770-4ca6-9abd-449f44d7b996\",\"type\":\"None\",\"userAssignedIdentities\":{\"lnk\":{\"principalId\":\"c7f1f32f-3690-4721-bd7b-ad3e9b209cb1\",\"clientId\":\"660b2bbe-eed1-499d-807d-f4d4e01e1b62\"},\"sxvjabjqqaxuyvy\":{\"principalId\":\"ea6039e0-1d6f-436d-9837-b7fa0188de5c\",\"clientId\":\"ff04f5a9-5340-461d-8be1-947c37c924fe\"},\"udndoabhjxw\":{\"principalId\":\"9ed4a089-b353-4958-8615-103f7a62f4ac\",\"clientId\":\"3faf461d-3003-4d91-bb53-3baea908b2e6\"}}},\"sku\":{\"name\":\"weuipmpvksmi\",\"tier\":\"Premium\",\"size\":\"xtlt\",\"family\":\"krdpqgfhyrfr\",\"capacity\":1004449156},\"location\":\"d\",\"tags\":{\"ajqmat\":\"wfcmfcnr\"},\"id\":\"jti\",\"name\":\"ln\",\"type\":\"qgxxgfbb\"},{\"properties\":{\"modelSettings\":{\"modelId\":\"pqagynoiprn\"},\"authMode\":\"Key\",\"inferenceEndpoint\":{\"uri\":\"lin\",\"headers\":{\"bmqimi\":\"qxzxaqz\",\"asvvoqsbpkfl\":\"mqruqguhfupe\",\"hdkcprgu\":\"nfkgxsyaowuzowpu\",\"ixmqrudjizcbf\":\"xrztiochlu\"}},\"provisioningState\":\"Succeeded\",\"endpointState\":\"Suspending\",\"marketplaceSubscriptionId\":\"fhi\",\"contentSafety\":{\"contentSafetyStatus\":\"Enabled\"}},\"kind\":\"fbcpaqktkrumzu\",\"identity\":{\"principalId\":\"92df8603-76c4-4be3-b906-0be862094d12\",\"tenantId\":\"abe3eb5a-5604-44a4-b322-0fada0fa3f0b\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"ovqkxiu\":{\"principalId\":\"d8548fb4-6d4f-46ad-9f3d-43dc502ab8a2\",\"clientId\":\"17c480b0-1ac8-486d-945f-bd809759d2fb\"}}},\"sku\":{\"name\":\"ggvqrnhyhlwcjs\",\"tier\":\"Basic\",\"size\":\"hffbxrq\",\"family\":\"ijpeuql\",\"capacity\":236408023},\"location\":\"qztvx\",\"tags\":{\"me\":\"wmjswenaww\",\"yoeojhtollhs\":\"leqioulndh\"},\"id\":\"idmytzln\",\"name\":\"lxpnovyoanf\",\"type\":\"cswqa\"},{\"properties\":{\"modelSettings\":{\"modelId\":\"vtxigvjr\"},\"authMode\":\"Key\",\"inferenceEndpoint\":{\"uri\":\"gaeukyawohpm\",\"headers\":{\"hsidsjtdlpbnin\":\"nucsk\",\"cpuo\":\"gazlsvbz\"}},\"provisioningState\":\"Succeeded\",\"endpointState\":\"Suspending\",\"marketplaceSubscriptionId\":\"ciklh\",\"contentSafety\":{\"contentSafetyStatus\":\"Enabled\"}},\"kind\":\"rdrenxo\",\"identity\":{\"principalId\":\"90de711a-93f1-4f44-9afc-df8d628f892a\",\"tenantId\":\"9837c157-1789-47da-b8b0-3218ae1ace1a\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"iv\":{\"principalId\":\"b85b9f19-d2be-46d0-bd5c-b52751e2627e\",\"clientId\":\"96ff4b61-596a-4aa3-9e32-6587148ed8e3\"},\"ydwbdbfgrlpunytj\":{\"principalId\":\"faa3abfe-813e-48b4-90eb-141f0b34dfe0\",\"clientId\":\"727c2538-29ea-49bb-b1f9-164ccade35e5\"}}},\"sku\":{\"name\":\"esmmpathubtahd\",\"tier\":\"Standard\",\"size\":\"iwllbvgwzsffted\",\"family\":\"snkt\",\"capacity\":1883511618},\"location\":\"avaqogfkbebau\",\"tags\":{\"tpzkgmeboywhcz\":\"btxxwpfhnjzud\",\"gqbedygi\":\"qrhm\"},\"id\":\"rzwnyk\",\"name\":\"id\",\"type\":\"chl\"},{\"properties\":{\"modelSettings\":{\"modelId\":\"wctofldseacdhz\"},\"authMode\":\"Key\",\"inferenceEndpoint\":{\"uri\":\"brfgdrwji\",\"headers\":{\"cwv\":\"hfjsrwqrxetf\",\"dqntycnawthv\":\"r\",\"nuyeamcmhud\":\"ax\"}},\"provisioningState\":\"Failed\",\"endpointState\":\"Reinstating\",\"marketplaceSubscriptionId\":\"okwcpqtwl\",\"contentSafety\":{\"contentSafetyStatus\":\"Disabled\"}},\"kind\":\"rg\",\"identity\":{\"principalId\":\"43e56463-5899-46b6-962d-6f31f58a1909\",\"tenantId\":\"a5fff899-0096-4286-ad6c-b647d6821fe1\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"oilacidu\":{\"principalId\":\"988cb364-d0a9-42f6-b45f-c3f75f9da422\",\"clientId\":\"443617dc-222b-49c1-b7dd-935af1210df3\"},\"e\":{\"principalId\":\"333a8344-5efd-46b5-9adb-b30d6608f1a6\",\"clientId\":\"4f117368-7336-4b20-87fd-799eb0e3ce98\"}}},\"sku\":{\"name\":\"jlhwyxpzruzyt\",\"tier\":\"Premium\",\"size\":\"whbgxvellvul\",\"family\":\"d\",\"capacity\":237918150},\"location\":\"mujd\",\"tags\":{\"xfzuvrzmzqmzj\":\"clyymffhmjpddn\"},\"id\":\"rb\",\"name\":\"pv\",\"type\":\"mdyfoebojtj\"}],\"nextLink\":\"g\"}") - .toObject(ServerlessEndpointTrackedResourceArmPaginatedResult.class); - Assertions.assertEquals("d", model.value().get(0).location()); - Assertions.assertEquals("wfcmfcnr", model.value().get(0).tags().get("ajqmat")); - Assertions.assertEquals("vqvogf", model.value().get(0).properties().modelSettings().modelId()); - Assertions.assertEquals(ServerlessInferenceEndpointAuthMode.KEY, model.value().get(0).properties().authMode()); - Assertions.assertEquals(ContentSafetyStatus.ENABLED, - model.value().get(0).properties().contentSafety().contentSafetyStatus()); - Assertions.assertEquals("ko", model.value().get(0).kind()); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).identity().type()); - Assertions.assertEquals("weuipmpvksmi", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, model.value().get(0).sku().tier()); - Assertions.assertEquals("xtlt", model.value().get(0).sku().size()); - Assertions.assertEquals("krdpqgfhyrfr", model.value().get(0).sku().family()); - Assertions.assertEquals(1004449156, model.value().get(0).sku().capacity()); - Assertions.assertEquals("g", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServerlessEndpointTrackedResourceArmPaginatedResult model - = new ServerlessEndpointTrackedResourceArmPaginatedResult() - .withValue(Arrays - .asList( - new ServerlessEndpointInner().withLocation("d") - .withTags(mapOf("ajqmat", "wfcmfcnr")) - .withProperties(new ServerlessEndpointProperties() - .withModelSettings(new ModelSettings().withModelId("vqvogf")) - .withAuthMode(ServerlessInferenceEndpointAuthMode.KEY) - .withContentSafety( - new ContentSafety().withContentSafetyStatus(ContentSafetyStatus.ENABLED))) - .withKind("ko") - .withIdentity(new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("lnk", new UserAssignedIdentity(), "sxvjabjqqaxuyvy", - new UserAssignedIdentity(), "udndoabhjxw", new UserAssignedIdentity()))) - .withSku( - new Sku().withName("weuipmpvksmi") - .withTier(SkuTier.PREMIUM) - .withSize("xtlt") - .withFamily("krdpqgfhyrfr") - .withCapacity(1004449156)), - new ServerlessEndpointInner().withLocation("qztvx") - .withTags(mapOf("me", "wmjswenaww", "yoeojhtollhs", "leqioulndh")) - .withProperties(new ServerlessEndpointProperties() - .withModelSettings(new ModelSettings().withModelId("pqagynoiprn")) - .withAuthMode(ServerlessInferenceEndpointAuthMode.KEY) - .withContentSafety( - new ContentSafety().withContentSafetyStatus(ContentSafetyStatus.ENABLED))) - .withKind("fbcpaqktkrumzu") - .withIdentity( - new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("ovqkxiu", new UserAssignedIdentity()))) - .withSku(new Sku() - .withName("ggvqrnhyhlwcjs") - .withTier(SkuTier.BASIC) - .withSize("hffbxrq") - .withFamily("ijpeuql") - .withCapacity(236408023)), - new ServerlessEndpointInner().withLocation("avaqogfkbebau") - .withTags(mapOf("tpzkgmeboywhcz", "btxxwpfhnjzud", "gqbedygi", "qrhm")) - .withProperties(new ServerlessEndpointProperties() - .withModelSettings(new ModelSettings().withModelId("vtxigvjr")) - .withAuthMode(ServerlessInferenceEndpointAuthMode.KEY) - .withContentSafety( - new ContentSafety().withContentSafetyStatus(ContentSafetyStatus.ENABLED))) - .withKind("rdrenxo") - .withIdentity(new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("iv", new UserAssignedIdentity(), "ydwbdbfgrlpunytj", - new UserAssignedIdentity()))) - .withSku( - new Sku().withName("esmmpathubtahd") - .withTier(SkuTier.STANDARD) - .withSize("iwllbvgwzsffted") - .withFamily("snkt") - .withCapacity(1883511618)), - new ServerlessEndpointInner().withLocation("mujd") - .withTags(mapOf("xfzuvrzmzqmzj", "clyymffhmjpddn")) - .withProperties(new ServerlessEndpointProperties() - .withModelSettings(new ModelSettings().withModelId("wctofldseacdhz")) - .withAuthMode(ServerlessInferenceEndpointAuthMode.KEY) - .withContentSafety( - new ContentSafety().withContentSafetyStatus(ContentSafetyStatus.DISABLED))) - .withKind("rg") - .withIdentity( - new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities( - mapOf("oilacidu", new UserAssignedIdentity(), "e", new UserAssignedIdentity()))) - .withSku(new Sku().withName("jlhwyxpzruzyt") - .withTier(SkuTier.PREMIUM) - .withSize("whbgxvellvul") - .withFamily("d") - .withCapacity(237918150)))) - .withNextLink("g"); - model = BinaryData.fromObject(model).toObject(ServerlessEndpointTrackedResourceArmPaginatedResult.class); - Assertions.assertEquals("d", model.value().get(0).location()); - Assertions.assertEquals("wfcmfcnr", model.value().get(0).tags().get("ajqmat")); - Assertions.assertEquals("vqvogf", model.value().get(0).properties().modelSettings().modelId()); - Assertions.assertEquals(ServerlessInferenceEndpointAuthMode.KEY, model.value().get(0).properties().authMode()); - Assertions.assertEquals(ContentSafetyStatus.ENABLED, - model.value().get(0).properties().contentSafety().contentSafetyStatus()); - Assertions.assertEquals("ko", model.value().get(0).kind()); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).identity().type()); - Assertions.assertEquals("weuipmpvksmi", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, model.value().get(0).sku().tier()); - Assertions.assertEquals("xtlt", model.value().get(0).sku().size()); - Assertions.assertEquals("krdpqgfhyrfr", model.value().get(0).sku().family()); - Assertions.assertEquals(1004449156, model.value().get(0).sku().capacity()); - Assertions.assertEquals("g", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsCreateOrUpdateMockTests.java deleted file mode 100644 index 72ec8c4e21f25..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights 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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ContentSafety; -import com.azure.resourcemanager.machinelearning.models.ContentSafetyStatus; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.ModelSettings; -import com.azure.resourcemanager.machinelearning.models.ServerlessEndpoint; -import com.azure.resourcemanager.machinelearning.models.ServerlessEndpointProperties; -import com.azure.resourcemanager.machinelearning.models.ServerlessInferenceEndpointAuthMode; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -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 reactor.core.publisher.Mono; - -public final class ServerlessEndpointsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"modelSettings\":{\"modelId\":\"fokcbxrskylqppp\"},\"authMode\":\"Key\",\"inferenceEndpoint\":{\"uri\":\"ikktretutsy\",\"headers\":{\"erotghxkrrpmgdol\":\"plaxxfnrltanv\"}},\"provisioningState\":\"Succeeded\",\"endpointState\":\"Suspended\",\"marketplaceSubscriptionId\":\"lavdtttydjqom\",\"contentSafety\":{\"contentSafetyStatus\":\"Enabled\"}},\"kind\":\"jqcshbypw\",\"identity\":{\"principalId\":\"37edbc76-cef9-48b9-9cc2-79608d9945c7\",\"tenantId\":\"0aced1ac-e90b-4127-8f23-14aec8e79d91\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"dmoufjuqowuicvjy\":{\"principalId\":\"71f38893-306d-4554-94d3-d704ba5e4069\",\"clientId\":\"d6c0480e-abcd-4bba-ad9c-0c48ba346fab\"},\"mleuqxhmrilwkcg\":{\"principalId\":\"36881254-7f80-4b44-8ab1-6e4042c96c90\",\"clientId\":\"d3cf50b0-d2ec-475a-a730-1ff16c1504a3\"}}},\"sku\":{\"name\":\"vpvta\",\"tier\":\"Basic\",\"size\":\"znfxdqqzikvgwqi\",\"family\":\"dhas\",\"capacity\":561322142},\"location\":\"exrzxvff\",\"tags\":{\"t\":\"tdmhr\"},\"id\":\"yulkoeps\",\"name\":\"oqdibygrqcid\",\"type\":\"wkxikxiqxlxoksy\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ServerlessEndpoint response = manager.serverlessEndpoints() - .define("szbvhxnjor") - .withRegion("xtnk") - .withExistingWorkspace("voderduabqbverb", "c") - .withProperties(new ServerlessEndpointProperties().withModelSettings(new ModelSettings().withModelId("o")) - .withAuthMode(ServerlessInferenceEndpointAuthMode.KEY) - .withContentSafety(new ContentSafety().withContentSafetyStatus(ContentSafetyStatus.DISABLED))) - .withTags(mapOf("rkyaovc", "dvxsgdaajlhgsuq", "taingadkrkny", "dsrxhpqlxnbd", "fgwbuxqzf", "jngdfzqcjfqm")) - .withKind("vsfgyw") - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("gmebvn", new UserAssignedIdentity(), "hdkvkqjjouh", - new UserAssignedIdentity(), "cttpcctvcjdrmkn", new UserAssignedIdentity()))) - .withSku(new Sku().withName("hvcrjqzbmyftzbx") - .withTier(SkuTier.FREE) - .withSize("rbullqnfz") - .withFamily("gursbzm") - .withCapacity(720175035)) - .create(); - - Assertions.assertEquals("exrzxvff", response.location()); - Assertions.assertEquals("tdmhr", response.tags().get("t")); - Assertions.assertEquals("fokcbxrskylqppp", response.properties().modelSettings().modelId()); - Assertions.assertEquals(ServerlessInferenceEndpointAuthMode.KEY, response.properties().authMode()); - Assertions.assertEquals(ContentSafetyStatus.ENABLED, - response.properties().contentSafety().contentSafetyStatus()); - Assertions.assertEquals("jqcshbypw", response.kind()); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("vpvta", response.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, response.sku().tier()); - Assertions.assertEquals("znfxdqqzikvgwqi", response.sku().size()); - Assertions.assertEquals("dhas", response.sku().family()); - Assertions.assertEquals(561322142, response.sku().capacity()); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsGetWithResponseMockTests.java deleted file mode 100644 index 925c9380d20bb..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ContentSafetyStatus; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.ServerlessEndpoint; -import com.azure.resourcemanager.machinelearning.models.ServerlessInferenceEndpointAuthMode; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ServerlessEndpointsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"modelSettings\":{\"modelId\":\"brvrhwq\"},\"authMode\":\"Key\",\"inferenceEndpoint\":{\"uri\":\"fvgbkle\",\"headers\":{\"kmtljzilkyvyblj\":\"bwhesbeb\"}},\"provisioningState\":\"Updating\",\"endpointState\":\"Unknown\",\"marketplaceSubscriptionId\":\"tzqrm\",\"contentSafety\":{\"contentSafetyStatus\":\"Enabled\"}},\"kind\":\"urkggqxqanrkh\",\"identity\":{\"principalId\":\"b488f679-4345-4c70-99bd-42bc94ad7d9b\",\"tenantId\":\"2783b33a-e7ee-4719-8d89-03bed3065258\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"cnadwrbrnt\":{\"principalId\":\"44857e84-ebd2-458e-abcc-114227837c0f\",\"clientId\":\"b08901c0-8b84-4ac2-9d28-de7bad889a23\"},\"pykrlzualsvxpol\":{\"principalId\":\"068211d5-d4d5-4c2e-abd2-175fb0f0f8d4\",\"clientId\":\"92b62b95-7e41-4f79-a8e9-79b3c6c2083a\"},\"rjmsabnmu\":{\"principalId\":\"8beb7e8f-e328-41dd-806f-e27c85a05d4a\",\"clientId\":\"55cc2c73-5cf7-43b3-ae31-45d8a531d743\"},\"hyxryvwnzhsigddg\":{\"principalId\":\"3b0ddca6-7e9c-4f83-8f7a-c7547ffc6bc8\",\"clientId\":\"58291a9e-fcf7-4633-93e8-bb3271824c25\"}}},\"sku\":{\"name\":\"nqvbnybffcvtij\",\"tier\":\"Standard\",\"size\":\"zrwpgvgogczg\",\"family\":\"o\",\"capacity\":1118835977},\"location\":\"ddgyqen\",\"tags\":{\"amlrtcbvif\":\"z\",\"xstowvgwvfv\":\"r\"},\"id\":\"qlyahlao\",\"name\":\"kcitnbuzvaxltr\",\"type\":\"nwhictsauv\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - MachineLearningManager manager = MachineLearningManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ServerlessEndpoint response = manager.serverlessEndpoints() - .getWithResponse("ysrreebj", "slbxfkiiarlldygf", "dtykhsafrfv", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ddgyqen", response.location()); - Assertions.assertEquals("z", response.tags().get("amlrtcbvif")); - Assertions.assertEquals("brvrhwq", response.properties().modelSettings().modelId()); - Assertions.assertEquals(ServerlessInferenceEndpointAuthMode.KEY, response.properties().authMode()); - Assertions.assertEquals(ContentSafetyStatus.ENABLED, - response.properties().contentSafety().contentSafetyStatus()); - Assertions.assertEquals("urkggqxqanrkh", response.kind()); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("nqvbnybffcvtij", response.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, response.sku().tier()); - Assertions.assertEquals("zrwpgvgogczg", response.sku().size()); - Assertions.assertEquals("o", response.sku().family()); - Assertions.assertEquals(1118835977, response.sku().capacity()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsListMockTests.java deleted file mode 100644 index 98c3a814def5d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessEndpointsListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ContentSafetyStatus; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.ServerlessEndpoint; -import com.azure.resourcemanager.machinelearning.models.ServerlessInferenceEndpointAuthMode; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ServerlessEndpointsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"modelSettings\":{\"modelId\":\"natl\"},\"authMode\":\"Key\",\"inferenceEndpoint\":{\"uri\":\"kqzfwl\",\"headers\":{\"yyu\":\"nmgsbubzf\"}},\"provisioningState\":\"Updating\",\"endpointState\":\"Unknown\",\"marketplaceSubscriptionId\":\"rederzsnfgmohhcg\",\"contentSafety\":{\"contentSafetyStatus\":\"Disabled\"}},\"kind\":\"vvfpkymq\",\"identity\":{\"principalId\":\"41536c01-2dc8-4767-b6c8-7798b01bd9f5\",\"tenantId\":\"7da471c5-d09c-4d7d-893e-104b6de6f901\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"lboawzplwghfg\":{\"principalId\":\"ea0ea3d7-586d-4a52-9903-a19b81c3099e\",\"clientId\":\"15820477-10ab-4c98-919d-a6a1dece5bb1\"},\"rmtuprqt\":{\"principalId\":\"be36aaa0-8d81-4f60-957a-e1c7a64f7bac\",\"clientId\":\"74576f39-b12a-4b7b-afcb-2a799b711002\"},\"kohupyajkdejp\":{\"principalId\":\"f45a5de5-9558-4e2a-82a5-605e036f07e2\",\"clientId\":\"cfef6c00-90d0-41f3-ba78-acb521fbfd79\"}}},\"sku\":{\"name\":\"jvsbozfjbdyyxhj\",\"tier\":\"Free\",\"size\":\"wmrdlnbklhwrikr\",\"family\":\"j\",\"capacity\":587687819},\"location\":\"ff\",\"tags\":{\"umvbhbli\":\"yoiaobbzcdlcc\",\"x\":\"bxolzin\"},\"id\":\"fixrukwxcaagzlqo\",\"name\":\"gzgsgzlbunmjha\",\"type\":\"fiyrywf\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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.serverlessEndpoints().list("fpkdsldyw", "wvswlhjlbkq", "gs", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ff", response.iterator().next().location()); - Assertions.assertEquals("yoiaobbzcdlcc", response.iterator().next().tags().get("umvbhbli")); - Assertions.assertEquals("natl", response.iterator().next().properties().modelSettings().modelId()); - Assertions.assertEquals(ServerlessInferenceEndpointAuthMode.KEY, - response.iterator().next().properties().authMode()); - Assertions.assertEquals(ContentSafetyStatus.DISABLED, - response.iterator().next().properties().contentSafety().contentSafetyStatus()); - Assertions.assertEquals("vvfpkymq", response.iterator().next().kind()); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, - response.iterator().next().identity().type()); - Assertions.assertEquals("jvsbozfjbdyyxhj", response.iterator().next().sku().name()); - Assertions.assertEquals(SkuTier.FREE, response.iterator().next().sku().tier()); - Assertions.assertEquals("wmrdlnbklhwrikr", response.iterator().next().sku().size()); - Assertions.assertEquals("j", response.iterator().next().sku().family()); - Assertions.assertEquals(587687819, response.iterator().next().sku().capacity()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessInferenceEndpointTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessInferenceEndpointTests.java deleted file mode 100644 index e38a601751175..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServerlessInferenceEndpointTests.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.ServerlessInferenceEndpoint; -import org.junit.jupiter.api.Assertions; - -public final class ServerlessInferenceEndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServerlessInferenceEndpoint model - = BinaryData.fromString("{\"uri\":\"tjctibpvbkaeh\",\"headers\":{\"wseivmakxh\":\"zygdfwa\"}}") - .toObject(ServerlessInferenceEndpoint.class); - Assertions.assertEquals("tjctibpvbkaeh", model.uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServerlessInferenceEndpoint model = new ServerlessInferenceEndpoint().withUri("tjctibpvbkaeh"); - model = BinaryData.fromObject(model).toObject(ServerlessInferenceEndpoint.class); - Assertions.assertEquals("tjctibpvbkaeh", model.uri()); - } -} 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 d8c9f4d142b4b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServiceManagedResourcesSettingsTests.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.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\":531743918}}") - .toObject(ServiceManagedResourcesSettings.class); - Assertions.assertEquals(531743918, model.cosmosDb().collectionsThroughput()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceManagedResourcesSettings model = new ServiceManagedResourcesSettings() - .withCosmosDb(new CosmosDbSettings().withCollectionsThroughput(531743918)); - model = BinaryData.fromObject(model).toObject(ServiceManagedResourcesSettings.class); - Assertions.assertEquals(531743918, model.cosmosDb().collectionsThroughput()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServiceTagDestinationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServiceTagDestinationTests.java deleted file mode 100644 index 6a7354ae23c0c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServiceTagDestinationTests.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.RuleAction; -import com.azure.resourcemanager.machinelearning.models.ServiceTagDestination; -import org.junit.jupiter.api.Assertions; - -public final class ServiceTagDestinationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceTagDestination model = BinaryData.fromString( - "{\"action\":\"Deny\",\"addressPrefixes\":[\"cm\",\"oxfab\",\"qgpwbmwhr\",\"ali\"],\"portRanges\":\"ycgnwplrrbphc\",\"protocol\":\"bb\",\"serviceTag\":\"ticuhqvumsp\"}") - .toObject(ServiceTagDestination.class); - Assertions.assertEquals(RuleAction.DENY, model.action()); - Assertions.assertEquals("ycgnwplrrbphc", model.portRanges()); - Assertions.assertEquals("bb", model.protocol()); - Assertions.assertEquals("ticuhqvumsp", model.serviceTag()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceTagDestination model = new ServiceTagDestination().withAction(RuleAction.DENY) - .withPortRanges("ycgnwplrrbphc") - .withProtocol("bb") - .withServiceTag("ticuhqvumsp"); - model = BinaryData.fromObject(model).toObject(ServiceTagDestination.class); - Assertions.assertEquals(RuleAction.DENY, model.action()); - Assertions.assertEquals("ycgnwplrrbphc", model.portRanges()); - Assertions.assertEquals("bb", model.protocol()); - Assertions.assertEquals("ticuhqvumsp", model.serviceTag()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServiceTagOutboundRuleTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServiceTagOutboundRuleTests.java deleted file mode 100644 index 551a1e363041c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServiceTagOutboundRuleTests.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.models.RuleAction; -import com.azure.resourcemanager.machinelearning.models.RuleCategory; -import com.azure.resourcemanager.machinelearning.models.RuleStatus; -import com.azure.resourcemanager.machinelearning.models.ServiceTagDestination; -import com.azure.resourcemanager.machinelearning.models.ServiceTagOutboundRule; -import org.junit.jupiter.api.Assertions; - -public final class ServiceTagOutboundRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceTagOutboundRule model = BinaryData.fromString( - "{\"type\":\"ServiceTag\",\"destination\":{\"action\":\"Allow\",\"addressPrefixes\":[\"ijzzcaoijolbuauk\",\"wieopexelxqdw\"],\"portRanges\":\"wyil\",\"protocol\":\"ibkgxyxyau\",\"serviceTag\":\"eddobmcnltm\"},\"category\":\"UserDefined\",\"status\":\"Inactive\"}") - .toObject(ServiceTagOutboundRule.class); - Assertions.assertEquals(RuleCategory.USER_DEFINED, model.category()); - Assertions.assertEquals(RuleStatus.INACTIVE, model.status()); - Assertions.assertEquals(RuleAction.ALLOW, model.destination().action()); - Assertions.assertEquals("wyil", model.destination().portRanges()); - Assertions.assertEquals("ibkgxyxyau", model.destination().protocol()); - Assertions.assertEquals("eddobmcnltm", model.destination().serviceTag()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceTagOutboundRule model = new ServiceTagOutboundRule().withCategory(RuleCategory.USER_DEFINED) - .withStatus(RuleStatus.INACTIVE) - .withDestination(new ServiceTagDestination().withAction(RuleAction.ALLOW) - .withPortRanges("wyil") - .withProtocol("ibkgxyxyau") - .withServiceTag("eddobmcnltm")); - model = BinaryData.fromObject(model).toObject(ServiceTagOutboundRule.class); - Assertions.assertEquals(RuleCategory.USER_DEFINED, model.category()); - Assertions.assertEquals(RuleStatus.INACTIVE, model.status()); - Assertions.assertEquals(RuleAction.ALLOW, model.destination().action()); - Assertions.assertEquals("wyil", model.destination().portRanges()); - Assertions.assertEquals("ibkgxyxyau", model.destination().protocol()); - Assertions.assertEquals("eddobmcnltm", model.destination().serviceTag()); - } -} 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 66d203fa9cf23..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SetupScriptsTests.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.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\":\"awmpjprd\",\"scriptData\":\"rpcfpcfjfwzl\",\"scriptArguments\":\"awkgy\",\"timeout\":\"eyam\"},\"creationScript\":{\"scriptSource\":\"dmdiawpzxkzrntm\",\"scriptData\":\"tdhuo\",\"scriptArguments\":\"wqpsqaz\",\"timeout\":\"qodvqgcnbhcbmj\"}}}") - .toObject(SetupScripts.class); - Assertions.assertEquals("awmpjprd", model.scripts().startupScript().scriptSource()); - Assertions.assertEquals("rpcfpcfjfwzl", model.scripts().startupScript().scriptData()); - Assertions.assertEquals("awkgy", model.scripts().startupScript().scriptArguments()); - Assertions.assertEquals("eyam", model.scripts().startupScript().timeout()); - Assertions.assertEquals("dmdiawpzxkzrntm", model.scripts().creationScript().scriptSource()); - Assertions.assertEquals("tdhuo", model.scripts().creationScript().scriptData()); - Assertions.assertEquals("wqpsqaz", model.scripts().creationScript().scriptArguments()); - Assertions.assertEquals("qodvqgcnbhcbmj", 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("awmpjprd") - .withScriptData("rpcfpcfjfwzl") - .withScriptArguments("awkgy") - .withTimeout("eyam")) - .withCreationScript(new ScriptReference().withScriptSource("dmdiawpzxkzrntm") - .withScriptData("tdhuo") - .withScriptArguments("wqpsqaz") - .withTimeout("qodvqgcnbhcbmj"))); - model = BinaryData.fromObject(model).toObject(SetupScripts.class); - Assertions.assertEquals("awmpjprd", model.scripts().startupScript().scriptSource()); - Assertions.assertEquals("rpcfpcfjfwzl", model.scripts().startupScript().scriptData()); - Assertions.assertEquals("awkgy", model.scripts().startupScript().scriptArguments()); - Assertions.assertEquals("eyam", model.scripts().startupScript().timeout()); - Assertions.assertEquals("dmdiawpzxkzrntm", model.scripts().creationScript().scriptSource()); - Assertions.assertEquals("tdhuo", model.scripts().creationScript().scriptData()); - Assertions.assertEquals("wqpsqaz", model.scripts().creationScript().scriptArguments()); - Assertions.assertEquals("qodvqgcnbhcbmj", 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 78eb7cfd165ba..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SharedPrivateLinkResourcePropertyTests.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.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\":\"tqxhocdgeab\",\"groupId\":\"phut\",\"requestMessage\":\"ndv\",\"status\":\"Rejected\"}") - .toObject(SharedPrivateLinkResourceProperty.class); - Assertions.assertEquals("tqxhocdgeab", model.privateLinkResourceId()); - Assertions.assertEquals("phut", model.groupId()); - Assertions.assertEquals("ndv", model.requestMessage()); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SharedPrivateLinkResourceProperty model - = new SharedPrivateLinkResourceProperty().withPrivateLinkResourceId("tqxhocdgeab") - .withGroupId("phut") - .withRequestMessage("ndv") - .withStatus(PrivateEndpointServiceConnectionStatus.REJECTED); - model = BinaryData.fromObject(model).toObject(SharedPrivateLinkResourceProperty.class); - Assertions.assertEquals("tqxhocdgeab", model.privateLinkResourceId()); - Assertions.assertEquals("phut", model.groupId()); - Assertions.assertEquals("ndv", model.requestMessage()); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, 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 08e67b66961ba..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SharedPrivateLinkResourceTests.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.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\":\"itcjczdz\",\"properties\":{\"privateLinkResourceId\":\"dhkrwpdappdsbdk\",\"groupId\":\"rwjfe\",\"requestMessage\":\"nhutjeltmrldhugj\",\"status\":\"Approved\"}}") - .toObject(SharedPrivateLinkResource.class); - Assertions.assertEquals("itcjczdz", model.name()); - Assertions.assertEquals("dhkrwpdappdsbdk", model.privateLinkResourceId()); - Assertions.assertEquals("rwjfe", model.groupId()); - Assertions.assertEquals("nhutjeltmrldhugj", model.requestMessage()); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SharedPrivateLinkResource model = new SharedPrivateLinkResource().withName("itcjczdz") - .withPrivateLinkResourceId("dhkrwpdappdsbdk") - .withGroupId("rwjfe") - .withRequestMessage("nhutjeltmrldhugj") - .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED); - model = BinaryData.fromObject(model).toObject(SharedPrivateLinkResource.class); - Assertions.assertEquals("itcjczdz", model.name()); - Assertions.assertEquals("dhkrwpdappdsbdk", model.privateLinkResourceId()); - Assertions.assertEquals("rwjfe", model.groupId()); - Assertions.assertEquals("nhutjeltmrldhugj", model.requestMessage()); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, 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 9eea4170cc874..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuCapacityTests.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.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("{\"minimum\":114097957,\"maximum\":1718972803,\"default\":133055758,\"scaleType\":\"Manual\"}") - .toObject(SkuCapacity.class); - Assertions.assertEquals(114097957, model.minimum()); - Assertions.assertEquals(1718972803, model.maximum()); - Assertions.assertEquals(133055758, model.defaultProperty()); - Assertions.assertEquals(SkuScaleType.MANUAL, model.scaleType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuCapacity model = new SkuCapacity().withMinimum(114097957) - .withMaximum(1718972803) - .withDefaultProperty(133055758) - .withScaleType(SkuScaleType.MANUAL); - model = BinaryData.fromObject(model).toObject(SkuCapacity.class); - Assertions.assertEquals(114097957, model.minimum()); - Assertions.assertEquals(1718972803, model.maximum()); - Assertions.assertEquals(133055758, model.defaultProperty()); - Assertions.assertEquals(SkuScaleType.MANUAL, 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 9cf2dc95ea0c2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuResourceArmPaginatedResultTests.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.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( - "{\"value\":[{\"resourceType\":\"rra\",\"sku\":{\"name\":\"ekcsueh\",\"tier\":\"Premium\"},\"capacity\":{\"minimum\":942478708,\"maximum\":2130219210,\"default\":414889103,\"scaleType\":\"Automatic\"}}],\"nextLink\":\"qidywmh\"}") - .toObject(SkuResourceArmPaginatedResult.class); - Assertions.assertEquals("ekcsueh", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, model.value().get(0).sku().tier()); - Assertions.assertEquals(942478708, model.value().get(0).capacity().minimum()); - Assertions.assertEquals(2130219210, model.value().get(0).capacity().maximum()); - Assertions.assertEquals(414889103, model.value().get(0).capacity().defaultProperty()); - Assertions.assertEquals(SkuScaleType.AUTOMATIC, model.value().get(0).capacity().scaleType()); - Assertions.assertEquals("qidywmh", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuResourceArmPaginatedResult model = new SkuResourceArmPaginatedResult().withValue( - Arrays.asList(new SkuResourceInner().withSku(new SkuSetting().withName("ekcsueh").withTier(SkuTier.PREMIUM)) - .withCapacity(new SkuCapacity().withMinimum(942478708) - .withMaximum(2130219210) - .withDefaultProperty(414889103) - .withScaleType(SkuScaleType.AUTOMATIC)))) - .withNextLink("qidywmh"); - model = BinaryData.fromObject(model).toObject(SkuResourceArmPaginatedResult.class); - Assertions.assertEquals("ekcsueh", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, model.value().get(0).sku().tier()); - Assertions.assertEquals(942478708, model.value().get(0).capacity().minimum()); - Assertions.assertEquals(2130219210, model.value().get(0).capacity().maximum()); - Assertions.assertEquals(414889103, model.value().get(0).capacity().defaultProperty()); - Assertions.assertEquals(SkuScaleType.AUTOMATIC, model.value().get(0).capacity().scaleType()); - Assertions.assertEquals("qidywmh", model.nextLink()); - } -} 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 50b0ce32f4e28..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuResourceInnerTests.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.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( - "{\"resourceType\":\"tyrilkfbnrqqxvz\",\"sku\":{\"name\":\"bnfnqtxjtoma\",\"tier\":\"Standard\"},\"capacity\":{\"minimum\":1063969738,\"maximum\":1165250795,\"default\":574415772,\"scaleType\":\"Manual\"}}") - .toObject(SkuResourceInner.class); - Assertions.assertEquals("bnfnqtxjtoma", model.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); - Assertions.assertEquals(1063969738, model.capacity().minimum()); - Assertions.assertEquals(1165250795, model.capacity().maximum()); - Assertions.assertEquals(574415772, model.capacity().defaultProperty()); - Assertions.assertEquals(SkuScaleType.MANUAL, model.capacity().scaleType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuResourceInner model - = new SkuResourceInner().withSku(new SkuSetting().withName("bnfnqtxjtoma").withTier(SkuTier.STANDARD)) - .withCapacity(new SkuCapacity().withMinimum(1063969738) - .withMaximum(1165250795) - .withDefaultProperty(574415772) - .withScaleType(SkuScaleType.MANUAL)); - model = BinaryData.fromObject(model).toObject(SkuResourceInner.class); - Assertions.assertEquals("bnfnqtxjtoma", model.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); - Assertions.assertEquals(1063969738, model.capacity().minimum()); - Assertions.assertEquals(1165250795, model.capacity().maximum()); - Assertions.assertEquals(574415772, model.capacity().defaultProperty()); - Assertions.assertEquals(SkuScaleType.MANUAL, model.capacity().scaleType()); - } -} 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 01edc09634c25..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\":\"wqjnsfzygleexa\",\"tier\":\"Basic\"}").toObject(SkuSetting.class); - Assertions.assertEquals("wqjnsfzygleexa", model.name()); - Assertions.assertEquals(SkuTier.BASIC, model.tier()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuSetting model = new SkuSetting().withName("wqjnsfzygleexa").withTier(SkuTier.BASIC); - model = BinaryData.fromObject(model).toObject(SkuSetting.class); - Assertions.assertEquals("wqjnsfzygleexa", model.name()); - Assertions.assertEquals(SkuTier.BASIC, 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 e98948b22eb88..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuTests.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.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\":\"bnjbiksqrglssain\",\"tier\":\"Standard\",\"size\":\"nzl\",\"family\":\"fmppe\",\"capacity\":1862600222}") - .toObject(Sku.class); - Assertions.assertEquals("bnjbiksqrglssain", model.name()); - Assertions.assertEquals(SkuTier.STANDARD, model.tier()); - Assertions.assertEquals("nzl", model.size()); - Assertions.assertEquals("fmppe", model.family()); - Assertions.assertEquals(1862600222, model.capacity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Sku model = new Sku().withName("bnjbiksqrglssain") - .withTier(SkuTier.STANDARD) - .withSize("nzl") - .withFamily("fmppe") - .withCapacity(1862600222); - model = BinaryData.fromObject(model).toObject(Sku.class); - Assertions.assertEquals("bnjbiksqrglssain", model.name()); - Assertions.assertEquals(SkuTier.STANDARD, model.tier()); - Assertions.assertEquals("nzl", model.size()); - Assertions.assertEquals("fmppe", model.family()); - Assertions.assertEquals(1862600222, model.capacity()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkJobEntryTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkJobEntryTests.java deleted file mode 100644 index 4a6f9c32b63d2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkJobEntryTests.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.SparkJobEntry; - -public final class SparkJobEntryTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SparkJobEntry model - = BinaryData.fromString("{\"sparkJobEntryType\":\"SparkJobEntry\"}").toObject(SparkJobEntry.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SparkJobEntry model = new SparkJobEntry(); - model = BinaryData.fromObject(model).toObject(SparkJobEntry.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkJobPythonEntryTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkJobPythonEntryTests.java deleted file mode 100644 index 11fff316f12ec..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkJobPythonEntryTests.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.SparkJobPythonEntry; -import org.junit.jupiter.api.Assertions; - -public final class SparkJobPythonEntryTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SparkJobPythonEntry model - = BinaryData.fromString("{\"sparkJobEntryType\":\"SparkJobPythonEntry\",\"file\":\"qt\"}") - .toObject(SparkJobPythonEntry.class); - Assertions.assertEquals("qt", model.file()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SparkJobPythonEntry model = new SparkJobPythonEntry().withFile("qt"); - model = BinaryData.fromObject(model).toObject(SparkJobPythonEntry.class); - Assertions.assertEquals("qt", model.file()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkJobScalaEntryTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkJobScalaEntryTests.java deleted file mode 100644 index 242c47ddafaca..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkJobScalaEntryTests.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.SparkJobScalaEntry; -import org.junit.jupiter.api.Assertions; - -public final class SparkJobScalaEntryTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SparkJobScalaEntry model - = BinaryData.fromString("{\"sparkJobEntryType\":\"SparkJobScalaEntry\",\"className\":\"fkvuozb\"}") - .toObject(SparkJobScalaEntry.class); - Assertions.assertEquals("fkvuozb", model.className()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SparkJobScalaEntry model = new SparkJobScalaEntry().withClassName("fkvuozb"); - model = BinaryData.fromObject(model).toObject(SparkJobScalaEntry.class); - Assertions.assertEquals("fkvuozb", model.className()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkResourceConfigurationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkResourceConfigurationTests.java deleted file mode 100644 index 7f9ce92ed4542..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SparkResourceConfigurationTests.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.SparkResourceConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class SparkResourceConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SparkResourceConfiguration model - = BinaryData.fromString("{\"instanceType\":\"tnhrevimxmaxcj\",\"runtimeVersion\":\"itygvdwds\"}") - .toObject(SparkResourceConfiguration.class); - Assertions.assertEquals("tnhrevimxmaxcj", model.instanceType()); - Assertions.assertEquals("itygvdwds", model.runtimeVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SparkResourceConfiguration model - = new SparkResourceConfiguration().withInstanceType("tnhrevimxmaxcj").withRuntimeVersion("itygvdwds"); - model = BinaryData.fromObject(model).toObject(SparkResourceConfiguration.class); - Assertions.assertEquals("tnhrevimxmaxcj", model.instanceType()); - Assertions.assertEquals("itygvdwds", model.runtimeVersion()); - } -} 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 7feeef04c75c1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StackEnsembleSettingsTests.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.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( - "{\"stackMetaLearnerType\":\"LinearRegression\",\"stackMetaLearnerTrainPercentage\":69.9155023159612,\"stackMetaLearnerKWargs\":\"dataygta\"}") - .toObject(StackEnsembleSettings.class); - Assertions.assertEquals(StackMetaLearnerType.LINEAR_REGRESSION, model.stackMetaLearnerType()); - Assertions.assertEquals(69.9155023159612D, model.stackMetaLearnerTrainPercentage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StackEnsembleSettings model - = new StackEnsembleSettings().withStackMetaLearnerType(StackMetaLearnerType.LINEAR_REGRESSION) - .withStackMetaLearnerTrainPercentage(69.9155023159612D) - .withStackMetaLearnerKWargs("dataygta"); - model = BinaryData.fromObject(model).toObject(StackEnsembleSettings.class); - Assertions.assertEquals(StackMetaLearnerType.LINEAR_REGRESSION, model.stackMetaLearnerType()); - Assertions.assertEquals(69.9155023159612D, model.stackMetaLearnerTrainPercentage()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StaticInputDataTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StaticInputDataTests.java deleted file mode 100644 index ea05f46805b77..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StaticInputDataTests.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.JobInputType; -import com.azure.resourcemanager.machinelearning.models.StaticInputData; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class StaticInputDataTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StaticInputData model = BinaryData.fromString( - "{\"inputDataType\":\"Static\",\"windowStart\":\"2021-07-21T17:55:57Z\",\"windowEnd\":\"2021-02-10T17:01:52Z\",\"preprocessingComponentId\":\"qekwanklpurl\",\"dataContext\":\"djh\",\"jobInputType\":\"mlflow_model\",\"uri\":\"jse\",\"columns\":{\"urdon\":\"yn\",\"swknpdrgn\":\"gobxblrdolen\",\"fqckie\":\"zaofro\",\"jyoybkqftusdw\":\"yr\"}}") - .toObject(StaticInputData.class); - Assertions.assertEquals("djh", model.dataContext()); - Assertions.assertEquals(JobInputType.MLFLOW_MODEL, model.jobInputType()); - Assertions.assertEquals("jse", model.uri()); - Assertions.assertEquals("yn", model.columns().get("urdon")); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-21T17:55:57Z"), model.windowStart()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-10T17:01:52Z"), model.windowEnd()); - Assertions.assertEquals("qekwanklpurl", model.preprocessingComponentId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StaticInputData model = new StaticInputData().withDataContext("djh") - .withJobInputType(JobInputType.MLFLOW_MODEL) - .withUri("jse") - .withColumns(mapOf("urdon", "yn", "swknpdrgn", "gobxblrdolen", "fqckie", "zaofro", "jyoybkqftusdw", "yr")) - .withWindowStart(OffsetDateTime.parse("2021-07-21T17:55:57Z")) - .withWindowEnd(OffsetDateTime.parse("2021-02-10T17:01:52Z")) - .withPreprocessingComponentId("qekwanklpurl"); - model = BinaryData.fromObject(model).toObject(StaticInputData.class); - Assertions.assertEquals("djh", model.dataContext()); - Assertions.assertEquals(JobInputType.MLFLOW_MODEL, model.jobInputType()); - Assertions.assertEquals("jse", model.uri()); - Assertions.assertEquals("yn", model.columns().get("urdon")); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-21T17:55:57Z"), model.windowStart()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-10T17:01:52Z"), model.windowEnd()); - Assertions.assertEquals("qekwanklpurl", model.preprocessingComponentId()); - } - - // 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/test/java/com/azure/resourcemanager/machinelearning/generated/StorageAccountDetailsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StorageAccountDetailsTests.java deleted file mode 100644 index b65a9f0c8efd7..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StorageAccountDetailsTests.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.ArmResourceId; -import com.azure.resourcemanager.machinelearning.models.StorageAccountDetails; -import com.azure.resourcemanager.machinelearning.models.SystemCreatedStorageAccount; -import com.azure.resourcemanager.machinelearning.models.UserCreatedStorageAccount; -import org.junit.jupiter.api.Assertions; - -public final class StorageAccountDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StorageAccountDetails model = BinaryData.fromString( - "{\"systemCreatedStorageAccount\":{\"allowBlobPublicAccess\":false,\"armResourceId\":{\"resourceId\":\"ibz\"},\"storageAccountHnsEnabled\":false,\"storageAccountName\":\"ee\",\"storageAccountType\":\"ph\"},\"userCreatedStorageAccount\":{\"armResourceId\":{\"resourceId\":\"jw\"}}}") - .toObject(StorageAccountDetails.class); - Assertions.assertEquals(false, model.systemCreatedStorageAccount().allowBlobPublicAccess()); - Assertions.assertEquals("ibz", model.systemCreatedStorageAccount().armResourceId().resourceId()); - Assertions.assertEquals(false, model.systemCreatedStorageAccount().storageAccountHnsEnabled()); - Assertions.assertEquals("ee", model.systemCreatedStorageAccount().storageAccountName()); - Assertions.assertEquals("ph", model.systemCreatedStorageAccount().storageAccountType()); - Assertions.assertEquals("jw", model.userCreatedStorageAccount().armResourceId().resourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StorageAccountDetails model = new StorageAccountDetails() - .withSystemCreatedStorageAccount(new SystemCreatedStorageAccount().withAllowBlobPublicAccess(false) - .withArmResourceId(new ArmResourceId().withResourceId("ibz")) - .withStorageAccountHnsEnabled(false) - .withStorageAccountName("ee") - .withStorageAccountType("ph")) - .withUserCreatedStorageAccount( - new UserCreatedStorageAccount().withArmResourceId(new ArmResourceId().withResourceId("jw"))); - model = BinaryData.fromObject(model).toObject(StorageAccountDetails.class); - Assertions.assertEquals(false, model.systemCreatedStorageAccount().allowBlobPublicAccess()); - Assertions.assertEquals("ibz", model.systemCreatedStorageAccount().armResourceId().resourceId()); - Assertions.assertEquals(false, model.systemCreatedStorageAccount().storageAccountHnsEnabled()); - Assertions.assertEquals("ee", model.systemCreatedStorageAccount().storageAccountName()); - Assertions.assertEquals("ph", model.systemCreatedStorageAccount().storageAccountType()); - Assertions.assertEquals("jw", model.userCreatedStorageAccount().armResourceId().resourceId()); - } -} 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 98fc1f7a1a402..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SweepJobLimitsTests.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.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\",\"maxTotalTrials\":1216231012,\"maxConcurrentTrials\":734824046,\"trialTimeout\":\"PT31H24M17S\",\"timeout\":\"PT39H5M12S\"}") - .toObject(SweepJobLimits.class); - Assertions.assertEquals(Duration.parse("PT39H5M12S"), model.timeout()); - Assertions.assertEquals(1216231012, model.maxTotalTrials()); - Assertions.assertEquals(734824046, model.maxConcurrentTrials()); - Assertions.assertEquals(Duration.parse("PT31H24M17S"), model.trialTimeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SweepJobLimits model = new SweepJobLimits().withTimeout(Duration.parse("PT39H5M12S")) - .withMaxTotalTrials(1216231012) - .withMaxConcurrentTrials(734824046) - .withTrialTimeout(Duration.parse("PT31H24M17S")); - model = BinaryData.fromObject(model).toObject(SweepJobLimits.class); - Assertions.assertEquals(Duration.parse("PT39H5M12S"), model.timeout()); - Assertions.assertEquals(1216231012, model.maxTotalTrials()); - Assertions.assertEquals(734824046, model.maxConcurrentTrials()); - Assertions.assertEquals(Duration.parse("PT31H24M17S"), 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 4df91076ea922..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SynapseSparkPropertiesTests.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.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\":217576922,\"enabled\":true,\"maxNodeCount\":1065975774},\"autoPauseProperties\":{\"delayInMinutes\":1088502083,\"enabled\":false},\"sparkVersion\":\"rncmazdfsqxh\",\"nodeCount\":982275641,\"nodeSize\":\"ejparn\",\"nodeSizeFamily\":\"grszrbwtdrcwg\",\"subscriptionId\":\"ll\",\"resourceGroup\":\"lhhfi\",\"workspaceName\":\"cfculzj\",\"poolName\":\"hp\"}") - .toObject(SynapseSparkProperties.class); - Assertions.assertEquals(217576922, model.autoScaleProperties().minNodeCount()); - Assertions.assertEquals(true, model.autoScaleProperties().enabled()); - Assertions.assertEquals(1065975774, model.autoScaleProperties().maxNodeCount()); - Assertions.assertEquals(1088502083, model.autoPauseProperties().delayInMinutes()); - Assertions.assertEquals(false, model.autoPauseProperties().enabled()); - Assertions.assertEquals("rncmazdfsqxh", model.sparkVersion()); - Assertions.assertEquals(982275641, model.nodeCount()); - Assertions.assertEquals("ejparn", model.nodeSize()); - Assertions.assertEquals("grszrbwtdrcwg", model.nodeSizeFamily()); - Assertions.assertEquals("ll", model.subscriptionId()); - Assertions.assertEquals("lhhfi", model.resourceGroup()); - Assertions.assertEquals("cfculzj", model.workspaceName()); - Assertions.assertEquals("hp", model.poolName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SynapseSparkProperties model = new SynapseSparkProperties() - .withAutoScaleProperties( - new AutoScaleProperties().withMinNodeCount(217576922).withEnabled(true).withMaxNodeCount(1065975774)) - .withAutoPauseProperties(new AutoPauseProperties().withDelayInMinutes(1088502083).withEnabled(false)) - .withSparkVersion("rncmazdfsqxh") - .withNodeCount(982275641) - .withNodeSize("ejparn") - .withNodeSizeFamily("grszrbwtdrcwg") - .withSubscriptionId("ll") - .withResourceGroup("lhhfi") - .withWorkspaceName("cfculzj") - .withPoolName("hp"); - model = BinaryData.fromObject(model).toObject(SynapseSparkProperties.class); - Assertions.assertEquals(217576922, model.autoScaleProperties().minNodeCount()); - Assertions.assertEquals(true, model.autoScaleProperties().enabled()); - Assertions.assertEquals(1065975774, model.autoScaleProperties().maxNodeCount()); - Assertions.assertEquals(1088502083, model.autoPauseProperties().delayInMinutes()); - Assertions.assertEquals(false, model.autoPauseProperties().enabled()); - Assertions.assertEquals("rncmazdfsqxh", model.sparkVersion()); - Assertions.assertEquals(982275641, model.nodeCount()); - Assertions.assertEquals("ejparn", model.nodeSize()); - Assertions.assertEquals("grszrbwtdrcwg", model.nodeSizeFamily()); - Assertions.assertEquals("ll", model.subscriptionId()); - Assertions.assertEquals("lhhfi", model.resourceGroup()); - Assertions.assertEquals("cfculzj", model.workspaceName()); - Assertions.assertEquals("hp", model.poolName()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SystemCreatedAcrAccountTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SystemCreatedAcrAccountTests.java deleted file mode 100644 index a844ebf3f2565..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SystemCreatedAcrAccountTests.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.ArmResourceId; -import com.azure.resourcemanager.machinelearning.models.SystemCreatedAcrAccount; -import org.junit.jupiter.api.Assertions; - -public final class SystemCreatedAcrAccountTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SystemCreatedAcrAccount model = BinaryData.fromString( - "{\"acrAccountName\":\"cwmbupyvqyvli\",\"acrAccountSku\":\"ipsejbsvsia\",\"armResourceId\":{\"resourceId\":\"whddzydisnuepyw\"}}") - .toObject(SystemCreatedAcrAccount.class); - Assertions.assertEquals("cwmbupyvqyvli", model.acrAccountName()); - Assertions.assertEquals("ipsejbsvsia", model.acrAccountSku()); - Assertions.assertEquals("whddzydisnuepyw", model.armResourceId().resourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SystemCreatedAcrAccount model = new SystemCreatedAcrAccount().withAcrAccountName("cwmbupyvqyvli") - .withAcrAccountSku("ipsejbsvsia") - .withArmResourceId(new ArmResourceId().withResourceId("whddzydisnuepyw")); - model = BinaryData.fromObject(model).toObject(SystemCreatedAcrAccount.class); - Assertions.assertEquals("cwmbupyvqyvli", model.acrAccountName()); - Assertions.assertEquals("ipsejbsvsia", model.acrAccountSku()); - Assertions.assertEquals("whddzydisnuepyw", model.armResourceId().resourceId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SystemCreatedStorageAccountTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SystemCreatedStorageAccountTests.java deleted file mode 100644 index 7a41b4a1f727e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SystemCreatedStorageAccountTests.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.ArmResourceId; -import com.azure.resourcemanager.machinelearning.models.SystemCreatedStorageAccount; -import org.junit.jupiter.api.Assertions; - -public final class SystemCreatedStorageAccountTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SystemCreatedStorageAccount model = BinaryData.fromString( - "{\"allowBlobPublicAccess\":true,\"armResourceId\":{\"resourceId\":\"ratjhdhzybspij\"},\"storageAccountHnsEnabled\":true,\"storageAccountName\":\"gdkkagvwukh\",\"storageAccountType\":\"s\"}") - .toObject(SystemCreatedStorageAccount.class); - Assertions.assertEquals(true, model.allowBlobPublicAccess()); - Assertions.assertEquals("ratjhdhzybspij", model.armResourceId().resourceId()); - Assertions.assertEquals(true, model.storageAccountHnsEnabled()); - Assertions.assertEquals("gdkkagvwukh", model.storageAccountName()); - Assertions.assertEquals("s", model.storageAccountType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SystemCreatedStorageAccount model = new SystemCreatedStorageAccount().withAllowBlobPublicAccess(true) - .withArmResourceId(new ArmResourceId().withResourceId("ratjhdhzybspij")) - .withStorageAccountHnsEnabled(true) - .withStorageAccountName("gdkkagvwukh") - .withStorageAccountType("s"); - model = BinaryData.fromObject(model).toObject(SystemCreatedStorageAccount.class); - Assertions.assertEquals(true, model.allowBlobPublicAccess()); - Assertions.assertEquals("ratjhdhzybspij", model.armResourceId().resourceId()); - Assertions.assertEquals(true, model.storageAccountHnsEnabled()); - Assertions.assertEquals("gdkkagvwukh", model.storageAccountName()); - Assertions.assertEquals("s", model.storageAccountType()); - } -} 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 6783839932880..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SystemServiceTests.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.SystemService; - -public final class SystemServiceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SystemService model = BinaryData - .fromString( - "{\"systemServiceType\":\"lpzbtzuykykipf\",\"publicIpAddress\":\"yepfn\",\"version\":\"mbezacfpztg\"}") - .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 1cf5c12b64a4b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalFeaturizationSettingsTests.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.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( - "{\"mode\":\"Off\",\"blockedTransformers\":[\"LabelEncoder\"],\"columnNameAndTypes\":{\"klkqnqvkixnmb\":\"ujcyohigimwdc\",\"zayspzvriet\":\"mecuyrzwim\"},\"transformerParams\":{\"smcwoxfaxd\":[{\"fields\":[\"zxplgtpvdvatlz\",\"gschnzrsbk\"],\"parameters\":\"dataovlzdm\"},{\"fields\":[\"fwsx\",\"fo\",\"uworimmov\"],\"parameters\":\"datade\"},{\"fields\":[\"mvhzfovanyrvaprt\",\"elgwewi\"],\"parameters\":\"datayaqandmymnqoqju\"},{\"fields\":[\"sfbpbvzop\",\"x\"],\"parameters\":\"datam\"}],\"riwmmtmqrxrzqv\":[{\"fields\":[\"fbsatroi\"],\"parameters\":\"dataesugmocpcjycbo\"},{\"fields\":[\"gttwfldsi\",\"or\"],\"parameters\":\"dataikcedpk\"}],\"laetscflwtjdtlr\":[{\"fields\":[\"yayub\",\"g\",\"bxiqahragpxmibpl\"],\"parameters\":\"datapoyryefqmwovyzt\"},{\"fields\":[\"omfpb\",\"ceeg\",\"yieztkutnjil\",\"ukkrehyh\"],\"parameters\":\"datajoduifvulxfaryrv\"},{\"fields\":[\"dezvjqw\",\"hoyiyaxqvjweiw\",\"czkddn\"],\"parameters\":\"datavbooqbmdqrxy\"}]},\"enableDnnFeaturization\":false,\"datasetLanguage\":\"oyycuxdtz\"}") - .toObject(TableVerticalFeaturizationSettings.class); - Assertions.assertEquals("oyycuxdtz", model.datasetLanguage()); - Assertions.assertEquals(FeaturizationMode.OFF, model.mode()); - Assertions.assertEquals(BlockedTransformers.LABEL_ENCODER, model.blockedTransformers().get(0)); - Assertions.assertEquals("ujcyohigimwdc", model.columnNameAndTypes().get("klkqnqvkixnmb")); - Assertions.assertEquals("zxplgtpvdvatlz", model.transformerParams().get("smcwoxfaxd").get(0).fields().get(0)); - Assertions.assertEquals(false, model.enableDnnFeaturization()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TableVerticalFeaturizationSettings model = new TableVerticalFeaturizationSettings() - .withDatasetLanguage("oyycuxdtz") - .withMode(FeaturizationMode.OFF) - .withBlockedTransformers(Arrays.asList(BlockedTransformers.LABEL_ENCODER)) - .withColumnNameAndTypes(mapOf("klkqnqvkixnmb", "ujcyohigimwdc", "zayspzvriet", "mecuyrzwim")) - .withTransformerParams(mapOf("smcwoxfaxd", Arrays.asList( - new ColumnTransformer().withFields(Arrays.asList("zxplgtpvdvatlz", "gschnzrsbk")) - .withParameters("dataovlzdm"), - new ColumnTransformer().withFields(Arrays.asList("fwsx", "fo", "uworimmov")).withParameters("datade"), - new ColumnTransformer().withFields(Arrays.asList("mvhzfovanyrvaprt", "elgwewi")) - .withParameters("datayaqandmymnqoqju"), - new ColumnTransformer().withFields(Arrays.asList("sfbpbvzop", "x")).withParameters("datam")), - "riwmmtmqrxrzqv", - Arrays.asList( - new ColumnTransformer().withFields(Arrays.asList("fbsatroi")).withParameters("dataesugmocpcjycbo"), - new ColumnTransformer().withFields(Arrays.asList("gttwfldsi", "or")).withParameters("dataikcedpk")), - "laetscflwtjdtlr", - Arrays.asList( - new ColumnTransformer().withFields(Arrays.asList("yayub", "g", "bxiqahragpxmibpl")) - .withParameters("datapoyryefqmwovyzt"), - new ColumnTransformer().withFields(Arrays.asList("omfpb", "ceeg", "yieztkutnjil", "ukkrehyh")) - .withParameters("datajoduifvulxfaryrv"), - new ColumnTransformer().withFields(Arrays.asList("dezvjqw", "hoyiyaxqvjweiw", "czkddn")) - .withParameters("datavbooqbmdqrxy")))) - .withEnableDnnFeaturization(false); - model = BinaryData.fromObject(model).toObject(TableVerticalFeaturizationSettings.class); - Assertions.assertEquals("oyycuxdtz", model.datasetLanguage()); - Assertions.assertEquals(FeaturizationMode.OFF, model.mode()); - Assertions.assertEquals(BlockedTransformers.LABEL_ENCODER, model.blockedTransformers().get(0)); - Assertions.assertEquals("ujcyohigimwdc", model.columnNameAndTypes().get("klkqnqvkixnmb")); - Assertions.assertEquals("zxplgtpvdvatlz", model.transformerParams().get("smcwoxfaxd").get(0).fields().get(0)); - Assertions.assertEquals(false, model.enableDnnFeaturization()); - } - - // 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/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 2057d2c563c97..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalLimitSettingsTests.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.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( - "{\"maxTrials\":1966845044,\"trialTimeout\":\"PT99H7M46S\",\"timeout\":\"PT45H54M58S\",\"maxConcurrentTrials\":595135013,\"maxCoresPerTrial\":1991622972,\"exitScore\":96.52498690136247,\"enableEarlyTermination\":true}") - .toObject(TableVerticalLimitSettings.class); - Assertions.assertEquals(1966845044, model.maxTrials()); - Assertions.assertEquals(Duration.parse("PT99H7M46S"), model.trialTimeout()); - Assertions.assertEquals(Duration.parse("PT45H54M58S"), model.timeout()); - Assertions.assertEquals(595135013, model.maxConcurrentTrials()); - Assertions.assertEquals(1991622972, model.maxCoresPerTrial()); - Assertions.assertEquals(96.52498690136247D, model.exitScore()); - Assertions.assertEquals(true, model.enableEarlyTermination()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TableVerticalLimitSettings model = new TableVerticalLimitSettings().withMaxTrials(1966845044) - .withTrialTimeout(Duration.parse("PT99H7M46S")) - .withTimeout(Duration.parse("PT45H54M58S")) - .withMaxConcurrentTrials(595135013) - .withMaxCoresPerTrial(1991622972) - .withExitScore(96.52498690136247D) - .withEnableEarlyTermination(true); - model = BinaryData.fromObject(model).toObject(TableVerticalLimitSettings.class); - Assertions.assertEquals(1966845044, model.maxTrials()); - Assertions.assertEquals(Duration.parse("PT99H7M46S"), model.trialTimeout()); - Assertions.assertEquals(Duration.parse("PT45H54M58S"), model.timeout()); - Assertions.assertEquals(595135013, model.maxConcurrentTrials()); - Assertions.assertEquals(1991622972, model.maxCoresPerTrial()); - Assertions.assertEquals(96.52498690136247D, model.exitScore()); - Assertions.assertEquals(true, model.enableEarlyTermination()); - } -} 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 e029e0d760523..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalTests.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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.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( - "{\"limitSettings\":{\"maxTrials\":193717810,\"trialTimeout\":\"PT32H39M11S\",\"timeout\":\"PT201H50M53S\",\"maxConcurrentTrials\":116078360,\"maxCoresPerTrial\":466957223,\"exitScore\":15.688608348249321,\"enableEarlyTermination\":true},\"nCrossValidations\":{\"mode\":\"NCrossValidations\"},\"cvSplitColumnNames\":[\"h\",\"aspiflei\",\"ixlmdbgic\"],\"weightColumnName\":\"fgsmdrjuqb\",\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"tokljmtznpaxw\",\"mode\":\"EvalMount\",\"description\":\"yqiprclt\"},\"testData\":{\"jobInputType\":\"mltable\",\"uri\":\"gbsoljckmiigzb\",\"mode\":\"Download\",\"description\":\"gkdskswtiiq\"},\"validationDataSize\":64.45639483346135,\"testDataSize\":36.424158932077646,\"featurizationSettings\":{\"mode\":\"Custom\",\"blockedTransformers\":[\"NaiveBayes\",\"CatTargetEncoder\"],\"columnNameAndTypes\":{\"ru\":\"ykdnonaaxwmg\",\"iqbcbgv\":\"lqcwnynll\"},\"transformerParams\":{\"il\":[{\"fields\":[\"toxadhxuvjhxmnr\",\"s\",\"jcm\",\"twmlg\"],\"parameters\":\"datavnpvvd\"},{\"fields\":[\"naqyqipslzmvcds\",\"mwbitekdtfo\"],\"parameters\":\"datafiybxqich\"},{\"fields\":[\"fzdqekiv\",\"cpzcvdizul\",\"qtbhtr\"],\"parameters\":\"datapzl\"},{\"fields\":[\"f\"],\"parameters\":\"datamdutzfk\"}]},\"enableDnnFeaturization\":true,\"datasetLanguage\":\"ccgndjgdprig\"}}") - .toObject(TableVertical.class); - Assertions.assertEquals(193717810, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT32H39M11S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals(Duration.parse("PT201H50M53S"), model.limitSettings().timeout()); - Assertions.assertEquals(116078360, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(466957223, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(15.688608348249321D, model.limitSettings().exitScore()); - Assertions.assertEquals(true, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals("h", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("fgsmdrjuqb", model.weightColumnName()); - Assertions.assertEquals("yqiprclt", model.validationData().description()); - Assertions.assertEquals("tokljmtznpaxw", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.validationData().mode()); - Assertions.assertEquals("gkdskswtiiq", model.testData().description()); - Assertions.assertEquals("gbsoljckmiigzb", model.testData().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.testData().mode()); - Assertions.assertEquals(64.45639483346135D, model.validationDataSize()); - Assertions.assertEquals(36.424158932077646D, model.testDataSize()); - Assertions.assertEquals("ccgndjgdprig", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(FeaturizationMode.CUSTOM, model.featurizationSettings().mode()); - Assertions.assertEquals(BlockedTransformers.NAIVE_BAYES, - model.featurizationSettings().blockedTransformers().get(0)); - Assertions.assertEquals("ykdnonaaxwmg", model.featurizationSettings().columnNameAndTypes().get("ru")); - Assertions.assertEquals("toxadhxuvjhxmnr", - model.featurizationSettings().transformerParams().get("il").get(0).fields().get(0)); - Assertions.assertEquals(true, model.featurizationSettings().enableDnnFeaturization()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TableVertical model = new TableVertical() - .withLimitSettings(new TableVerticalLimitSettings().withMaxTrials(193717810) - .withTrialTimeout(Duration.parse("PT32H39M11S")) - .withTimeout(Duration.parse("PT201H50M53S")) - .withMaxConcurrentTrials(116078360) - .withMaxCoresPerTrial(466957223) - .withExitScore(15.688608348249321D) - .withEnableEarlyTermination(true)) - .withNCrossValidations(new NCrossValidations()) - .withCvSplitColumnNames(Arrays.asList("h", "aspiflei", "ixlmdbgic")) - .withWeightColumnName("fgsmdrjuqb") - .withValidationData(new MLTableJobInput().withDescription("yqiprclt") - .withUri("tokljmtznpaxw") - .withMode(InputDeliveryMode.EVAL_MOUNT)) - .withTestData(new MLTableJobInput().withDescription("gkdskswtiiq") - .withUri("gbsoljckmiigzb") - .withMode(InputDeliveryMode.DOWNLOAD)) - .withValidationDataSize(64.45639483346135D) - .withTestDataSize(36.424158932077646D) - .withFeaturizationSettings(new TableVerticalFeaturizationSettings().withDatasetLanguage("ccgndjgdprig") - .withMode(FeaturizationMode.CUSTOM) - .withBlockedTransformers( - Arrays.asList(BlockedTransformers.NAIVE_BAYES, BlockedTransformers.CAT_TARGET_ENCODER)) - .withColumnNameAndTypes(mapOf("ru", "ykdnonaaxwmg", "iqbcbgv", "lqcwnynll")) - .withTransformerParams(mapOf("il", - Arrays.asList( - new ColumnTransformer().withFields(Arrays.asList("toxadhxuvjhxmnr", "s", "jcm", "twmlg")) - .withParameters("datavnpvvd"), - new ColumnTransformer().withFields(Arrays.asList("naqyqipslzmvcds", "mwbitekdtfo")) - .withParameters("datafiybxqich"), - new ColumnTransformer().withFields(Arrays.asList("fzdqekiv", "cpzcvdizul", "qtbhtr")) - .withParameters("datapzl"), - new ColumnTransformer().withFields(Arrays.asList("f")).withParameters("datamdutzfk")))) - .withEnableDnnFeaturization(true)); - model = BinaryData.fromObject(model).toObject(TableVertical.class); - Assertions.assertEquals(193717810, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT32H39M11S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals(Duration.parse("PT201H50M53S"), model.limitSettings().timeout()); - Assertions.assertEquals(116078360, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(466957223, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(15.688608348249321D, model.limitSettings().exitScore()); - Assertions.assertEquals(true, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals("h", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("fgsmdrjuqb", model.weightColumnName()); - Assertions.assertEquals("yqiprclt", model.validationData().description()); - Assertions.assertEquals("tokljmtznpaxw", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.validationData().mode()); - Assertions.assertEquals("gkdskswtiiq", model.testData().description()); - Assertions.assertEquals("gbsoljckmiigzb", model.testData().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.testData().mode()); - Assertions.assertEquals(64.45639483346135D, model.validationDataSize()); - Assertions.assertEquals(36.424158932077646D, model.testDataSize()); - Assertions.assertEquals("ccgndjgdprig", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(FeaturizationMode.CUSTOM, model.featurizationSettings().mode()); - Assertions.assertEquals(BlockedTransformers.NAIVE_BAYES, - model.featurizationSettings().blockedTransformers().get(0)); - Assertions.assertEquals("ykdnonaaxwmg", model.featurizationSettings().columnNameAndTypes().get("ru")); - Assertions.assertEquals("toxadhxuvjhxmnr", - model.featurizationSettings().transformerParams().get("il").get(0).fields().get(0)); - Assertions.assertEquals(true, model.featurizationSettings().enableDnnFeaturization()); - } - - // 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/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 f227185329bac..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 c3716ab04ec3a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetUtilizationScaleSettingsTests.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.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\",\"pollingInterval\":\"PT36H54M23S\",\"targetUtilizationPercentage\":633287339,\"minInstances\":227283067,\"maxInstances\":1292414700}") - .toObject(TargetUtilizationScaleSettings.class); - Assertions.assertEquals(Duration.parse("PT36H54M23S"), model.pollingInterval()); - Assertions.assertEquals(633287339, model.targetUtilizationPercentage()); - Assertions.assertEquals(227283067, model.minInstances()); - Assertions.assertEquals(1292414700, model.maxInstances()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TargetUtilizationScaleSettings model - = new TargetUtilizationScaleSettings().withPollingInterval(Duration.parse("PT36H54M23S")) - .withTargetUtilizationPercentage(633287339) - .withMinInstances(227283067) - .withMaxInstances(1292414700); - model = BinaryData.fromObject(model).toObject(TargetUtilizationScaleSettings.class); - Assertions.assertEquals(Duration.parse("PT36H54M23S"), model.pollingInterval()); - Assertions.assertEquals(633287339, model.targetUtilizationPercentage()); - Assertions.assertEquals(227283067, model.minInstances()); - Assertions.assertEquals(1292414700, model.maxInstances()); - } -} 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 176a15fe0236f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TensorFlowTests.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.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\",\"workerCount\":116693991,\"parameterServerCount\":1398971753}") - .toObject(TensorFlow.class); - Assertions.assertEquals(116693991, model.workerCount()); - Assertions.assertEquals(1398971753, model.parameterServerCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TensorFlow model = new TensorFlow().withWorkerCount(116693991).withParameterServerCount(1398971753); - model = BinaryData.fromObject(model).toObject(TensorFlow.class); - Assertions.assertEquals(116693991, model.workerCount()); - Assertions.assertEquals(1398971753, model.parameterServerCount()); - } -} 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 ffc5b8444f02a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextClassificationMultilabelTests.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.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\":\"NormMacroRecall\",\"limitSettings\":{\"timeout\":\"PT197H4M37S\",\"maxTrials\":470605377,\"maxConcurrentTrials\":1118935796},\"featurizationSettings\":{\"datasetLanguage\":\"xagf\"},\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"dbqjnye\",\"mode\":\"Direct\",\"description\":\"gxqqqasfeooqftp\"},\"logVerbosity\":\"NotSet\",\"trainingData\":{\"jobInputType\":\"mltable\",\"uri\":\"tarp\",\"mode\":\"ReadOnlyMount\",\"description\":\"liiqeanu\"},\"targetColumnName\":\"jno\"}") - .toObject(TextClassificationMultilabel.class); - Assertions.assertEquals(LogVerbosity.NOT_SET, model.logVerbosity()); - Assertions.assertEquals("liiqeanu", model.trainingData().description()); - Assertions.assertEquals("tarp", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("jno", model.targetColumnName()); - Assertions.assertEquals(Duration.parse("PT197H4M37S"), model.limitSettings().timeout()); - Assertions.assertEquals(470605377, model.limitSettings().maxTrials()); - Assertions.assertEquals(1118935796, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals("xagf", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals("gxqqqasfeooqftp", model.validationData().description()); - Assertions.assertEquals("dbqjnye", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.validationData().mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TextClassificationMultilabel model = new TextClassificationMultilabel().withLogVerbosity(LogVerbosity.NOT_SET) - .withTrainingData(new MLTableJobInput().withDescription("liiqeanu") - .withUri("tarp") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT)) - .withTargetColumnName("jno") - .withLimitSettings(new NlpVerticalLimitSettings().withTimeout(Duration.parse("PT197H4M37S")) - .withMaxTrials(470605377) - .withMaxConcurrentTrials(1118935796)) - .withFeaturizationSettings(new NlpVerticalFeaturizationSettings().withDatasetLanguage("xagf")) - .withValidationData(new MLTableJobInput().withDescription("gxqqqasfeooqftp") - .withUri("dbqjnye") - .withMode(InputDeliveryMode.DIRECT)); - model = BinaryData.fromObject(model).toObject(TextClassificationMultilabel.class); - Assertions.assertEquals(LogVerbosity.NOT_SET, model.logVerbosity()); - Assertions.assertEquals("liiqeanu", model.trainingData().description()); - Assertions.assertEquals("tarp", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("jno", model.targetColumnName()); - Assertions.assertEquals(Duration.parse("PT197H4M37S"), model.limitSettings().timeout()); - Assertions.assertEquals(470605377, model.limitSettings().maxTrials()); - Assertions.assertEquals(1118935796, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals("xagf", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals("gxqqqasfeooqftp", model.validationData().description()); - Assertions.assertEquals("dbqjnye", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.validationData().mode()); - } -} 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 d9611ad3bb0cb..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextClassificationTests.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.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\",\"limitSettings\":{\"timeout\":\"PT208H31M59S\",\"maxTrials\":1029367761,\"maxConcurrentTrials\":1396784838},\"featurizationSettings\":{\"datasetLanguage\":\"qdvnpyeevff\"},\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"ujgtdowlxmwefcb\",\"mode\":\"Direct\",\"description\":\"hrtczwjcujyz\"},\"logVerbosity\":\"Debug\",\"trainingData\":{\"jobInputType\":\"mltable\",\"uri\":\"rjq\",\"mode\":\"ReadWriteMount\",\"description\":\"kuirxxe\"},\"targetColumnName\":\"iiircvn\"}") - .toObject(TextClassification.class); - Assertions.assertEquals(LogVerbosity.DEBUG, model.logVerbosity()); - Assertions.assertEquals("kuirxxe", model.trainingData().description()); - Assertions.assertEquals("rjq", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("iiircvn", model.targetColumnName()); - Assertions.assertEquals(ClassificationPrimaryMetrics.AVERAGE_PRECISION_SCORE_WEIGHTED, model.primaryMetric()); - Assertions.assertEquals(Duration.parse("PT208H31M59S"), model.limitSettings().timeout()); - Assertions.assertEquals(1029367761, model.limitSettings().maxTrials()); - Assertions.assertEquals(1396784838, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals("qdvnpyeevff", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals("hrtczwjcujyz", model.validationData().description()); - Assertions.assertEquals("ujgtdowlxmwefcb", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.validationData().mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TextClassification model = new TextClassification().withLogVerbosity(LogVerbosity.DEBUG) - .withTrainingData(new MLTableJobInput().withDescription("kuirxxe") - .withUri("rjq") - .withMode(InputDeliveryMode.READ_WRITE_MOUNT)) - .withTargetColumnName("iiircvn") - .withPrimaryMetric(ClassificationPrimaryMetrics.AVERAGE_PRECISION_SCORE_WEIGHTED) - .withLimitSettings(new NlpVerticalLimitSettings().withTimeout(Duration.parse("PT208H31M59S")) - .withMaxTrials(1029367761) - .withMaxConcurrentTrials(1396784838)) - .withFeaturizationSettings(new NlpVerticalFeaturizationSettings().withDatasetLanguage("qdvnpyeevff")) - .withValidationData(new MLTableJobInput().withDescription("hrtczwjcujyz") - .withUri("ujgtdowlxmwefcb") - .withMode(InputDeliveryMode.DIRECT)); - model = BinaryData.fromObject(model).toObject(TextClassification.class); - Assertions.assertEquals(LogVerbosity.DEBUG, model.logVerbosity()); - Assertions.assertEquals("kuirxxe", model.trainingData().description()); - Assertions.assertEquals("rjq", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("iiircvn", model.targetColumnName()); - Assertions.assertEquals(ClassificationPrimaryMetrics.AVERAGE_PRECISION_SCORE_WEIGHTED, model.primaryMetric()); - Assertions.assertEquals(Duration.parse("PT208H31M59S"), model.limitSettings().timeout()); - Assertions.assertEquals(1029367761, model.limitSettings().maxTrials()); - Assertions.assertEquals(1396784838, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals("qdvnpyeevff", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals("hrtczwjcujyz", model.validationData().description()); - Assertions.assertEquals("ujgtdowlxmwefcb", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.validationData().mode()); - } -} 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 0c882e06daf9c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextNerTests.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.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\":\"Accuracy\",\"limitSettings\":{\"timeout\":\"PT136H33M44S\",\"maxTrials\":911733513,\"maxConcurrentTrials\":1407364852},\"featurizationSettings\":{\"datasetLanguage\":\"y\"},\"validationData\":{\"jobInputType\":\"mltable\",\"uri\":\"evaebzm\",\"mode\":\"Download\",\"description\":\"rjkejv\"},\"logVerbosity\":\"Error\",\"trainingData\":{\"jobInputType\":\"mltable\",\"uri\":\"ogzougxbxxgj\",\"mode\":\"ReadOnlyMount\",\"description\":\"hiv\"},\"targetColumnName\":\"rmtenfdvdoearywu\"}") - .toObject(TextNer.class); - Assertions.assertEquals(LogVerbosity.ERROR, model.logVerbosity()); - Assertions.assertEquals("hiv", model.trainingData().description()); - Assertions.assertEquals("ogzougxbxxgj", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("rmtenfdvdoearywu", model.targetColumnName()); - Assertions.assertEquals(Duration.parse("PT136H33M44S"), model.limitSettings().timeout()); - Assertions.assertEquals(911733513, model.limitSettings().maxTrials()); - Assertions.assertEquals(1407364852, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals("y", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals("rjkejv", model.validationData().description()); - Assertions.assertEquals("evaebzm", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.validationData().mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TextNer model = new TextNer().withLogVerbosity(LogVerbosity.ERROR) - .withTrainingData(new MLTableJobInput().withDescription("hiv") - .withUri("ogzougxbxxgj") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT)) - .withTargetColumnName("rmtenfdvdoearywu") - .withLimitSettings(new NlpVerticalLimitSettings().withTimeout(Duration.parse("PT136H33M44S")) - .withMaxTrials(911733513) - .withMaxConcurrentTrials(1407364852)) - .withFeaturizationSettings(new NlpVerticalFeaturizationSettings().withDatasetLanguage("y")) - .withValidationData(new MLTableJobInput().withDescription("rjkejv") - .withUri("evaebzm") - .withMode(InputDeliveryMode.DOWNLOAD)); - model = BinaryData.fromObject(model).toObject(TextNer.class); - Assertions.assertEquals(LogVerbosity.ERROR, model.logVerbosity()); - Assertions.assertEquals("hiv", model.trainingData().description()); - Assertions.assertEquals("ogzougxbxxgj", model.trainingData().uri()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("rmtenfdvdoearywu", model.targetColumnName()); - Assertions.assertEquals(Duration.parse("PT136H33M44S"), model.limitSettings().timeout()); - Assertions.assertEquals(911733513, model.limitSettings().maxTrials()); - Assertions.assertEquals(1407364852, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals("y", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals("rjkejv", model.validationData().description()); - Assertions.assertEquals("evaebzm", model.validationData().uri()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.validationData().mode()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TmpfsOptionsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TmpfsOptionsTests.java deleted file mode 100644 index 85aed1311f378..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TmpfsOptionsTests.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.TmpfsOptions; -import org.junit.jupiter.api.Assertions; - -public final class TmpfsOptionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TmpfsOptions model = BinaryData.fromString("{\"size\":1684202361}").toObject(TmpfsOptions.class); - Assertions.assertEquals(1684202361, model.size()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TmpfsOptions model = new TmpfsOptions().withSize(1684202361); - model = BinaryData.fromObject(model).toObject(TmpfsOptions.class); - Assertions.assertEquals(1684202361, model.size()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TopNFeaturesByAttributionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TopNFeaturesByAttributionTests.java deleted file mode 100644 index c4f03675c2794..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TopNFeaturesByAttributionTests.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.TopNFeaturesByAttribution; -import org.junit.jupiter.api.Assertions; - -public final class TopNFeaturesByAttributionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TopNFeaturesByAttribution model - = BinaryData.fromString("{\"filterType\":\"TopNByAttribution\",\"top\":868397774}") - .toObject(TopNFeaturesByAttribution.class); - Assertions.assertEquals(868397774, model.top()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TopNFeaturesByAttribution model = new TopNFeaturesByAttribution().withTop(868397774); - model = BinaryData.fromObject(model).toObject(TopNFeaturesByAttribution.class); - Assertions.assertEquals(868397774, model.top()); - } -} 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 9129497afac93..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TrainingSettingsTests.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.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( - "{\"enableOnnxCompatibleModels\":true,\"stackEnsembleSettings\":{\"stackMetaLearnerType\":\"LinearRegression\",\"stackMetaLearnerTrainPercentage\":20.375480617497665,\"stackMetaLearnerKWargs\":\"datauhktq\"},\"enableStackEnsemble\":true,\"enableVoteEnsemble\":true,\"ensembleModelDownloadTimeout\":\"PT238H33M9S\",\"enableModelExplainability\":false,\"enableDnnTraining\":true}") - .toObject(TrainingSettings.class); - Assertions.assertEquals(true, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.LINEAR_REGRESSION, - model.stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(20.375480617497665D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(true, model.enableStackEnsemble()); - Assertions.assertEquals(true, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT238H33M9S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(false, model.enableModelExplainability()); - Assertions.assertEquals(true, model.enableDnnTraining()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrainingSettings model = new TrainingSettings().withEnableOnnxCompatibleModels(true) - .withStackEnsembleSettings( - new StackEnsembleSettings().withStackMetaLearnerType(StackMetaLearnerType.LINEAR_REGRESSION) - .withStackMetaLearnerTrainPercentage(20.375480617497665D) - .withStackMetaLearnerKWargs("datauhktq")) - .withEnableStackEnsemble(true) - .withEnableVoteEnsemble(true) - .withEnsembleModelDownloadTimeout(Duration.parse("PT238H33M9S")) - .withEnableModelExplainability(false) - .withEnableDnnTraining(true); - model = BinaryData.fromObject(model).toObject(TrainingSettings.class); - Assertions.assertEquals(true, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(StackMetaLearnerType.LINEAR_REGRESSION, - model.stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(20.375480617497665D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(true, model.enableStackEnsemble()); - Assertions.assertEquals(true, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT238H33M9S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(false, model.enableModelExplainability()); - Assertions.assertEquals(true, model.enableDnnTraining()); - } -} 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 f55e6752c2eed..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TriggerBaseTests.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.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\":\"jadhqoawj\",\"startTime\":\"yueayfbpcmsp\",\"timeZone\":\"yrrueqth\"}") - .toObject(TriggerBase.class); - Assertions.assertEquals("jadhqoawj", model.endTime()); - Assertions.assertEquals("yueayfbpcmsp", model.startTime()); - Assertions.assertEquals("yrrueqth", model.timeZone()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TriggerBase model - = new TriggerBase().withEndTime("jadhqoawj").withStartTime("yueayfbpcmsp").withTimeZone("yrrueqth"); - model = BinaryData.fromObject(model).toObject(TriggerBase.class); - Assertions.assertEquals("jadhqoawj", model.endTime()); - Assertions.assertEquals("yueayfbpcmsp", model.startTime()); - Assertions.assertEquals("yrrueqth", 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 d0da3ca5d6822..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TritonModelJobInputTests.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.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\",\"uri\":\"zhdtrsyfe\",\"mode\":\"ReadWriteMount\",\"description\":\"yljdzyyrwnmwt\"}") - .toObject(TritonModelJobInput.class); - Assertions.assertEquals("yljdzyyrwnmwt", model.description()); - Assertions.assertEquals("zhdtrsyfe", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TritonModelJobInput model = new TritonModelJobInput().withDescription("yljdzyyrwnmwt") - .withUri("zhdtrsyfe") - .withMode(InputDeliveryMode.READ_WRITE_MOUNT); - model = BinaryData.fromObject(model).toObject(TritonModelJobInput.class); - Assertions.assertEquals("yljdzyyrwnmwt", model.description()); - Assertions.assertEquals("zhdtrsyfe", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } -} 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 773fa8b8701b0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TritonModelJobOutputTests.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.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\",\"uri\":\"ljknnkynkstdtfwh\",\"mode\":\"Upload\",\"description\":\"fxaqjyihjcwwv\"}") - .toObject(TritonModelJobOutput.class); - Assertions.assertEquals("fxaqjyihjcwwv", model.description()); - Assertions.assertEquals("ljknnkynkstdtfwh", model.uri()); - Assertions.assertEquals(OutputDeliveryMode.UPLOAD, model.mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TritonModelJobOutput model = new TritonModelJobOutput().withDescription("fxaqjyihjcwwv") - .withUri("ljknnkynkstdtfwh") - .withMode(OutputDeliveryMode.UPLOAD); - model = BinaryData.fromObject(model).toObject(TritonModelJobOutput.class); - Assertions.assertEquals("fxaqjyihjcwwv", model.description()); - Assertions.assertEquals("ljknnkynkstdtfwh", model.uri()); - Assertions.assertEquals(OutputDeliveryMode.UPLOAD, model.mode()); - } -} 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 bb3198194c4f6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TruncationSelectionPolicyTests.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.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\":2059662360,\"evaluationInterval\":281085668,\"delayEvaluation\":782879823}") - .toObject(TruncationSelectionPolicy.class); - Assertions.assertEquals(281085668, model.evaluationInterval()); - Assertions.assertEquals(782879823, model.delayEvaluation()); - Assertions.assertEquals(2059662360, model.truncationPercentage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TruncationSelectionPolicy model = new TruncationSelectionPolicy().withEvaluationInterval(281085668) - .withDelayEvaluation(782879823) - .withTruncationPercentage(2059662360); - model = BinaryData.fromObject(model).toObject(TruncationSelectionPolicy.class); - Assertions.assertEquals(281085668, model.evaluationInterval()); - Assertions.assertEquals(782879823, model.delayEvaluation()); - Assertions.assertEquals(2059662360, 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 d6fed1b04cd52..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UpdateWorkspaceQuotasResultInnerTests.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.fluent.models.UpdateWorkspaceQuotasResultInner; - -public final class UpdateWorkspaceQuotasResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateWorkspaceQuotasResultInner model = BinaryData.fromString( - "{\"value\":[{\"id\":\"dybyxczfclhaa\",\"type\":\"babphlwrqlfk\",\"limit\":4312008787205173543,\"unit\":\"Count\",\"status\":\"OperationNotEnabledForRegion\"},{\"id\":\"mnyyazt\",\"type\":\"twwrqp\",\"limit\":2759149426383242118,\"unit\":\"Count\",\"status\":\"InvalidQuotaExceedsSubscriptionLimit\"}],\"nextLink\":\"iexzfeyue\"}") - .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 5e6308e7b2d4c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UpdateWorkspaceQuotasTests.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.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\":\"ibx\",\"type\":\"wbhqwal\",\"limit\":4821082223595321199,\"unit\":\"Count\",\"status\":\"InvalidQuotaBelowClusterMinimum\"}") - .toObject(UpdateWorkspaceQuotas.class); - Assertions.assertEquals(4821082223595321199L, model.limit()); - Assertions.assertEquals(Status.INVALID_QUOTA_BELOW_CLUSTER_MINIMUM, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateWorkspaceQuotas model = new UpdateWorkspaceQuotas().withLimit(4821082223595321199L) - .withStatus(Status.INVALID_QUOTA_BELOW_CLUSTER_MINIMUM); - model = BinaryData.fromObject(model).toObject(UpdateWorkspaceQuotas.class); - Assertions.assertEquals(4821082223595321199L, model.limit()); - Assertions.assertEquals(Status.INVALID_QUOTA_BELOW_CLUSTER_MINIMUM, 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 38e74cfaa8dc6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileDataVersionTests.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.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\":\"vhkhpsp\",\"isArchived\":false,\"isAnonymous\":false,\"description\":\"yfaoexnguwnrdpu\",\"tags\":{\"ybsz\":\"ihsujtg\"},\"properties\":{\"yelrnh\":\"jxejpdcliqwzut\"}}") - .toObject(UriFileDataVersion.class); - Assertions.assertEquals("yfaoexnguwnrdpu", model.description()); - Assertions.assertEquals("ihsujtg", model.tags().get("ybsz")); - Assertions.assertEquals("jxejpdcliqwzut", model.properties().get("yelrnh")); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals("vhkhpsp", model.dataUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UriFileDataVersion model = new UriFileDataVersion().withDescription("yfaoexnguwnrdpu") - .withTags(mapOf("ybsz", "ihsujtg")) - .withProperties(mapOf("yelrnh", "jxejpdcliqwzut")) - .withIsArchived(false) - .withIsAnonymous(false) - .withDataUri("vhkhpsp"); - model = BinaryData.fromObject(model).toObject(UriFileDataVersion.class); - Assertions.assertEquals("yfaoexnguwnrdpu", model.description()); - Assertions.assertEquals("ihsujtg", model.tags().get("ybsz")); - Assertions.assertEquals("jxejpdcliqwzut", model.properties().get("yelrnh")); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals("vhkhpsp", model.dataUri()); - } - - // 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/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 b0d6f4a5f6fe2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileJobInputTests.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.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\",\"uri\":\"jt\",\"mode\":\"ReadWriteMount\",\"description\":\"z\"}") - .toObject(UriFileJobInput.class); - Assertions.assertEquals("z", model.description()); - Assertions.assertEquals("jt", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UriFileJobInput model - = new UriFileJobInput().withDescription("z").withUri("jt").withMode(InputDeliveryMode.READ_WRITE_MOUNT); - model = BinaryData.fromObject(model).toObject(UriFileJobInput.class); - Assertions.assertEquals("z", model.description()); - Assertions.assertEquals("jt", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } -} 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 d91cc4463d4a1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileJobOutputTests.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.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\",\"uri\":\"yovqmqcudptoqwr\",\"mode\":\"ReadWriteMount\",\"description\":\"jthlokmx\"}") - .toObject(UriFileJobOutput.class); - Assertions.assertEquals("jthlokmx", model.description()); - Assertions.assertEquals("yovqmqcudptoqwr", model.uri()); - Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UriFileJobOutput model = new UriFileJobOutput().withDescription("jthlokmx") - .withUri("yovqmqcudptoqwr") - .withMode(OutputDeliveryMode.READ_WRITE_MOUNT); - model = BinaryData.fromObject(model).toObject(UriFileJobOutput.class); - Assertions.assertEquals("jthlokmx", model.description()); - Assertions.assertEquals("yovqmqcudptoqwr", model.uri()); - Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } -} 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 bfeba02f59994..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderDataVersionTests.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.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\":\"awfubkngejjxu\",\"isArchived\":true,\"isAnonymous\":false,\"description\":\"mo\",\"tags\":{\"fzcfdtstiax\":\"xuktdrsjtmnkxjou\",\"mlroiommemsoqgb\":\"yrnuhcfhepisqb\",\"bobaqca\":\"cyeqd\",\"xbj\":\"ebckcesrsixwnlpj\"},\"properties\":{\"yyfr\":\"y\",\"kidfhmlxrqkeknu\":\"idzfpsfy\",\"uwpuqpsrcekdvvo\":\"kqafzvptriysjrgt\",\"w\":\"dwedg\"}}") - .toObject(UriFolderDataVersion.class); - Assertions.assertEquals("mo", model.description()); - Assertions.assertEquals("xuktdrsjtmnkxjou", model.tags().get("fzcfdtstiax")); - Assertions.assertEquals("y", model.properties().get("yyfr")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals("awfubkngejjxu", model.dataUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UriFolderDataVersion model = new UriFolderDataVersion().withDescription("mo") - .withTags(mapOf("fzcfdtstiax", "xuktdrsjtmnkxjou", "mlroiommemsoqgb", "yrnuhcfhepisqb", "bobaqca", "cyeqd", - "xbj", "ebckcesrsixwnlpj")) - .withProperties( - mapOf("yyfr", "y", "kidfhmlxrqkeknu", "idzfpsfy", "uwpuqpsrcekdvvo", "kqafzvptriysjrgt", "w", "dwedg")) - .withIsArchived(true) - .withIsAnonymous(false) - .withDataUri("awfubkngejjxu"); - model = BinaryData.fromObject(model).toObject(UriFolderDataVersion.class); - Assertions.assertEquals("mo", model.description()); - Assertions.assertEquals("xuktdrsjtmnkxjou", model.tags().get("fzcfdtstiax")); - Assertions.assertEquals("y", model.properties().get("yyfr")); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals("awfubkngejjxu", model.dataUri()); - } - - // 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/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 08a49b6a2e987..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderJobInputTests.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.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\",\"uri\":\"clvbwatza\",\"mode\":\"ReadWriteMount\",\"description\":\"jngoarsrdrw\"}") - .toObject(UriFolderJobInput.class); - Assertions.assertEquals("jngoarsrdrw", model.description()); - Assertions.assertEquals("clvbwatza", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UriFolderJobInput model = new UriFolderJobInput().withDescription("jngoarsrdrw") - .withUri("clvbwatza") - .withMode(InputDeliveryMode.READ_WRITE_MOUNT); - model = BinaryData.fromObject(model).toObject(UriFolderJobInput.class); - Assertions.assertEquals("jngoarsrdrw", model.description()); - Assertions.assertEquals("clvbwatza", model.uri()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - } -} 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 ea88cf31f9219..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderJobOutputTests.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.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\",\"uri\":\"mzc\",\"mode\":\"Upload\",\"description\":\"pypimrxi\"}") - .toObject(UriFolderJobOutput.class); - Assertions.assertEquals("pypimrxi", model.description()); - Assertions.assertEquals("mzc", model.uri()); - Assertions.assertEquals(OutputDeliveryMode.UPLOAD, model.mode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UriFolderJobOutput model - = new UriFolderJobOutput().withDescription("pypimrxi").withUri("mzc").withMode(OutputDeliveryMode.UPLOAD); - model = BinaryData.fromObject(model).toObject(UriFolderJobOutput.class); - Assertions.assertEquals("pypimrxi", model.description()); - Assertions.assertEquals("mzc", model.uri()); - Assertions.assertEquals(OutputDeliveryMode.UPLOAD, model.mode()); - } -} 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 f8f3f626f8e25..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsageInnerTests.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.fluent.models.UsageInner; - -public final class UsageInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UsageInner model = BinaryData.fromString( - "{\"id\":\"nkoukn\",\"amlWorkspaceLocation\":\"dwtiukbldngkp\",\"type\":\"ipazyxoegukgjnpi\",\"unit\":\"Count\",\"currentValue\":9071113490700391496,\"limit\":7306786683100499941,\"name\":{\"value\":\"yp\",\"localizedValue\":\"bpizcdrqjsdpydn\"}}") - .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 0195859044b4f..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\":\"hxdeoejz\",\"localizedValue\":\"w\"}").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 869b6facf9c89..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsagesListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.Usage; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class UsagesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"id\":\"m\",\"amlWorkspaceLocation\":\"zbyfkoc\",\"type\":\"zdct\",\"unit\":\"Count\",\"currentValue\":3928826524604163892,\"limit\":9107747162621331635,\"name\":{\"value\":\"gxrolw\",\"localizedValue\":\"lks\"}}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("fjczgohvpsuwi", 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 b958eef621cc0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserAssignedIdentityTests.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.UserAssignedIdentity; - -public final class UserAssignedIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserAssignedIdentity model = BinaryData.fromString( - "{\"principalId\":\"a78b5bf0-7059-446f-a340-f6da79e18669\",\"clientId\":\"865ed2ee-b134-400f-ae82-0e9ea9358bf5\"}") - .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/UserCreatedAcrAccountTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserCreatedAcrAccountTests.java deleted file mode 100644 index 6a60f23f291a8..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserCreatedAcrAccountTests.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.ArmResourceId; -import com.azure.resourcemanager.machinelearning.models.UserCreatedAcrAccount; -import org.junit.jupiter.api.Assertions; - -public final class UserCreatedAcrAccountTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserCreatedAcrAccount model = BinaryData.fromString("{\"armResourceId\":{\"resourceId\":\"nldpxottd\"}}") - .toObject(UserCreatedAcrAccount.class); - Assertions.assertEquals("nldpxottd", model.armResourceId().resourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserCreatedAcrAccount model - = new UserCreatedAcrAccount().withArmResourceId(new ArmResourceId().withResourceId("nldpxottd")); - model = BinaryData.fromObject(model).toObject(UserCreatedAcrAccount.class); - Assertions.assertEquals("nldpxottd", model.armResourceId().resourceId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserCreatedStorageAccountTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserCreatedStorageAccountTests.java deleted file mode 100644 index cccd5edd0611c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserCreatedStorageAccountTests.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.ArmResourceId; -import com.azure.resourcemanager.machinelearning.models.UserCreatedStorageAccount; -import org.junit.jupiter.api.Assertions; - -public final class UserCreatedStorageAccountTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserCreatedStorageAccount model = BinaryData.fromString("{\"armResourceId\":{\"resourceId\":\"rfmzhwilz\"}}") - .toObject(UserCreatedStorageAccount.class); - Assertions.assertEquals("rfmzhwilz", model.armResourceId().resourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserCreatedStorageAccount model - = new UserCreatedStorageAccount().withArmResourceId(new ArmResourceId().withResourceId("rfmzhwilz")); - model = BinaryData.fromObject(model).toObject(UserCreatedStorageAccount.class); - Assertions.assertEquals("rfmzhwilz", model.armResourceId().resourceId()); - } -} 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 4ba738a2cb716..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineImageTests.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.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\":\"eqi\"}").toObject(VirtualMachineImage.class); - Assertions.assertEquals("eqi", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineImage model = new VirtualMachineImage().withId("eqi"); - model = BinaryData.fromObject(model).toObject(VirtualMachineImage.class); - Assertions.assertEquals("eqi", 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 5bce03f119746..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizeListResultInnerTests.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.VirtualMachineSizeListResultInner; -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.VirtualMachineSize; -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 VirtualMachineSizeListResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachineSizeListResultInner model = BinaryData.fromString( - "{\"value\":[{\"name\":\"ttgzfbis\",\"family\":\"bkh\",\"vCPUs\":2127806039,\"gpus\":1288949880,\"osVhdSizeMB\":38028181,\"maxResourceVolumeMB\":1859867828,\"memoryGB\":87.63753319479677,\"lowPriorityCapable\":true,\"premiumIO\":true,\"estimatedVMPrices\":{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[{\"retailPrice\":64.09894900073603,\"osType\":\"Windows\",\"vmTier\":\"Standard\"},{\"retailPrice\":79.35964206973047,\"osType\":\"Linux\",\"vmTier\":\"Standard\"},{\"retailPrice\":42.700623481202356,\"osType\":\"Windows\",\"vmTier\":\"LowPriority\"}]},\"supportedComputeTypes\":[\"ankixzbinjeput\",\"mryw\",\"uzoqft\"]},{\"name\":\"qzrnkcqvyxlwhz\",\"family\":\"icohoqqnwvl\",\"vCPUs\":137418501,\"gpus\":240696862,\"osVhdSizeMB\":989865410,\"maxResourceVolumeMB\":1111271416,\"memoryGB\":89.24862714636545,\"lowPriorityCapable\":true,\"premiumIO\":false,\"estimatedVMPrices\":{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[{\"retailPrice\":16.817525955184955,\"osType\":\"Windows\",\"vmTier\":\"Standard\"},{\"retailPrice\":34.762358205235685,\"osType\":\"Windows\",\"vmTier\":\"LowPriority\"}]},\"supportedComputeTypes\":[\"xuconu\",\"szfkbe\"]},{\"name\":\"ewrmjmwvvjektc\",\"family\":\"enhwlrs\",\"vCPUs\":1160903159,\"gpus\":1611937755,\"osVhdSizeMB\":88674605,\"maxResourceVolumeMB\":1497747183,\"memoryGB\":0.6800349373471626,\"lowPriorityCapable\":true,\"premiumIO\":true,\"estimatedVMPrices\":{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[{\"retailPrice\":75.88369080213783,\"osType\":\"Windows\",\"vmTier\":\"Spot\"}]},\"supportedComputeTypes\":[\"vfcivfsnkymuc\",\"qhjfbebr\",\"cxerf\"]}]}") - .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(64.09894900073603, - model.value().get(0).estimatedVMPrices().values().get(0).retailPrice()); - Assertions.assertEquals(VMPriceOSType.WINDOWS, - model.value().get(0).estimatedVMPrices().values().get(0).osType()); - Assertions.assertEquals(VMTier.STANDARD, model.value().get(0).estimatedVMPrices().values().get(0).vmTier()); - Assertions.assertEquals("ankixzbinjeput", 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( - new EstimatedVMPrice().withRetailPrice(64.09894900073603) - .withOsType(VMPriceOSType.WINDOWS) - .withVmTier(VMTier.STANDARD), - new EstimatedVMPrice().withRetailPrice(79.35964206973047) - .withOsType(VMPriceOSType.LINUX) - .withVmTier(VMTier.STANDARD), - new EstimatedVMPrice().withRetailPrice(42.700623481202356) - .withOsType(VMPriceOSType.WINDOWS) - .withVmTier(VMTier.LOW_PRIORITY)))) - .withSupportedComputeTypes(Arrays.asList("ankixzbinjeput", "mryw", "uzoqft")), - new VirtualMachineSize() - .withEstimatedVMPrices(new EstimatedVMPrices().withBillingCurrency(BillingCurrency.USD) - .withUnitOfMeasure(UnitOfMeasure.ONE_HOUR) - .withValues(Arrays.asList( - new EstimatedVMPrice().withRetailPrice(16.817525955184955) - .withOsType(VMPriceOSType.WINDOWS) - .withVmTier(VMTier.STANDARD), - new EstimatedVMPrice().withRetailPrice(34.762358205235685) - .withOsType(VMPriceOSType.WINDOWS) - .withVmTier(VMTier.LOW_PRIORITY)))) - .withSupportedComputeTypes(Arrays.asList("xuconu", "szfkbe")), - new VirtualMachineSize() - .withEstimatedVMPrices(new EstimatedVMPrices().withBillingCurrency(BillingCurrency.USD) - .withUnitOfMeasure(UnitOfMeasure.ONE_HOUR) - .withValues(Arrays.asList(new EstimatedVMPrice().withRetailPrice(75.88369080213783) - .withOsType(VMPriceOSType.WINDOWS) - .withVmTier(VMTier.SPOT)))) - .withSupportedComputeTypes(Arrays.asList("vfcivfsnkymuc", "qhjfbebr", "cxerf")))); - 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(64.09894900073603, - model.value().get(0).estimatedVMPrices().values().get(0).retailPrice()); - Assertions.assertEquals(VMPriceOSType.WINDOWS, - model.value().get(0).estimatedVMPrices().values().get(0).osType()); - Assertions.assertEquals(VMTier.STANDARD, model.value().get(0).estimatedVMPrices().values().get(0).vmTier()); - Assertions.assertEquals("ankixzbinjeput", 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 5d1c21f91557d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizeTests.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.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.VirtualMachineSize; -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 VirtualMachineSizeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachineSize model = BinaryData.fromString( - "{\"name\":\"utttxfvjrbirp\",\"family\":\"epcyvahfnlj\",\"vCPUs\":561070013,\"gpus\":197436298,\"osVhdSizeMB\":1640197955,\"maxResourceVolumeMB\":9347197,\"memoryGB\":95.87972980881396,\"lowPriorityCapable\":false,\"premiumIO\":true,\"estimatedVMPrices\":{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[{\"retailPrice\":41.20565542900856,\"osType\":\"Linux\",\"vmTier\":\"Standard\"},{\"retailPrice\":89.24458873666032,\"osType\":\"Windows\",\"vmTier\":\"Standard\"},{\"retailPrice\":74.67569214860603,\"osType\":\"Linux\",\"vmTier\":\"LowPriority\"},{\"retailPrice\":67.46272082562218,\"osType\":\"Linux\",\"vmTier\":\"Standard\"}]},\"supportedComputeTypes\":[\"zz\",\"bijhtxfvgxbf\",\"mxnehmp\",\"ec\"]}") - .toObject(VirtualMachineSize.class); - Assertions.assertEquals(BillingCurrency.USD, model.estimatedVMPrices().billingCurrency()); - Assertions.assertEquals(UnitOfMeasure.ONE_HOUR, model.estimatedVMPrices().unitOfMeasure()); - Assertions.assertEquals(41.20565542900856, 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("zz", 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(41.20565542900856) - .withOsType(VMPriceOSType.LINUX) - .withVmTier(VMTier.STANDARD), - new EstimatedVMPrice().withRetailPrice(89.24458873666032) - .withOsType(VMPriceOSType.WINDOWS) - .withVmTier(VMTier.STANDARD), - new EstimatedVMPrice().withRetailPrice(74.67569214860603) - .withOsType(VMPriceOSType.LINUX) - .withVmTier(VMTier.LOW_PRIORITY), - new EstimatedVMPrice().withRetailPrice(67.46272082562218) - .withOsType(VMPriceOSType.LINUX) - .withVmTier(VMTier.STANDARD)))) - .withSupportedComputeTypes(Arrays.asList("zz", "bijhtxfvgxbf", "mxnehmp", "ec")); - model = BinaryData.fromObject(model).toObject(VirtualMachineSize.class); - Assertions.assertEquals(BillingCurrency.USD, model.estimatedVMPrices().billingCurrency()); - Assertions.assertEquals(UnitOfMeasure.ONE_HOUR, model.estimatedVMPrices().unitOfMeasure()); - Assertions.assertEquals(41.20565542900856, 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("zz", 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 75e3ce53d1baf..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizesListWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.BillingCurrency; -import com.azure.resourcemanager.machinelearning.models.UnitOfMeasure; -import com.azure.resourcemanager.machinelearning.models.VirtualMachineSizeListResult; -import com.azure.resourcemanager.machinelearning.models.VMPriceOSType; -import com.azure.resourcemanager.machinelearning.models.VMTier; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class VirtualMachineSizesListWithResponseMockTests { - @Test - public void testListWithResponse() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"bvjh\",\"family\":\"pmqququxl\",\"vCPUs\":241242158,\"gpus\":1242468021,\"osVhdSizeMB\":650458247,\"maxResourceVolumeMB\":132435040,\"memoryGB\":31.054010870691286,\"lowPriorityCapable\":true,\"premiumIO\":true,\"estimatedVMPrices\":{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[{\"retailPrice\":9.524913939318969,\"osType\":\"Linux\",\"vmTier\":\"Standard\"}]},\"supportedComputeTypes\":[\"qpfy\",\"vhtvijvwmrg\"]},{\"name\":\"zhrplcxfmbzqu\",\"family\":\"tqmh\",\"vCPUs\":1980172415,\"gpus\":1049452948,\"osVhdSizeMB\":939315181,\"maxResourceVolumeMB\":823035085,\"memoryGB\":7.69921960533233,\"lowPriorityCapable\":false,\"premiumIO\":true,\"estimatedVMPrices\":{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[{\"retailPrice\":69.40534502928313,\"osType\":\"Linux\",\"vmTier\":\"Standard\"},{\"retailPrice\":80.17743221655657,\"osType\":\"Windows\",\"vmTier\":\"Spot\"}]},\"supportedComputeTypes\":[\"fufkekzfk\",\"cxhsevmnkgghvsr\",\"jokvlwvbjsa\",\"xsv\"]}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("ksutacuctiha", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(BillingCurrency.USD, response.value().get(0).estimatedVMPrices().billingCurrency()); - Assertions.assertEquals(UnitOfMeasure.ONE_HOUR, response.value().get(0).estimatedVMPrices().unitOfMeasure()); - Assertions.assertEquals(9.524913939318969, - response.value().get(0).estimatedVMPrices().values().get(0).retailPrice()); - Assertions.assertEquals(VMPriceOSType.LINUX, - response.value().get(0).estimatedVMPrices().values().get(0).osType()); - Assertions.assertEquals(VMTier.STANDARD, response.value().get(0).estimatedVMPrices().values().get(0).vmTier()); - Assertions.assertEquals("qpfy", response.value().get(0).supportedComputeTypes().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VolumeDefinitionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VolumeDefinitionTests.java deleted file mode 100644 index b8642c8393a9f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VolumeDefinitionTests.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.BindOptions; -import com.azure.resourcemanager.machinelearning.models.TmpfsOptions; -import com.azure.resourcemanager.machinelearning.models.VolumeDefinition; -import com.azure.resourcemanager.machinelearning.models.VolumeDefinitionType; -import com.azure.resourcemanager.machinelearning.models.VolumeOptions; -import org.junit.jupiter.api.Assertions; - -public final class VolumeDefinitionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumeDefinition model = BinaryData.fromString( - "{\"type\":\"bind\",\"readOnly\":true,\"source\":\"q\",\"target\":\"qkqsygxiyneco\",\"consistency\":\"gzkheubanl\",\"bind\":{\"propagation\":\"pqcckqiawzlz\",\"createHostPath\":true,\"selinux\":\"lg\"},\"volume\":{\"nocopy\":true},\"tmpfs\":{\"size\":1215971610}}") - .toObject(VolumeDefinition.class); - Assertions.assertEquals(VolumeDefinitionType.BIND, model.type()); - Assertions.assertEquals(true, model.readOnly()); - Assertions.assertEquals("q", model.source()); - Assertions.assertEquals("qkqsygxiyneco", model.target()); - Assertions.assertEquals("gzkheubanl", model.consistency()); - Assertions.assertEquals("pqcckqiawzlz", model.bind().propagation()); - Assertions.assertEquals(true, model.bind().createHostPath()); - Assertions.assertEquals("lg", model.bind().selinux()); - Assertions.assertEquals(true, model.volume().nocopy()); - Assertions.assertEquals(1215971610, model.tmpfs().size()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumeDefinition model = new VolumeDefinition().withType(VolumeDefinitionType.BIND) - .withReadOnly(true) - .withSource("q") - .withTarget("qkqsygxiyneco") - .withConsistency("gzkheubanl") - .withBind(new BindOptions().withPropagation("pqcckqiawzlz").withCreateHostPath(true).withSelinux("lg")) - .withVolume(new VolumeOptions().withNocopy(true)) - .withTmpfs(new TmpfsOptions().withSize(1215971610)); - model = BinaryData.fromObject(model).toObject(VolumeDefinition.class); - Assertions.assertEquals(VolumeDefinitionType.BIND, model.type()); - Assertions.assertEquals(true, model.readOnly()); - Assertions.assertEquals("q", model.source()); - Assertions.assertEquals("qkqsygxiyneco", model.target()); - Assertions.assertEquals("gzkheubanl", model.consistency()); - Assertions.assertEquals("pqcckqiawzlz", model.bind().propagation()); - Assertions.assertEquals(true, model.bind().createHostPath()); - Assertions.assertEquals("lg", model.bind().selinux()); - Assertions.assertEquals(true, model.volume().nocopy()); - Assertions.assertEquals(1215971610, model.tmpfs().size()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VolumeOptionsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VolumeOptionsTests.java deleted file mode 100644 index c5717dcfeab5e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VolumeOptionsTests.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.VolumeOptions; -import org.junit.jupiter.api.Assertions; - -public final class VolumeOptionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumeOptions model = BinaryData.fromString("{\"nocopy\":false}").toObject(VolumeOptions.class); - Assertions.assertEquals(false, model.nocopy()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumeOptions model = new VolumeOptions().withNocopy(false); - model = BinaryData.fromObject(model).toObject(VolumeOptions.class); - Assertions.assertEquals(false, model.nocopy()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WebhookTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WebhookTests.java deleted file mode 100644 index dac066de552e4..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WebhookTests.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.Webhook; -import org.junit.jupiter.api.Assertions; - -public final class WebhookTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Webhook model = BinaryData.fromString("{\"webhookType\":\"Webhook\",\"eventType\":\"zrazisgyk\"}") - .toObject(Webhook.class); - Assertions.assertEquals("zrazisgyk", model.eventType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Webhook model = new Webhook().withEventType("zrazisgyk"); - model = BinaryData.fromObject(model).toObject(Webhook.class); - Assertions.assertEquals("zrazisgyk", model.eventType()); - } -} 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 6799aa1ec4e88..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionManagedIdentityTests.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.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\":\"rvrk\",\"clientId\":\"abdu\"}") - .toObject(WorkspaceConnectionManagedIdentity.class); - Assertions.assertEquals("rvrk", model.resourceId()); - Assertions.assertEquals("abdu", model.clientId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceConnectionManagedIdentity model - = new WorkspaceConnectionManagedIdentity().withResourceId("rvrk").withClientId("abdu"); - model = BinaryData.fromObject(model).toObject(WorkspaceConnectionManagedIdentity.class); - Assertions.assertEquals("rvrk", model.resourceId()); - Assertions.assertEquals("abdu", 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 9ef57a9721c78..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPersonalAccessTokenTests.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.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\":\"jshcybwf\"}").toObject(WorkspaceConnectionPersonalAccessToken.class); - Assertions.assertEquals("jshcybwf", model.pat()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceConnectionPersonalAccessToken model = new WorkspaceConnectionPersonalAccessToken().withPat("jshcybwf"); - model = BinaryData.fromObject(model).toObject(WorkspaceConnectionPersonalAccessToken.class); - Assertions.assertEquals("jshcybwf", 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 8c458b41eab66..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code 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.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -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\":\"MySql\",\"createdByWorkspaceArmId\":\"ashrt\",\"expiryTime\":\"2021-03-25T05:20:51Z\",\"group\":\"ServicesAndApps\",\"isSharedToAll\":true,\"target\":\"bpokulpiujwaasip\",\"metadata\":{\"erpqlpqwcciuqg\":\"obyu\",\"hykojoxafnndlpic\":\"dbutauvfbtkuwhh\"},\"sharedUserList\":[\"ymkcdyhb\"],\"value\":\"kpw\",\"valueFormat\":\"JSON\"},\"id\":\"novvqfovljxy\",\"name\":\"suwsyrsnds\",\"type\":\"tgadgvraeaen\"},{\"properties\":{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"MySql\",\"createdByWorkspaceArmId\":\"arrwlquu\",\"expiryTime\":\"2021-08-08T16:39:53Z\",\"group\":\"File\",\"isSharedToAll\":true,\"target\":\"wiipfpub\",\"metadata\":{\"sgplsakn\":\"wwiftohqkvpuv\",\"synljphuopxodl\":\"n\"},\"sharedUserList\":[\"ntorzihleosjswsr\"],\"value\":\"lyzrpzbchckqqzqi\",\"valueFormat\":\"JSON\"},\"id\":\"suiizynkedyat\",\"name\":\"wyhqmibzyhwits\",\"type\":\"ypyynpcdpumnzg\"}],\"nextLink\":\"z\"}") - .toObject(WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.class); - Assertions.assertEquals(ConnectionCategory.MY_SQL, model.value().get(0).properties().category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-25T05:20:51Z"), - model.value().get(0).properties().expiryTime()); - Assertions.assertEquals(true, model.value().get(0).properties().isSharedToAll()); - Assertions.assertEquals("bpokulpiujwaasip", model.value().get(0).properties().target()); - Assertions.assertEquals("obyu", model.value().get(0).properties().metadata().get("erpqlpqwcciuqg")); - Assertions.assertEquals("ymkcdyhb", model.value().get(0).properties().sharedUserList().get(0)); - Assertions.assertEquals("kpw", 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.MY_SQL) - .withExpiryTime(OffsetDateTime.parse("2021-03-25T05:20:51Z")) - .withIsSharedToAll(true) - .withTarget("bpokulpiujwaasip") - .withMetadata( - mapOf("erpqlpqwcciuqg", "obyu", "hykojoxafnndlpic", "dbutauvfbtkuwhh")) - .withSharedUserList(Arrays.asList("ymkcdyhb")) - .withValue("kpw") - .withValueFormat(ValueFormat.JSON)), - new WorkspaceConnectionPropertiesV2BasicResourceInner().withProperties( - new WorkspaceConnectionPropertiesV2().withCategory(ConnectionCategory.MY_SQL) - .withExpiryTime(OffsetDateTime.parse("2021-08-08T16:39:53Z")) - .withIsSharedToAll(true) - .withTarget("wiipfpub") - .withMetadata(mapOf("sgplsakn", "wwiftohqkvpuv", "synljphuopxodl", "n")) - .withSharedUserList(Arrays.asList("ntorzihleosjswsr")) - .withValue("lyzrpzbchckqqzqi") - .withValueFormat(ValueFormat.JSON)))); - model = BinaryData.fromObject(model) - .toObject(WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.class); - Assertions.assertEquals(ConnectionCategory.MY_SQL, model.value().get(0).properties().category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-25T05:20:51Z"), - model.value().get(0).properties().expiryTime()); - Assertions.assertEquals(true, model.value().get(0).properties().isSharedToAll()); - Assertions.assertEquals("bpokulpiujwaasip", model.value().get(0).properties().target()); - Assertions.assertEquals("obyu", model.value().get(0).properties().metadata().get("erpqlpqwcciuqg")); - Assertions.assertEquals("ymkcdyhb", model.value().get(0).properties().sharedUserList().get(0)); - Assertions.assertEquals("kpw", model.value().get(0).properties().value()); - Assertions.assertEquals(ValueFormat.JSON, model.value().get(0).properties().valueFormat()); - } - - // 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/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 ada8ee08bb73b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2BasicResourceInnerTests.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.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 java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -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\":\"AzureDatabricksDeltaLake\",\"createdByWorkspaceArmId\":\"afcnih\",\"expiryTime\":\"2021-09-16T02:36:36Z\",\"group\":\"GenericProtocol\",\"isSharedToAll\":true,\"target\":\"gfbcvkcv\",\"metadata\":{\"tbobz\":\"keqdcvdrhvoods\",\"d\":\"opcjwvnhd\",\"twuoegrpkhjwni\":\"mgxcxrslpm\",\"ggkzzlvmbmpa\":\"qsluicp\"},\"sharedUserList\":[\"dfvue\",\"yw\",\"bpfvm\"],\"value\":\"hrfou\",\"valueFormat\":\"JSON\"},\"id\":\"akcp\",\"name\":\"iyzvqtmnub\",\"type\":\"xkp\"}") - .toObject(WorkspaceConnectionPropertiesV2BasicResourceInner.class); - Assertions.assertEquals(ConnectionCategory.AZURE_DATABRICKS_DELTA_LAKE, model.properties().category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-16T02:36:36Z"), model.properties().expiryTime()); - Assertions.assertEquals(true, model.properties().isSharedToAll()); - Assertions.assertEquals("gfbcvkcv", model.properties().target()); - Assertions.assertEquals("keqdcvdrhvoods", model.properties().metadata().get("tbobz")); - Assertions.assertEquals("dfvue", model.properties().sharedUserList().get(0)); - Assertions.assertEquals("hrfou", 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.AZURE_DATABRICKS_DELTA_LAKE) - .withExpiryTime(OffsetDateTime.parse("2021-09-16T02:36:36Z")) - .withIsSharedToAll(true) - .withTarget("gfbcvkcv") - .withMetadata(mapOf("tbobz", "keqdcvdrhvoods", "d", "opcjwvnhd", "twuoegrpkhjwni", "mgxcxrslpm", - "ggkzzlvmbmpa", "qsluicp")) - .withSharedUserList(Arrays.asList("dfvue", "yw", "bpfvm")) - .withValue("hrfou") - .withValueFormat(ValueFormat.JSON)); - model = BinaryData.fromObject(model).toObject(WorkspaceConnectionPropertiesV2BasicResourceInner.class); - Assertions.assertEquals(ConnectionCategory.AZURE_DATABRICKS_DELTA_LAKE, model.properties().category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-16T02:36:36Z"), model.properties().expiryTime()); - Assertions.assertEquals(true, model.properties().isSharedToAll()); - Assertions.assertEquals("gfbcvkcv", model.properties().target()); - Assertions.assertEquals("keqdcvdrhvoods", model.properties().metadata().get("tbobz")); - Assertions.assertEquals("dfvue", model.properties().sharedUserList().get(0)); - Assertions.assertEquals("hrfou", model.properties().value()); - Assertions.assertEquals(ValueFormat.JSON, model.properties().valueFormat()); - } - - // 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/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 2796f9c6ce634..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2Tests.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.ConnectionCategory; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -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\":\"SapOpenHub\",\"createdByWorkspaceArmId\":\"ondjmq\",\"expiryTime\":\"2021-06-21T21:58:07Z\",\"group\":\"Azure\",\"isSharedToAll\":false,\"target\":\"kopkwhojvpajqgx\",\"metadata\":{\"vhelxprglyatdd\":\"ocmbqfqvmkcxoza\",\"rjxgciqib\":\"kcbcue\",\"sdqrhzoymibmrq\":\"hos\"},\"sharedUserList\":[\"ahwfluszdtmhrk\",\"ofyyvoqacpi\"],\"value\":\"pbtg\",\"valueFormat\":\"JSON\"}") - .toObject(WorkspaceConnectionPropertiesV2.class); - Assertions.assertEquals(ConnectionCategory.SAP_OPEN_HUB, model.category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-21T21:58:07Z"), model.expiryTime()); - Assertions.assertEquals(false, model.isSharedToAll()); - Assertions.assertEquals("kopkwhojvpajqgx", model.target()); - Assertions.assertEquals("ocmbqfqvmkcxoza", model.metadata().get("vhelxprglyatdd")); - Assertions.assertEquals("ahwfluszdtmhrk", model.sharedUserList().get(0)); - Assertions.assertEquals("pbtg", model.value()); - Assertions.assertEquals(ValueFormat.JSON, model.valueFormat()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceConnectionPropertiesV2 model = new WorkspaceConnectionPropertiesV2() - .withCategory(ConnectionCategory.SAP_OPEN_HUB) - .withExpiryTime(OffsetDateTime.parse("2021-06-21T21:58:07Z")) - .withIsSharedToAll(false) - .withTarget("kopkwhojvpajqgx") - .withMetadata(mapOf("vhelxprglyatdd", "ocmbqfqvmkcxoza", "rjxgciqib", "kcbcue", "sdqrhzoymibmrq", "hos")) - .withSharedUserList(Arrays.asList("ahwfluszdtmhrk", "ofyyvoqacpi")) - .withValue("pbtg") - .withValueFormat(ValueFormat.JSON); - model = BinaryData.fromObject(model).toObject(WorkspaceConnectionPropertiesV2.class); - Assertions.assertEquals(ConnectionCategory.SAP_OPEN_HUB, model.category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-21T21:58:07Z"), model.expiryTime()); - Assertions.assertEquals(false, model.isSharedToAll()); - Assertions.assertEquals("kopkwhojvpajqgx", model.target()); - Assertions.assertEquals("ocmbqfqvmkcxoza", model.metadata().get("vhelxprglyatdd")); - Assertions.assertEquals("ahwfluszdtmhrk", model.sharedUserList().get(0)); - Assertions.assertEquals("pbtg", model.value()); - Assertions.assertEquals(ValueFormat.JSON, model.valueFormat()); - } - - // 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/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 820519fd5dfcc..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionSharedAccessSignatureTests.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.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\":\"vo\"}").toObject(WorkspaceConnectionSharedAccessSignature.class); - Assertions.assertEquals("vo", model.sas()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceConnectionSharedAccessSignature model = new WorkspaceConnectionSharedAccessSignature().withSas("vo"); - model = BinaryData.fromObject(model).toObject(WorkspaceConnectionSharedAccessSignature.class); - Assertions.assertEquals("vo", 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 37ebe555db56f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsCreateWithResponseMockTests.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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -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.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkspaceConnectionsCreateWithResponseMockTests { - @Test - public void testCreateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"AzureTableStorage\",\"createdByWorkspaceArmId\":\"njjthpsnxebycym\",\"expiryTime\":\"2021-04-08T08:44:08Z\",\"group\":\"AzureAI\",\"isSharedToAll\":false,\"target\":\"pnse\",\"metadata\":{\"dyzssjlmykdygj\":\"nous\",\"h\":\"gspjlf\",\"s\":\"ngwqxcrbcrgyoim\"},\"sharedUserList\":[\"cctvkog\",\"htvagwnnw\",\"nv\"],\"value\":\"yldjdkjvdryk\",\"valueFormat\":\"JSON\"},\"id\":\"oxh\",\"name\":\"rjlqdoqeje\",\"type\":\"fdlh\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("irlunsskydi") - .withExistingWorkspace("ex", "fjqzyhzydyvtuq") - .withProperties(new WorkspaceConnectionPropertiesV2().withCategory(ConnectionCategory.AZURE_MY_SQL_DB) - .withExpiryTime(OffsetDateTime.parse("2021-10-27T23:46:30Z")) - .withIsSharedToAll(true) - .withTarget("dcwuzs") - .withMetadata(mapOf("jeeyv", "yixecmasjnfgngxa", "axvwxtxuzh", "xbfckmoal")) - .withSharedUserList(Arrays.asList("yffwflbkjcdzu", "ygtc", "z")) - .withValue("efpubaldjcgldryv") - .withValueFormat(ValueFormat.JSON)) - .create(); - - Assertions.assertEquals(ConnectionCategory.AZURE_TABLE_STORAGE, response.properties().category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-08T08:44:08Z"), response.properties().expiryTime()); - Assertions.assertEquals(false, response.properties().isSharedToAll()); - Assertions.assertEquals("pnse", response.properties().target()); - Assertions.assertEquals("nous", response.properties().metadata().get("dyzssjlmykdygj")); - Assertions.assertEquals("cctvkog", response.properties().sharedUserList().get(0)); - Assertions.assertEquals("yldjdkjvdryk", response.properties().value()); - Assertions.assertEquals(ValueFormat.JSON, response.properties().valueFormat()); - } - - // 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/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 6ee1b46d20156..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsDeleteWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkspaceConnectionsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("jjpduibsrrrq", "neqrypyur", "shhovtuer", 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 b3e0c9c7ce2ea..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.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.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkspaceConnectionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"ApiKey\",\"createdByWorkspaceArmId\":\"knrbxzepi\",\"expiryTime\":\"2021-04-17T10:55:35Z\",\"group\":\"Database\",\"isSharedToAll\":true,\"target\":\"qbvxqtolpwbopv\",\"metadata\":{\"ithue\":\"tzaprjxcontickf\",\"jwv\":\"csgvuqzg\",\"b\":\"udmpwewpmioleaj\"},\"sharedUserList\":[\"yzwphbjks\"],\"value\":\"cmbaa\",\"valueFormat\":\"JSON\"},\"id\":\"rdkqlvzkfekdesb\",\"name\":\"jqtl\",\"type\":\"b\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("zdsyxb", "jilbuazcco", "hwivkd", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(ConnectionCategory.API_KEY, response.properties().category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-17T10:55:35Z"), response.properties().expiryTime()); - Assertions.assertEquals(true, response.properties().isSharedToAll()); - Assertions.assertEquals("qbvxqtolpwbopv", response.properties().target()); - Assertions.assertEquals("tzaprjxcontickf", response.properties().metadata().get("ithue")); - Assertions.assertEquals("yzwphbjks", response.properties().sharedUserList().get(0)); - Assertions.assertEquals("cmbaa", 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 688d7b0855b1b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.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.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkspaceConnectionsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"Oracle\",\"createdByWorkspaceArmId\":\"hxh\",\"expiryTime\":\"2021-06-05T00:33:45Z\",\"group\":\"GenericProtocol\",\"isSharedToAll\":false,\"target\":\"zzfmugykwuyc\",\"metadata\":{\"zffpherwj\":\"enndzgthdzit\",\"xvfybxmmr\":\"vswtwonadezm\"},\"sharedUserList\":[\"vqkrr\",\"guogkcbrotp\",\"abensjflwpftvv\",\"tmvifgcv\"],\"value\":\"mal\",\"valueFormat\":\"JSON\"},\"id\":\"cx\",\"name\":\"osnx\",\"type\":\"jptcd\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("pzhbw", "xybtdzycxhao", "gjzgpljbnwczsr", "zcby", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(ConnectionCategory.ORACLE, response.iterator().next().properties().category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-05T00:33:45Z"), - response.iterator().next().properties().expiryTime()); - Assertions.assertEquals(false, response.iterator().next().properties().isSharedToAll()); - Assertions.assertEquals("zzfmugykwuyc", response.iterator().next().properties().target()); - Assertions.assertEquals("enndzgthdzit", response.iterator().next().properties().metadata().get("zffpherwj")); - Assertions.assertEquals("vqkrr", response.iterator().next().properties().sharedUserList().get(0)); - Assertions.assertEquals("mal", 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/WorkspaceConnectionsListSecretsWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListSecretsWithResponseMockTests.java deleted file mode 100644 index 404038d99c5da..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListSecretsWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.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.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkspaceConnectionsListSecretsWithResponseMockTests { - @Test - public void testListSecretsWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"Hive\",\"createdByWorkspaceArmId\":\"aqoqbvejoysoxovl\",\"expiryTime\":\"2021-08-21T06:47:57Z\",\"group\":\"AzureAI\",\"isSharedToAll\":false,\"target\":\"qdlqqhntqrykkxak\",\"metadata\":{\"vpzgyxcc\":\"ptiic\",\"mztjekxsnnbrysg\":\"pxiema\",\"bblrtbofz\":\"tfmocn\",\"hocqxugjx\":\"hfuifwxudyn\"},\"sharedUserList\":[\"crrfbplvhmh\"],\"value\":\"osdjlz\",\"valueFormat\":\"JSON\"},\"id\":\"dghq\",\"name\":\"uyaorservpv\",\"type\":\"sorsbegcl\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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() - .listSecretsWithResponse("mzxaoxlhmvj", "nn", "sbnuc", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(ConnectionCategory.HIVE, response.properties().category()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-21T06:47:57Z"), response.properties().expiryTime()); - Assertions.assertEquals(false, response.properties().isSharedToAll()); - Assertions.assertEquals("qdlqqhntqrykkxak", response.properties().target()); - Assertions.assertEquals("ptiic", response.properties().metadata().get("vpzgyxcc")); - Assertions.assertEquals("crrfbplvhmh", response.properties().sharedUserList().get(0)); - Assertions.assertEquals("osdjlz", 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/WorkspaceFeaturesListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceFeaturesListMockTests.java deleted file mode 100644 index d07093c62d7ad..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceFeaturesListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.AmlUserFeature; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkspaceFeaturesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"id\":\"vvogwghxoxw\",\"displayName\":\"qkkmpfnwdrmzw\",\"description\":\"smeaciyp\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("pmlrjnnbmodsytq", "vatujphqv", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("vvogwghxoxw", response.iterator().next().id()); - Assertions.assertEquals("qkkmpfnwdrmzw", response.iterator().next().displayName()); - Assertions.assertEquals("smeaciyp", response.iterator().next().description()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceHubConfigTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceHubConfigTests.java deleted file mode 100644 index b55ced0cf7126..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceHubConfigTests.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.WorkspaceHubConfig; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkspaceHubConfigTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspaceHubConfig model = BinaryData.fromString( - "{\"additionalWorkspaceStorageAccounts\":[\"tduqktapspwgcuer\",\"umkdosvqwhbmd\",\"bbjfddgmbmbexp\",\"bhtqqrolfpfpsa\"],\"defaultWorkspaceResourceGroup\":\"bquxigjy\"}") - .toObject(WorkspaceHubConfig.class); - Assertions.assertEquals("tduqktapspwgcuer", model.additionalWorkspaceStorageAccounts().get(0)); - Assertions.assertEquals("bquxigjy", model.defaultWorkspaceResourceGroup()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceHubConfig model = new WorkspaceHubConfig() - .withAdditionalWorkspaceStorageAccounts( - Arrays.asList("tduqktapspwgcuer", "umkdosvqwhbmd", "bbjfddgmbmbexp", "bhtqqrolfpfpsa")) - .withDefaultWorkspaceResourceGroup("bquxigjy"); - model = BinaryData.fromObject(model).toObject(WorkspaceHubConfig.class); - Assertions.assertEquals("tduqktapspwgcuer", model.additionalWorkspaceStorageAccounts().get(0)); - Assertions.assertEquals("bquxigjy", model.defaultWorkspaceResourceGroup()); - } -} 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 5a1818883d153..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDeleteMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkspacesDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("hlutjs", "zelsr", true, 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 5c563bd87192a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListOutboundNetworkDependenciesEndpointsWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ExternalFqdnResponse; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkspacesListOutboundNetworkDependenciesEndpointsWithResponseMockTests { - @Test - public void testListOutboundNetworkDependenciesEndpointsWithResponse() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"category\":\"xjbrixymc\",\"endpoints\":[{}]}},{\"properties\":{\"category\":\"yvurhwishy\",\"endpoints\":[{},{},{},{}]}},{\"properties\":{\"category\":\"qfev\",\"endpoints\":[{},{},{},{}]}}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("uzltenlb", "xlmxozesndo", - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("xjbrixymc", response.value().get(0).properties().category()); - } -} 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 56ebd32e49830..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesResyncKeysMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class WorkspacesResyncKeysMockTests { - @Test - public void testResyncKeys() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - 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("qwnjzebpicciyo", "poedksp", com.azure.core.util.Context.NONE); - - } -}